Anonymous namespaces in header files are bad
They duplicate the code across translation units.
This commit is contained in:
parent
6e717bfd30
commit
e20f92bbbb
@ -12,11 +12,8 @@ namespace osrm
|
||||
namespace util
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
// support old capitalized option names by down-casing them with a regex replace
|
||||
std::string read_file_lower_content(const boost::filesystem::path &path)
|
||||
inline std::string read_file_lower_content(const boost::filesystem::path &path)
|
||||
{
|
||||
boost::filesystem::fstream config_stream(path);
|
||||
std::string ini_file_content((std::istreambuf_iterator<char>(config_stream)),
|
||||
@ -27,6 +24,5 @@ std::string read_file_lower_content(const boost::filesystem::path &path)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // INI_FILE_HPP
|
||||
|
@ -6,9 +6,6 @@
|
||||
// this is largely inspired by boost's hash combine as can be found in
|
||||
// "The C++ Standard Library" 2nd Edition. Nicolai M. Josuttis. 2012.
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template <typename T> void hash_combine(std::size_t &seed, const T &val)
|
||||
{
|
||||
seed ^= std::hash<T>()(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
@ -29,7 +26,6 @@ template <typename... Types> std::size_t hash_val(const Types &... args)
|
||||
hash_val(seed, args...);
|
||||
return seed;
|
||||
}
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user