Fixing a boatload of warnings

This commit is contained in:
Stefan Högler
2021-04-01 16:40:14 +02:00
parent f042480540
commit d5f0fe644f
84 changed files with 496 additions and 407 deletions
+2 -6
View File
@@ -52,10 +52,7 @@ public:
std::scoped_lock lock(registeredObjectsLock);
registeredObjects.erase(handle);
}
// we cant always have the definition of every class
#pragma warning(disable : 4150)
delete handle;
#pragma warning(default : 4150)
}
RefObject &operator=(const RefObject &rhs)
{
@@ -105,7 +102,6 @@ public:
{
return handle;
}
private:
T *handle;
std::atomic_uint64_t refCount;
@@ -161,7 +157,7 @@ public:
RefPtr(const RefPtr<F> &other)
{
F *f = other.getObject()->getHandle();
T* t = static_cast<T *>(f);
assert(static_cast<T *>(f));
object = (RefObject<T> *)other.getObject();
object->addRef();
}
@@ -267,7 +263,7 @@ private:
RefObject<T> *object;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int version)
void serialize(Archive& ar, const unsigned int)
{
ar & *object->getHandle();
}