cppbind: small logging/warning updates.

This commit is contained in:
Thomas Geymayer
2014-05-05 14:51:33 +02:00
parent b101f64cd8
commit edaae885ee
2 changed files with 15 additions and 1 deletions

View File

@@ -737,6 +737,17 @@ namespace nasal
&& dynamic_cast<const typename Ghost::raw_type*>(base) != base )
return 0;
if( !getSingletonPtr() )
{
SG_LOG
(
SG_NASAL,
SG_INFO,
"Ghost::getTypeFor: can not get type for unregistered ghost"
);
return 0;
}
// Now check if we can further downcast to one of our derived classes.
for( typename DerivedList::reverse_iterator
derived = getSingletonPtr()->_derived_types.rbegin();

View File

@@ -144,7 +144,10 @@ namespace nasal
{
// We take just double because in Nasal every number is represented as
// double
double nasal_vec[2] = {vec[0], vec[1]};
double nasal_vec[2] = {
static_cast<double>(vec[0]),
static_cast<double>(vec[1])
};
return to_nasal_helper(c, nasal_vec);
}