std::string getString() const { return ""; }
void setString(const std::string&) {}
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(); }
std::string var;
void baseVoidFunc(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(); }
void baseFuncCallContext(const Base&, const nasal::CallContext&) {}
>(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()
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
SG_GHOST_MEM_FN(const)
#undef SG_GHOST_MEM_FN
to_nasal_helper(naContext c, const Vector<T, Alloc>& vec)
{
naRef ret = naNewVector(c);
- naVec_setsize(c, ret, vec.size());
- for(size_t i = 0; i < vec.size(); ++i)
+ naVec_setsize(c, ret, static_cast<int>(vec.size()));
+ for(int i = 0; i < static_cast<int>(vec.size()); ++i)
naVec_set(ret, i, to_nasal_helper(c, vec[i]));
return ret;
}
naRef to_nasal_helper(naContext c, const T(&array)[N])
{
naRef ret = naNewVector(c);
- naVec_setsize(c, ret, N);
- for(size_t i = 0; i < N; ++i)
+ naVec_setsize(c, ret, static_cast<int>(N));
+ for(int i = 0; i < static_cast<int>(N); ++i)
naVec_set(ret, i, to_nasal_helper(c, array[i]));
return ret;
}
#include "SGReferenced.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>
class SGWeakPtr;
friend class SGWeakPtr;
};
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
#endif