Silence MSVC
This commit is contained in:
@@ -24,7 +24,7 @@ struct Base
|
|||||||
std::string getString() const { return ""; }
|
std::string getString() const { return ""; }
|
||||||
void setString(const std::string&) {}
|
void setString(const std::string&) {}
|
||||||
void constVoidFunc() const {}
|
void constVoidFunc() const {}
|
||||||
int test1Arg(const std::string& str) const { return str.length(); }
|
size_t test1Arg(const std::string& str) const { return str.length(); }
|
||||||
bool test2Args(const std::string& s, bool c) { return c && s.empty(); }
|
bool test2Args(const std::string& s, bool c) { return c && s.empty(); }
|
||||||
|
|
||||||
std::string var;
|
std::string var;
|
||||||
@@ -34,7 +34,7 @@ struct Base
|
|||||||
|
|
||||||
void baseVoidFunc(Base& b) {}
|
void baseVoidFunc(Base& b) {}
|
||||||
void baseConstVoidFunc(const Base& b) {}
|
void baseConstVoidFunc(const Base& b) {}
|
||||||
int baseFunc2Args(Base& b, int x, const std::string& s) { return x + s.size(); }
|
size_t baseFunc2Args(Base& b, int x, const std::string& s) { return x + s.size(); }
|
||||||
std::string testPtr(Base& b) { return b.getString(); }
|
std::string testPtr(Base& b) { return b.getString(); }
|
||||||
void baseFuncCallContext(const Base&, const nasal::CallContext&) {}
|
void baseFuncCallContext(const Base&, const nasal::CallContext&) {}
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,16 @@
|
|||||||
>(name, SG_GHOST_FUNC_TYPE(fn));\
|
>(name, SG_GHOST_FUNC_TYPE(fn));\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(push)
|
||||||
|
// C4003: not enough actual parameters for macro
|
||||||
|
// We really do not want to pass a parameter, even if MSVC can not believe it.
|
||||||
|
# pragma warning(disable: 4003)
|
||||||
|
#endif
|
||||||
SG_GHOST_MEM_FN()
|
SG_GHOST_MEM_FN()
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
SG_GHOST_MEM_FN(const)
|
SG_GHOST_MEM_FN(const)
|
||||||
|
|
||||||
#undef SG_GHOST_MEM_FN
|
#undef SG_GHOST_MEM_FN
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ namespace nasal
|
|||||||
to_nasal_helper(naContext c, const Vector<T, Alloc>& vec)
|
to_nasal_helper(naContext c, const Vector<T, Alloc>& vec)
|
||||||
{
|
{
|
||||||
naRef ret = naNewVector(c);
|
naRef ret = naNewVector(c);
|
||||||
naVec_setsize(c, ret, vec.size());
|
naVec_setsize(c, ret, static_cast<int>(vec.size()));
|
||||||
for(size_t i = 0; i < vec.size(); ++i)
|
for(int i = 0; i < static_cast<int>(vec.size()); ++i)
|
||||||
naVec_set(ret, i, to_nasal_helper(c, vec[i]));
|
naVec_set(ret, i, to_nasal_helper(c, vec[i]));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -152,8 +152,8 @@ namespace nasal
|
|||||||
naRef to_nasal_helper(naContext c, const T(&array)[N])
|
naRef to_nasal_helper(naContext c, const T(&array)[N])
|
||||||
{
|
{
|
||||||
naRef ret = naNewVector(c);
|
naRef ret = naNewVector(c);
|
||||||
naVec_setsize(c, ret, N);
|
naVec_setsize(c, ret, static_cast<int>(N));
|
||||||
for(size_t i = 0; i < N; ++i)
|
for(int i = 0; i < static_cast<int>(N); ++i)
|
||||||
naVec_set(ret, i, to_nasal_helper(c, array[i]));
|
naVec_set(ret, i, to_nasal_helper(c, array[i]));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,13 @@
|
|||||||
#include "SGReferenced.hxx"
|
#include "SGReferenced.hxx"
|
||||||
#include "SGSharedPtr.hxx"
|
#include "SGSharedPtr.hxx"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(push)
|
||||||
|
// C4355: 'this' : used in base member initializer list
|
||||||
|
// Tell MSVC we know what we do and really want to do it this way.
|
||||||
|
# pragma warning(disable: 4355)
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class SGWeakPtr;
|
class SGWeakPtr;
|
||||||
|
|
||||||
@@ -100,4 +107,8 @@ private:
|
|||||||
friend class SGWeakPtr;
|
friend class SGWeakPtr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user