cppbind: faster from_nasal for bool and fix VS warning.
This commit is contained in:
parent
fe9caad391
commit
0539aa38e5
@ -81,4 +81,10 @@ namespace nasal
|
||||
return String(ref);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool from_nasal_helper(naContext c, naRef ref, const bool*)
|
||||
{
|
||||
return naTrue(ref) == 1;
|
||||
}
|
||||
|
||||
} // namespace nasal
|
||||
|
@ -94,6 +94,14 @@ namespace nasal
|
||||
*/
|
||||
String from_nasal_helper(naContext c, naRef ref, const String*);
|
||||
|
||||
/**
|
||||
* Convert a Nasal object to bool.
|
||||
*
|
||||
* @return true, if ref is string or ref is number != 0
|
||||
* false, else
|
||||
*/
|
||||
bool from_nasal_helper(naContext c, naRef ref, const bool*);
|
||||
|
||||
/**
|
||||
* Convert a Nasal number to a C++ numeric type
|
||||
*/
|
||||
|
@ -37,7 +37,7 @@
|
||||
func,
|
||||
_1
|
||||
BOOST_PP_COMMA_IF(n)
|
||||
BOOST_PP_ENUM(n, SG_GHOST_REQUIRE_ARG,)
|
||||
BOOST_PP_ENUM(n, SG_GHOST_REQUIRE_ARG, 0)
|
||||
))
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user