mirror of
https://github.com/RPCS3/cereal.git
synced 2026-01-31 01:25:20 +01:00
clang warning updates for sandbox code
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
# pragma warning(disable : 4244 4267)
|
||||
#endif
|
||||
|
||||
// fix for old versions of boost + deprecated auto_ptr
|
||||
#define BOOST_NO_AUTO_PTR
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
||||
@@ -65,6 +65,8 @@ class Base
|
||||
|
||||
public:
|
||||
int x;
|
||||
|
||||
virtual ~Base() {}
|
||||
};
|
||||
|
||||
class Derived : public Base
|
||||
@@ -77,6 +79,7 @@ class Derived : public Base
|
||||
y = d;
|
||||
x = b;
|
||||
}
|
||||
virtual ~Derived() {}
|
||||
|
||||
template <class Archive>
|
||||
void save( Archive & ar ) const
|
||||
@@ -386,7 +389,8 @@ void test_unordered_loads()
|
||||
cereal::make_nvp( name3, i_vecbool3 ),
|
||||
cereal::make_nvp( name1, i_int1 ),
|
||||
cereal::make_nvp( name5, i_int5 ),
|
||||
i_int6 );
|
||||
i_int6,
|
||||
i_un7 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ struct Base
|
||||
{
|
||||
int y;
|
||||
virtual void foo() = 0;
|
||||
virtual ~Base() {}
|
||||
|
||||
template<class Archive>
|
||||
void save(Archive & ar) const
|
||||
@@ -55,6 +56,8 @@ struct Base
|
||||
|
||||
struct MyType : public Base
|
||||
{
|
||||
virtual ~MyType() {}
|
||||
|
||||
int x;
|
||||
|
||||
void foo() {}
|
||||
@@ -77,6 +80,8 @@ CEREAL_REGISTER_TYPE(MyType)
|
||||
|
||||
struct YourType : public Base
|
||||
{
|
||||
virtual ~YourType() {}
|
||||
|
||||
YourType(int xx) : x(xx) {}
|
||||
YourType() : x(-1) {}
|
||||
int x;
|
||||
@@ -114,6 +119,8 @@ struct OurType : public OurBase
|
||||
{
|
||||
OurType() : OurBase(), x() {}
|
||||
OurType(int x_) : x(x_) {}
|
||||
virtual ~OurType() {}
|
||||
|
||||
void foo() {}
|
||||
|
||||
int x;
|
||||
@@ -136,6 +143,8 @@ struct BaseVirtual
|
||||
|
||||
struct DerivedVirtual : public virtual BaseVirtual
|
||||
{
|
||||
virtual ~DerivedVirtual() {}
|
||||
|
||||
int y;
|
||||
virtual void foo() {}
|
||||
|
||||
@@ -177,6 +186,7 @@ struct AAA
|
||||
|
||||
struct BBB : AAA
|
||||
{
|
||||
virtual ~BBB() {}
|
||||
void foo() {}
|
||||
template <class Archive>
|
||||
void serialize( Archive & ) {}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "base.hpp"
|
||||
class Derived : public Base
|
||||
{
|
||||
public:
|
||||
virtual ~Derived() {}
|
||||
|
||||
private:
|
||||
friend class cereal::access;
|
||||
template <class Archive>
|
||||
|
||||
@@ -125,10 +125,12 @@ namespace cereal
|
||||
struct A
|
||||
{
|
||||
virtual void foo() = 0;
|
||||
virtual ~A() {}
|
||||
};
|
||||
|
||||
struct B : A
|
||||
{
|
||||
virtual ~B() {}
|
||||
void foo() {}
|
||||
|
||||
template <class Archive>
|
||||
|
||||
Reference in New Issue
Block a user