- [SRC] Compiling fios.cpp
- In file included from /home/lordaro/dev/openttd/src/fios.cpp:15:0:
- /home/lordaro/dev/openttd/src/fios.cpp: In function ‘void FiosGetFileList(SaveLoadOperation, FiosType (*)(SaveLoadOperation, const char*, const char*, char*, const char*), Subdirectory, FileList&)’:
- /home/lordaro/dev/openttd/src/fios.cpp:415:72: error: no matching function for call to ‘sort(FiosItem*, const FiosItem*, bool (&)(const FiosItem&, const FiosItem&))’
- std::sort(file_list.Get(sort_start), file_list.End(), CompareFiosItems);
- ^
- In file included from /usr/include/c++/7.1.1/algorithm:62:0,
- from /home/lordaro/dev/openttd/src/core/smallmap_type.hpp:15,
- from /home/lordaro/dev/openttd/src/newgrf_config.h:17,
- from /home/lordaro/dev/openttd/src/fios.h:17,
- from /home/lordaro/dev/openttd/src/fios.cpp:16:
- /usr/include/c++/7.1.1/bits/stl_algo.h:4826:5: note: candidate: template<class _RAIter> void std::sort(_RAIter, _RAIter)
- sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
- ^~~~
- /usr/include/c++/7.1.1/bits/stl_algo.h:4826:5: note: template argument deduction/substitution failed:
- /home/lordaro/dev/openttd/src/fios.cpp:415:72: note: deduced conflicting types for parameter ‘_RAIter’ (‘FiosItem*’ and ‘const FiosItem*’)
- std::sort(file_list.Get(sort_start), file_list.End(), CompareFiosItems);
- ^
- In file included from /usr/include/c++/7.1.1/algorithm:62:0,
- from /home/lordaro/dev/openttd/src/core/smallmap_type.hpp:15,
- from /home/lordaro/dev/openttd/src/newgrf_config.h:17,
- from /home/lordaro/dev/openttd/src/fios.h:17,
- from /home/lordaro/dev/openttd/src/fios.cpp:16:
- /usr/include/c++/7.1.1/bits/stl_algo.h:4856:5: note: candidate: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)
- sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
- ^~~~
- /usr/include/c++/7.1.1/bits/stl_algo.h:4856:5: note: template argument deduction/substitution failed:
- /home/lordaro/dev/openttd/src/fios.cpp:415:72: note: deduced conflicting types for parameter ‘_RAIter’ (‘FiosItem*’ and ‘const FiosItem*’)
- std::sort(file_list.Get(sort_start), file_list.End(), CompareFiosItems);
- ^
- make[1]: *** [Makefile:235: fios.o] Error 1
- make[1]: Leaving directory '/home/lordaro/dev/openttd/objs/release'
- make: *** [Makefile:56: all] Error 1