Merge branch 'master' into jgrpp
# Conflicts: # src/cargotype.h # src/core/CMakeLists.txt # src/core/span_type.hpp # src/fileio.cpp # src/fios.cpp # src/misc/endian_buffer.hpp # src/misc_gui.cpp # src/saveload/saveload.h # src/saveload/vehicle_sl.cpp # src/screenshot.cpp # src/settings.cpp # src/settings_internal.h # src/stdafx.h # src/string_func.h # src/strings.cpp # src/strings_func.h # src/strings_internal.h
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "strgen.h"
|
||||
|
||||
#include <bit>
|
||||
|
||||
#include "../table/strgen_tables.h"
|
||||
|
||||
@@ -109,7 +110,7 @@ LangString *StringData::Find(const std::string_view s)
|
||||
uint StringData::VersionHashStr(uint hash, const char *s) const
|
||||
{
|
||||
for (; *s != '\0'; s++) {
|
||||
hash = ROL(hash, 3) ^ *s;
|
||||
hash = std::rotl(hash, 3) ^ *s;
|
||||
hash = (hash & 1 ? hash >> 1 ^ 0xDEADBEEF : hash >> 1);
|
||||
}
|
||||
return hash;
|
||||
|
Reference in New Issue
Block a user