Commit Graph

49 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
2 weeks ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison 606d7cd814 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/direction_type.h
#	src/gfx_type.h
#	src/group_gui.cpp
#	src/misc_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/signs_gui.cpp
#	src/slope_func.h
#	src/smallmap_gui.cpp
#	src/terraform_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_gui.cpp
#	src/town_type.h
#	src/vehicle_type.h
#	src/widget_type.h
4 months ago
Patric Stout 6860a86d45
Codechange: remove all u8 prefix in favour of compile-time option (#11807) 4 months ago
Jonathan G Rennison f034714559 Use StringBuilder for GetString/GetStringWithArgs, as per upstream
Update dependent code as required
5 months ago
Jonathan G Rennison 3436e0a781 Merge branch 'master' into jgrpp
# Conflicts:
#	src/error.h
#	src/error_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_gui.cpp
#	src/news_gui.cpp
#	src/rail_cmd.cpp
#	src/saveload/gamelog_sl.cpp
#	src/script/api/script_text.cpp
#	src/script/script_instance.cpp
#	src/statusbar_gui.cpp
#	src/strings.cpp
#	src/strings_func.h
#	src/strings_internal.h
#	src/table/settings/gui_settings.ini
#	src/table/settings/linkgraph_settings.ini
#	src/textbuf_gui.h
6 months ago
Jonathan G Rennison 2313679ee7 Simplify town name duplicate check in VerifyTownName 10 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
10 months ago
Rubidium 3e8f8c55c2 Codechange: make creating temporary StringParameters easier 11 months ago
Rubidium 0a5e58451b Codechange: pass string parameters by reference 11 months ago
Rubidium e32f0aa20b Cleanup: minimum string length for town name generator is not needed anymore 12 months ago
Rubidium affceea0ae Codechange: switch StringBuilder to use std::string as backend 12 months ago
rubidium42 921f5afc4d Codechange: Apply suggestions from code review 12 months ago
Rubidium 2dd2b698d2 Codechange: convert C-style GetTownName API to std::string returning API 12 months ago
Rubidium 4e39a58c59 Codechange: let town name generation use StringBuilder 12 months ago
rubidium42 bfcb027cb9
Fix 2dffa7d: fmt::format_to copies the iterator, so some text does not remain during formatting (#10940) 12 months ago
Rubidium 36aaa9d683 Codechange: let GetStringWithArgs use StringBuilder 12 months ago
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 1 year ago
Jonathan G Rennison 1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
1 year ago
Rubidium 3373128233 Codechange: pass the randomizer directly to the town name generation 1 year ago
Jonathan G Rennison 5ac6ea8cd1 Suppress unitialised warning in GenerateTownNameString on some platforms 3 years ago
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
3 years ago
Charles Pigott dd798d688b
Fix #8919: Release builds with asserts enabled (#8925) 3 years ago
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 3 years ago
Patric Stout 68f9925cd4
Codechange: use \u to indicate unicode chars in strings (#8379)
With \x, we sometimes had to do the "" trick, as the length is not
predefined. With C++11 bringing \u to the specs, which has a preset
length, we no longer need the "" trick.

We set the strings to u8, to ensure all compilers use UTF-8 encoding
for the \u characters.

This was triggered by newer CLangs, which start to warn if you
use "" in the middle of a string, wondering if that was your
intention. It is a good question. And this is our answer :)
3 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
nikolas 4fc1b2baae Fix: Grammar in a bunch of comments (#7054) 5 years ago
frosch bed0370ad1 (svn r27187) -Fix: Code style. 9 years ago
rubidium 6ad6845f8c (svn r26510) -Codechange: use memcpy instead of strncpy in the town name replace word function since we never want to add a '\0' anyway, and we know the exact length too 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
frosch 55502341ac (svn r26346) -Fix [FS#5870]: Call Layouter::ReduceLineCache from GenerateTownName in all cases. 10 years ago
rubidium 9f6b8aea49 (svn r26313) -Codechange: use a set for finding unique town names instead of iterating all just created town names (MJP) 10 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
smatz 597ef4e7b1 (svn r23759) -Fix (r17612)[FS#4951]: the check for duplicate town names wasn't really working 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 13 years ago
rubidium 1a515e6344 (svn r22405) -Document: some more "random-ish" tidbits 13 years ago
yexo 0e17cbc9f8 (svn r22258) -Codechange: introduce a wrapper class to clean up the arguments to FormatString 13 years ago
yexo 12e0f28229 (svn r21440) -Codechange: pass a pointer to just past the end of the argv array around in FormatString and friends 14 years ago
rubidium 5c9c3f1acf (svn r21414) -Codechange: limit town name by amount of characters, not bytes 14 years ago
frosch 478da38d2b (svn r21192) -Fix (r15505)[FS#4226]: Use non-interactive randomness for townnames on map generation, so they are controlled by the generation-seed as well. 14 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
smatz 1da745c9ad (svn r17612) -Feature: possibility to choose (randomise or enter custom) town name before its creation (original patch by Terkhen) 15 years ago
smatz 662ef3173b (svn r17597) -Codechange: rename namegen* to townname* 15 years ago