Merge branch 'master' into jgrpp

# Conflicts:
#	src/3rdparty/squirrel/include/squirrel.h
#	src/blitter/32bpp_sse_func.hpp
#	src/bridge_map.h
#	src/clear_map.h
#	src/company_manager_face.h
#	src/console_func.h
#	src/core/bitmath_func.hpp
#	src/core/endian_func.hpp
#	src/core/random_func.hpp
#	src/depot_map.h
#	src/elrail_func.h
#	src/fontcache.h
#	src/industry_map.h
#	src/map_func.h
#	src/newgrf_spritegroup.h
#	src/object_map.h
#	src/rail.h
#	src/rail_map.h
#	src/road_func.h
#	src/road_map.h
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/sl/oldloader.h
#	src/sprite.h
#	src/spritecache.h
#	src/station_func.h
#	src/station_map.h
#	src/story_base.h
#	src/strings_func.h
#	src/tile_cmd.h
#	src/tile_map.h
#	src/tile_type.h
#	src/town.h
#	src/town_map.h
#	src/tree_map.h
#	src/tunnel_map.h
#	src/tunnelbridge_map.h
#	src/vehicle_func.h
#	src/viewport_func.h
#	src/void_map.h
#	src/water.h
#	src/water_map.h
#	src/widget_type.h
This commit is contained in:
Jonathan G Rennison
2024-01-07 15:00:16 +00:00
106 changed files with 1080 additions and 1080 deletions

View File

@@ -96,7 +96,7 @@ struct CaseInsensitiveComparator {
* @return true if the buffer starts with the terminating null-character or
* if the given pointer points to nullptr else return false
*/
static inline bool StrEmpty(const char *s)
inline bool StrEmpty(const char *s)
{
return s == nullptr || s[0] == '\0';
}
@@ -108,7 +108,7 @@ static inline bool StrEmpty(const char *s)
* @param maxlen The maximum size of the buffer
* @return The length of the string
*/
static inline size_t ttd_strnlen(const char *str, size_t maxlen)
inline size_t ttd_strnlen(const char *str, size_t maxlen)
{
const char *t;
for (t = str; (size_t)(t - str) < maxlen && *t != '\0'; t++) {}
@@ -124,7 +124,7 @@ size_t Utf8Encode(std::back_insert_iterator<std::string> &buf, char32_t c);
size_t Utf8TrimString(char *s, size_t maxlen);
static inline char32_t Utf8Consume(const char **s)
inline char32_t Utf8Consume(const char **s)
{
char32_t c;
*s += Utf8Decode(&c, *s);
@@ -132,7 +132,7 @@ static inline char32_t Utf8Consume(const char **s)
}
template <class Titr>
static inline char32_t Utf8Consume(Titr &s)
inline char32_t Utf8Consume(Titr &s)
{
char32_t c;
s += Utf8Decode(&c, &*s);
@@ -144,7 +144,7 @@ static inline char32_t Utf8Consume(Titr &s)
* @param c Unicode character.
* @return Length of UTF-8 encoding for character.
*/
static inline int8_t Utf8CharLen(char32_t c)
inline int8_t Utf8CharLen(char32_t c)
{
if (c < 0x80) return 1;
if (c < 0x800) return 2;
@@ -163,7 +163,7 @@ static inline int8_t Utf8CharLen(char32_t c)
* @param c char to query length of
* @return requested size
*/
static inline int8_t Utf8EncodedCharLen(char c)
inline int8_t Utf8EncodedCharLen(char c)
{
if (GB(c, 3, 5) == 0x1E) return 4;
if (GB(c, 4, 4) == 0x0E) return 3;
@@ -176,7 +176,7 @@ static inline int8_t Utf8EncodedCharLen(char c)
/* Check if the given character is part of a UTF8 sequence */
static inline bool IsUtf8Part(char c)
inline bool IsUtf8Part(char c)
{
return GB(c, 6, 2) == 2;
}
@@ -188,14 +188,14 @@ static inline bool IsUtf8Part(char c)
* @note The function should not be used to determine the length of the previous
* encoded char because it might be an invalid/corrupt start-sequence
*/
static inline char *Utf8PrevChar(char *s)
inline char *Utf8PrevChar(char *s)
{
char *ret = s;
while (IsUtf8Part(*--ret)) {}
return ret;
}
static inline const char *Utf8PrevChar(const char *s)
inline const char *Utf8PrevChar(const char *s)
{
const char *ret = s;
while (IsUtf8Part(*--ret)) {}
@@ -210,7 +210,7 @@ size_t Utf8StringLength(const std::string &str);
* @param c The character to test.
* @return True if the character is a lead surrogate code point.
*/
static inline bool Utf16IsLeadSurrogate(uint c)
inline bool Utf16IsLeadSurrogate(uint c)
{
return c >= 0xD800 && c <= 0xDBFF;
}
@@ -220,7 +220,7 @@ static inline bool Utf16IsLeadSurrogate(uint c)
* @param c The character to test.
* @return True if the character is a lead surrogate code point.
*/
static inline bool Utf16IsTrailSurrogate(uint c)
inline bool Utf16IsTrailSurrogate(uint c)
{
return c >= 0xDC00 && c <= 0xDFFF;
}
@@ -231,7 +231,7 @@ static inline bool Utf16IsTrailSurrogate(uint c)
* @param trail Trail surrogate code point.
* @return Decoded Unicode character.
*/
static inline char32_t Utf16DecodeSurrogate(uint lead, uint trail)
inline char32_t Utf16DecodeSurrogate(uint lead, uint trail)
{
return 0x10000 + (((lead - 0xD800) << 10) | (trail - 0xDC00));
}
@@ -241,7 +241,7 @@ static inline char32_t Utf16DecodeSurrogate(uint lead, uint trail)
* @param c Pointer to one or two UTF-16 code points.
* @return Decoded Unicode character.
*/
static inline char32_t Utf16DecodeChar(const uint16_t *c)
inline char32_t Utf16DecodeChar(const uint16_t *c)
{
if (Utf16IsLeadSurrogate(c[0])) {
return Utf16DecodeSurrogate(c[0], c[1]);
@@ -256,7 +256,7 @@ static inline char32_t Utf16DecodeChar(const uint16_t *c)
* @return true iff the character is used to influence
* the text direction.
*/
static inline bool IsTextDirectionChar(char32_t c)
inline bool IsTextDirectionChar(char32_t c)
{
switch (c) {
case CHAR_TD_LRM:
@@ -273,7 +273,7 @@ static inline bool IsTextDirectionChar(char32_t c)
}
}
static inline bool IsPrintable(char32_t c)
inline bool IsPrintable(char32_t c)
{
if (c < 0x20) return false;
if (c < 0xE000) return true;
@@ -288,7 +288,7 @@ static inline bool IsPrintable(char32_t c)
* @return a boolean value whether 'c' is a whitespace character or not
* @see http://www.fileformat.info/info/unicode/category/Zs/list.htm
*/
static inline bool IsWhitespace(char32_t c)
inline bool IsWhitespace(char32_t c)
{
return c == 0x0020 /* SPACE */ || c == 0x3000; /* IDEOGRAPHIC SPACE */
}