Merge commit 'f1dfa661a1898cde06a38ab4cb230c95912b245b' into jgrpp-beta

# Conflicts:
#	src/lang/estonian.txt
#	src/lang/hungarian.txt
#	src/network/core/game_info.cpp
#	src/network/core/game_info.h
#	src/network/core/packet.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/string_func.h
This commit is contained in:
Jonathan G Rennison
2021-09-18 22:10:04 +01:00
47 changed files with 525 additions and 350 deletions

View File

@@ -300,6 +300,17 @@ void SetDParamStr(uint n, const char *str)
SetDParam(n, (uint64)(size_t)str);
}
/**
* This function is used to "bind" the C string of a std::string to a OpenTTD dparam slot.
* The caller has to ensure that the std::string reference remains valid while the string is shown.
* @param n slot of the string
* @param str string to bind
*/
void SetDParamStr(uint n, const std::string &str)
{
SetDParamStr(n, str.c_str());
}
/**
* Shift the string parameters in the global string parameter array by \a amount positions, making room at the beginning.
* @param amount Number of positions to shift.