Kaydet (Commit) a99f068f authored tarafından Noel Grandin's avatar Noel Grandin

once more unto the breech dear fellows

workaround GCC4.8 issue

Change-Id: Iea4d10a02a114ce94e0219e8b89acf48db5411d0
üst 30e87214
......@@ -452,14 +452,13 @@ void DrawXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* >
elem.Children.splice( elem.Children.end(), pNext->Children );
// workaround older compilers that do not have std::list::erase(const_iterator)
#if defined __GNUC__ == 4 && __GNUC_MINOR__ <= 8
#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8
std::list< Element* >::iterator tmpIt = elem.Parent->Children.begin();
std::advance(tmpIt, std::distance(elem.Parent->Children.cbegin(), next_it));
elem.Parent->Children.erase(tmpIt);
#else
elem.Parent->Children.erase(next_it);
#endif
delete pNext;
}
}
......
......@@ -403,7 +403,7 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element*
elem.Children.splice( elem.Children.end(), pNext->Children );
// workaround older compilers that do not have std::list::erase(const_iterator)
#if defined __GNUC__ == 4 && __GNUC_MINOR__ <= 8
#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8
std::list< Element* >::iterator tmpIt = elem.Parent->Children.begin();
std::advance(tmpIt, std::distance(elem.Parent->Children.cbegin(), next_it));
elem.Parent->Children.erase(tmpIt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment