Commit Graph

133 Commits (e04d43f396edc3d9e8353268a96327df9ed9dc23)

Author SHA1 Message Date
Rubidium e04d43f396 Remove: now unused stredup 12 months ago
Rubidium 48dcb79145 Cleanup: remove seprintf and vsnprintf 1 year ago
Rubidium 97dd84d1e0 Codechange: move saveload string fixing code to saveload 1 year ago
Rubidium e762855201 Cleanup: remove str_strip_colours; StrMakeValid also removes the colours
Essentially str_strip_colours followed by StrMakeValid makes the calling of
str_strip_colours useless, as StrMakeValid would have removed them too.
1 year ago
Rubidium 4ca23a19b6 Cleanup: char-pointer variant of strtolower 1 year ago
Rubidium ce8933d63e Add: std::back_insert_iterator<std::string> Utf8Encode function 1 year ago
Rubidium 6a519f5d89 Cleanup: strecat has no uses anymore 1 year ago
Rubidium acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 1 year ago
Rubidium d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 1 year ago
Peter Nelson 83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 1 year ago
Patric Stout febe394806
Codechange: replace C-style strings with C++-style strings in textfile (#10772) 1 year ago
Rubidium a312a6c1b2 Codechange: make md5sumToString std::string compatible 1 year ago
Rubidium ee9239d293 Fix c8299304: retain support ICU < 65 1 year ago
Rubidium c829930440 Codechange: replace strnatcmp with C++ string capable version 1 year ago
Rubidium b5f96808a1 Fix: FormatArrayAsHex returns gibberish instead of a hex array 1 year ago
Rubidium 4dd5f994be Codechange: replace strncasecmp with case ignoring variant of StrStarts/EndsWith 1 year ago
Rubidium 86786a7af6 Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp 1 year ago
Rubidium 9fe853f7b5 Codechange: use fmt::format instead of vseprintf for midi command formatting 1 year ago
Rubidium c8ff6a9f7c Codechange: replace str_fmt with std::string constructs 1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
Rubidium 71b46db8d0 Cleanup: remove commented out code 1 year ago
Rubidium b951332def Codechange: use smart pointers when creating StringIterators 1 year ago
hallonsoda79 0d51460f27
Fix #10023: Allow negative input in text fields when needed (#10112) 2 years ago
Michael Lutz a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
rubidium42 fed3e3305f Codechange: add function to determine whether are string starts or ends with a given other string 3 years ago
rubidium42 b4aedef848 Codechange: add std::string variant of Utf8StringLength 3 years ago
Patric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
3 years ago
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 3 years ago
rubidium42 f00564eeb2
Fix: String validation could leave invalid Utf8 encoded strings (#9096)
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened.
Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
3 years ago
rubidium42 5202869f0f Add: String functionality to trim spaces from C-style strings 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Michael Lutz 024a3f6259 Codechange: Use automatic memory management for language pack reading. 4 years ago
Michael Lutz 0c6e8a8123 Codechange: Store file search paths as std::string. 4 years ago
Marcus Calhoun-Lopez eeed3a7613 Fix: unbreak building with ICU on macOS
A symbol clash breaks building ICU on macOS, and although it isn't
necessary, it might as well be possible.
4 years ago
Michael Lutz 715aa67a9c Codechange: Use std::string in INI file parsing. 4 years ago
Michael Lutz c082f570ce Codechange: Use std::string when translating TTDP NewGRF string codes. 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz fbc4cef180 Codechange: Use override specifier for text layout classes. 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Patric Stout 36105841b9 Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
5 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
Michael Lutz 4bf216993a Add: [OSX] Native text caret handling. 6 years ago
Michael Lutz 8d7cd6a526 Add: [OSX] Native natural sort implementation. 6 years ago