X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Floadcanvas.cpp;h=8edd651744d3252a2b621c3eac0bc93c2441f8aa;hb=1d6869075fcc760af71dca8c9e57ecef76b66227;hp=760a2319f98b44b62ab503aab5a45deba30a1de2;hpb=899bef2135047fcea316348dfdf60af632193006;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp index 760a231..8edd651 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ b/synfig-core/trunk/src/synfig/loadcanvas.cpp @@ -290,6 +290,15 @@ CanvasParser::parse_integer(xmlpp::Element *element) return atoi(val.c_str()); } +// see 'minor hack' at the end of parse_vector() below +// making this 'static' to give it file local scope +// stops it working (where working means working around +// bug #1509627) +Vector &canvas_parser_vector_id(Vector &vector) +{ + return vector; +} + Vector CanvasParser::parse_vector(xmlpp::Element *element) { @@ -332,7 +341,12 @@ CanvasParser::parse_vector(xmlpp::Element *element) else error_unexpected_element(child,child->get_name()); } - return vect; + // Minor hack - gcc 4.1.2 and earlier think that we're not using + // 'vect' and optimize it out at -O2 and higher. This convinces + // them that we are really using it. + return canvas_parser_vector_id(vect); + // When the bug is fixed, we can just do this instead: + // return vect; } Color