From: Thomas Geymayer Date: Tue, 27 Nov 2012 14:14:54 +0000 (+0100) Subject: Simplify/Make VS happy X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c19585e22a650a518e69f24de46ee6eced61953c;p=simgear.git Simplify/Make VS happy --- diff --git a/simgear/canvas/CanvasEvent.hxx b/simgear/canvas/CanvasEvent.hxx index 88cb4216..b8babfb5 100644 --- a/simgear/canvas/CanvasEvent.hxx +++ b/simgear/canvas/CanvasEvent.hxx @@ -26,7 +26,7 @@ namespace simgear namespace canvas { - struct Event + class Event { public: diff --git a/simgear/canvas/MouseEvent.hxx b/simgear/canvas/MouseEvent.hxx index b5d014f2..39a6404d 100644 --- a/simgear/canvas/MouseEvent.hxx +++ b/simgear/canvas/MouseEvent.hxx @@ -27,24 +27,25 @@ namespace simgear namespace canvas { - struct MouseEvent: + class MouseEvent: public Event { - MouseEvent(): - button(-1), - state(-1), - mod(-1) - {} - - osg::Vec2f getPos() const { return pos; } - osg::Vec3f getPos3() const { return osg::Vec3f(pos, 0); } - osg::Vec2f getDelta() const { return delta; } - - osg::Vec2f pos, - delta; - int button, // DoubleDerivedPtr; typedef boost::shared_ptr DoubleDerived2Ptr; naRef member(Derived&, const nasal::CallContext&) { return naNil(); } -naRef member(DerivedPtr&, const nasal::CallContext&) { return naNil(); } int main(int argc, char* argv[]) { diff --git a/simgear/nasal/cppbind/from_nasal_detail.hxx b/simgear/nasal/cppbind/from_nasal_detail.hxx index 48a8879e..20a7407f 100644 --- a/simgear/nasal/cppbind/from_nasal_detail.hxx +++ b/simgear/nasal/cppbind/from_nasal_detail.hxx @@ -97,28 +97,17 @@ namespace nasal /** * Convert a Nasal vector to a std::vector */ - template - typename boost::enable_if< boost::is_same - < Vector, - std::vector - >, - Vector - >::type - from_nasal_helper(naContext c, naRef ref, Vector*) + template + std::vector from_nasal_helper(naContext c, naRef ref, std::vector*) { if( !naIsVector(ref) ) throw bad_nasal_cast("Not a vector"); int size = naVec_size(ref); - Vector vec(size); + std::vector vec(size); for(int i = 0; i < size; ++i) - vec[i] = from_nasal_helper - ( - c, - naVec_get(ref, i), - static_cast(0) - ); + vec[i] = from_nasal_helper(c, naVec_get(ref, i), static_cast(0)); return vec; }