10 #include "util/SimpleRNG.hpp"
15 #include <boost/iostreams/device/mapped_file.hpp>
26 static inline bool compare(std::string file1, std::string file2)
28 boost::iostreams::mapped_file_source f1(file1);
29 boost::iostreams::mapped_file_source f2(file2);
31 if( f1.size() == f2.size() && std::equal(f1.data(), f1.data() + f1.size(), f2.data()) )
43 std::string toString()
45 return std::to_string(R) +
" " + std::to_string(G) +
" " + std::to_string(B);
70 static inline struct RGB getColor(int group, SimpleRNG & d)
74 float s = (float)d.GetUniform();
78 #ifdef ON_IO_UNIT_TESTS
142 else if (group == 10)
148 else if (group == 11)
164 static inline bool hasEnding (std::string
const &fullString, std::string
const &ending)
166 if (fullString.length() >= ending.length())
167 {
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));}