History

FIxing one more issue with compilation on ubuntu regarding the template functions specializationand the namespace

Sam Gateau committed 11 years ago

Commit ad0b0cf1 parent dd9d7581 file · +8 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+8−5
@@ -3169,11 +3169,14 @@ public: · 3168 unmodified lines
31693169
31703170 };
31713171
3172−template <> const render::ItemKey render::payloadGetKey(const MyFirstStuff::Pointer& stuff) { return ItemKey::Builder::opaqueShape(); }
3173−template <> const render::Item::Bound render::payloadGetBound(const MyFirstStuff::Pointer& stuff) { return Item::Bound(); }
3174−template <> void render::payloadRender(const MyFirstStuff::Pointer& stuff, RenderArgs* args) {
3175− if (args) {
3176− args->_elementsTouched ++;
3172+// For Ubuntu, the compiler want's the Payload's functions to be specialized in the "render" namespace explicitely...
3173+namespace render {
3174+ template <> const ItemKey payloadGetKey(const MyFirstStuff::Pointer& stuff) { return ItemKey::Builder::opaqueShape(); }
3175+ template <> const Item::Bound payloadGetBound(const MyFirstStuff::Pointer& stuff) { return Item::Bound(); }
3176+ template <> void payloadRender(const MyFirstStuff::Pointer& stuff, RenderArgs* args) {
3177+ if (args) {
3178+ args->_elementsTouched ++;
3179+ }
31773180 }
31783181 }
31793182