X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2Fnasal-props.cxx;h=9f309903a11b7401a2b7992a49926bd53da9ab89;hb=f51f15eb50e1712e73c81713ff579cf66f4972c8;hp=83f90ab0faf2ed67003d058415cb99e51248b0f8;hpb=7d6c567fde81e82fc94b6ae98aeb166b12ab2382;p=flightgear.git diff --git a/src/Scripting/nasal-props.cxx b/src/Scripting/nasal-props.cxx index 83f90ab0f..9f309903a 100644 --- a/src/Scripting/nasal-props.cxx +++ b/src/Scripting/nasal-props.cxx @@ -3,6 +3,9 @@ # include "config.h" #endif +#include + +#include #include #include @@ -10,6 +13,8 @@ #include "NasalSys.hxx" +using namespace std; + // Implementation of a Nasal wrapper for the SGPropertyNode class, // using the Nasal "ghost" (er... Garbage collection Handle for // OutSide Thingy) facility. @@ -73,6 +78,7 @@ static naRef f_getType(naContext c, naRef me, int argc, naRef* args) case props::UNSPECIFIED: t = "UNSPECIFIED"; break; case props::VEC3D: t = "VEC3D"; break; case props::VEC4D: t = "VEC4D"; break; + case props::EXTENDED: t = "EXTENDED"; break; // shouldn't happen } return NASTR(t); } @@ -146,7 +152,7 @@ static naRef f_getIndex(naContext c, naRef me, int argc, naRef* args) template naRef makeVectorFromVec(naContext c, const T& vec) { - const unsigned num_components + const int num_components = sizeof(vec.data()) / sizeof(typename T::value_type); naRef vector = naNewVector(c); naVec_setsize(vector, num_components); @@ -180,7 +186,7 @@ template T makeVecFromVector(naRef vector) { T vec; - const unsigned num_components + const int num_components = sizeof(vec.data()) / sizeof(typename T::value_type); int size = naVec_size(vector);