[
AC_MSG_CHECKING([for optimization flags])
- AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[
+ AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=1)],[
optimization=$enableval
],[
- optimization="2"
+ optimization="1"
])
optimization_flags=''
case "$optimization" in
namespace synfig {
class ChangeLocale {
- const char *previous;
- int category;
+ const String previous;
+ const int category;
public:
ChangeLocale(int category, const char *locale):
- previous(setlocale(category,NULL)),category(category)
+ previous(setlocale(category,locale)),category(category)
{
- setlocale(category,locale);
}
~ChangeLocale() {
- setlocale(category,previous);
+ setlocale(category,previous.c_str());
}
};
error(element, "Undefined value in <x>");
return Vector();
}
- xmlpp::TextNode *text=dynamic_cast<xmlpp::TextNode*>(child->get_children().front());
- if(!text)
- {
- error(element,"I need a number, not an element!");
- return Vector();
- }
- vect[0]=atof(text->get_content().c_str());
+ vect[0]=atof(child->get_child_text()->get_content().c_str());
}
else
if(child->get_name()=="y")
error(element, "Undefined value in <y>");
return Vector();
}
- xmlpp::TextNode *text=dynamic_cast<xmlpp::TextNode*>(child->get_children().front());
- if(!text)
- {
- error(element,"I need a number, not an element!");
- return Vector();
- }
- vect[1]=atof(text->get_content().c_str());
+ vect[1]=atof(child->get_child_text()->get_content().c_str());
}
else
error_unexpected_element(child,child->get_name());