Commit 41918ae fixes original error but build fails again with differrent error. Looks like a similar problem.
Code:
CPP build/trackloader.o
src/trackloader.cpp: In member function ‘bool Track::Loader::AddObject(const Track::Loader::Object&)’:
src/trackloader.cpp:692:88: error: no matching function for call to ‘max(unsigned int, std::basic_string<char>::size_type)’
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
^
src/trackloader.cpp:692:88: note: candidates are:
In file included from /usr/include/c++/4.8/list:60:0,
from src/joeserialize.h:23,
from src/mathvector.h:23,
from src/bezier.h:23,
from src/roadpatch.h:23,
from src/roadstrip.h:23,
from src/track.h:23,
from src/trackloader.h:23,
from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:
src/trackloader.cpp:692:88: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
^
In file included from /usr/include/c++/4.8/list:60:0,
from src/joeserialize.h:23,
from src/mathvector.h:23,
from src/bezier.h:23,
from src/roadpatch.h:23,
from src/roadstrip.h:23,
from src/track.h:23,
from src/trackloader.h:23,
from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
src/trackloader.cpp:692:88: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
^
src/trackloader.cpp:706:88: error: no matching function for call to ‘max(unsigned int, std::basic_string<char>::size_type)’
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
^
src/trackloader.cpp:706:88: note: candidates are:
In file included from /usr/include/c++/4.8/list:60:0,
from src/joeserialize.h:23,
from src/mathvector.h:23,
from src/bezier.h:23,
from src/roadpatch.h:23,
from src/roadstrip.h:23,
from src/track.h:23,
from src/trackloader.h:23,
from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:
src/trackloader.cpp:706:88: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
^
In file included from /usr/include/c++/4.8/list:60:0,
from src/joeserialize.h:23,
from src/mathvector.h:23,
from src/bezier.h:23,
from src/roadpatch.h:23,
from src/roadstrip.h:23,
from src/track.h:23,
from src/trackloader.h:23,
from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
src/trackloader.cpp:706:88: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
^
scons: *** [build/trackloader.o] Error 1
scons: building terminated because of errors.