&& 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();
{
// 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);
}