mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Is pedantic safe to turn on? TIME TO FIND OUT.
This commit is contained in:
parent
c087ca30bf
commit
5efbae5798
|
@ -55,7 +55,7 @@ args = parser.parse_args()
|
|||
# general variables
|
||||
include = [ '.', './include' ]
|
||||
depends = [os.path.join('Catch', 'include')]
|
||||
cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=1024' ]
|
||||
cxxflags = [ '-Wall', '-Wextra', '-Wpedantic', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=1024' ]
|
||||
cxxflags.extend([p for p in re.split("( |\\\".*?\\\"|'.*?')", args.cxx_flags) if p.strip()])
|
||||
ldflags = []
|
||||
script_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
|
|
|
@ -83,7 +83,6 @@ private:
|
|||
}
|
||||
|
||||
protected_function_result invoke(types<>, std::index_sequence<>, std::ptrdiff_t n, handler& h) const {
|
||||
bool handlerpushed = error_handler.valid();
|
||||
int stacksize = lua_gettop(lua_state());
|
||||
int firstreturn = std::max(1, stacksize - static_cast<int>(n) - 1);
|
||||
int returncount = 0;
|
||||
|
|
|
@ -290,7 +290,7 @@ template<typename T, typename C>
|
|||
struct checker<optional<T>, type::poly, C> {
|
||||
template <typename Handler>
|
||||
static bool check(lua_State* L, int index, Handler&& handler) {
|
||||
return stack::check<T>(L, index, std::forward<Handler>(handler));
|
||||
return stack::check<nil_t>(L, index, no_panic) || stack::check<T>(L, index, std::forward<Handler>(handler));
|
||||
}
|
||||
};
|
||||
} // stack
|
||||
|
|
Loading…
Reference in New Issue
Block a user