Make warnings stricter on windows and clean up all legit warnings in our code.
This commit is contained in:
@@ -146,7 +146,14 @@ namespace chaiscript
|
||||
template<typename Ret, typename L>
|
||||
Ret unary_minus(L l)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4146)
|
||||
return (-l);
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
return (-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Ret, typename L, typename R>
|
||||
|
@@ -306,7 +306,7 @@ namespace chaiscript
|
||||
|
||||
std::vector<Boxed_Value> args;
|
||||
|
||||
while (true)
|
||||
while (!(parg == params.end() && barg == m_args.end()))
|
||||
{
|
||||
while (barg != m_args.end()
|
||||
&& !(barg->get_type_info() == detail::Get_Type_Info<Placeholder_Object>::get()))
|
||||
@@ -326,11 +326,6 @@ namespace chaiscript
|
||||
{
|
||||
++barg;
|
||||
}
|
||||
|
||||
if (parg == params.end() && barg == m_args.end())
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
@@ -7,13 +7,6 @@
|
||||
#ifndef _CHAISCRIPT_COMMON_HPP
|
||||
#define _CHAISCRIPT_COMMON_HPP
|
||||
|
||||
|
||||
#ifdef BOOST_HAS_DECLSPEC
|
||||
#define CHAISCRIPT_MODULE_EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define CHAISCRIPT_MODULE_EXPORT extern "C"
|
||||
#endif
|
||||
|
||||
namespace chaiscript
|
||||
{
|
||||
typedef ModulePtr (*Create_Module_Func)();
|
||||
|
@@ -15,7 +15,9 @@
|
||||
#ifdef _POSIX_VERSION
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
#ifdef WIN32
|
||||
#ifdef BOOST_WINDOWS
|
||||
#define VC_EXTRA_LEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user