Browse Source

Merge pull request #446 from zrax/clang_fixes

Fix some errors and warnings when compiling with Clang
Darryl Pogue 10 years ago
parent
commit
4f5a941d41
  1. 5
      Sources/Plasma/CoreLib/hsRefCnt.h
  2. 1
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h
  3. 2
      Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.cpp

5
Sources/Plasma/CoreLib/hsRefCnt.h

@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define hsRefCnt_Defiend #define hsRefCnt_Defiend
#include <atomic> #include <atomic>
#include <cstddef>
class hsRefCnt { class hsRefCnt {
private: private:
@ -83,7 +84,7 @@ class hsRef
{ {
public: public:
hsRef() : fObj(nullptr) { } hsRef() : fObj(nullptr) { }
hsRef(nullptr_t) : fObj(nullptr) { } hsRef(std::nullptr_t) : fObj(nullptr) { }
hsRef(_Ref *obj) : fObj(obj) { if (fObj) fObj->Ref(); } hsRef(_Ref *obj) : fObj(obj) { if (fObj) fObj->Ref(); }
hsRef(const hsRef<_Ref> &copy) : fObj(copy.fObj) { if (fObj) fObj->Ref(); } hsRef(const hsRef<_Ref> &copy) : fObj(copy.fObj) { if (fObj) fObj->Ref(); }
hsRef(hsRef<_Ref> &&move) : fObj(move.fObj) { move.fObj = nullptr; } hsRef(hsRef<_Ref> &&move) : fObj(move.fObj) { move.fObj = nullptr; }
@ -110,7 +111,7 @@ public:
return *this; return *this;
} }
hsRef<_Ref> &operator=(nullptr_t) hsRef<_Ref> &operator=(std::nullptr_t)
{ {
if (fObj) if (fObj)
fObj->UnRef(); fObj->UnRef();

1
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h

@ -226,6 +226,7 @@ class pfGUIDropTargetProc
public: public:
pfGUIDropTargetProc() { fRefCnt = 0; } pfGUIDropTargetProc() { fRefCnt = 0; }
virtual ~pfGUIDropTargetProc() { }
virtual bool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0; virtual bool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0;
virtual void Eat( pfGUIListElement *element, pfGUIControlMod *source, pfGUIControlMod *parent ) = 0; virtual void Eat( pfGUIListElement *element, pfGUIControlMod *source, pfGUIControlMod *parent ) = 0;

2
Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.cpp

@ -154,7 +154,7 @@ void CryptKeyClose (
if (!key) if (!key)
return; return;
delete key->handle; delete (RC4_KEY *)key->handle;
delete key; delete key;
} }

Loading…
Cancel
Save