Commit Graph

41 Commits (c0ec1a2dcc3b31f3f573d0bcfdab28f1d55450a8)

Author SHA1 Message Date
Jonathan G Rennison c0ec1a2dcc Allow passing sub strings with parameters as a parameter 5 months ago
Jonathan G Rennison 4baf2fcf59 Use std::variant for struct StringParameter 5 months ago
Jonathan G Rennison c5b3c18bb5 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_func.h
#	src/core/overflowsafe_type.hpp
#	src/engine.cpp
#	src/music/midifile.cpp
#	src/network/network_command.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_spritegroup.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/road_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/strings.cpp
#	src/table/settings/game_settings.ini
5 months ago
Jonathan G Rennison e2a79f0f32 Codechange: No longer advance parent offset in StringParameters parent mode
Add method to manually advance offset
5 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 5 months ago
Jonathan G Rennison 03e0ec8276 Strong typedef: Use strong typedefs for date, date tick, minutes types
Add delta types
Adjust/add type conversion functions
Add various utility methods on types
Remove the various minute macros
Fix some minute conversion inconsistencies
5 months ago
rubidium42 ae4ba00313 Fix #11521, e404ba0: size for remaining span determined incorrectly
(cherry picked from commit 33ba609290)
6 months ago
rubidium42 33ba609290 Fix #11521, e404ba0: size for remaining span determined incorrectly 6 months ago
Jonathan G Rennison 1de1af08b9
Codechange: Replace AllocatedStringParameters with ArrayStringParameters (#11452)
All uses of AllocatedStringParameters are with a compile-time fixed
constant.
Use of a dynamically allocated buffer on the heap is unnecessary and
increases overhead, particularly due to frequent use as a temporary.
7 months ago
Jonathan G Rennison c4f7794597 Fix ArrayStringParameters with move assignment/construction 7 months ago
Jonathan G Rennison 48e700bc32 Fix type issues with string parameter structs 7 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
7 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
frosch c6f5b57f13
Fix #11297, 4e9a871: SCC_GENDER_LIST tried to determine the gender from the wrong sub-string. (#11299) 9 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 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
11 months ago
Rubidium 3e488465f8 Codechange: allow string temporaries in a StringParameter 11 months ago
Rubidium 4654b2b0aa Codechange: separate integer and string usage in StringParameters 11 months ago
Rubidium 7ad487eeee Cleanup: remove now unused GetInt32/64 functions 11 months ago
Rubidium e7937efb01 Codechange: add clearer named function to get the next (string) parameter 11 months ago
Rubidium 4e9a871718 Codechange: merge multiple string parameter arrays to single array of structs 12 months ago
Rubidium fa8c50758b Codechange: replace memcpy when copying DParams 12 months ago
Rubidium 7a785a4224 Codechange: simplify StringParameters now type cannot be nullptr 12 months ago
Rubidium 428333aeba Codechange: let AllocatedStringParameters allocated types too 12 months ago
Rubidium 88138c55f8 Codechange: make offset protected and guard against invalid offsets 12 months ago
Rubidium 9c3c90effa Codechange: rename ClearTypeInformation so it can be used for preparing for the next run 12 months ago
Rubidium 01abcdfcac Codechange: make StringParameters#next_type only writable from outside the class 12 months ago
Rubidium 3e8f8c55c2 Codechange: make creating temporary StringParameters easier 12 months ago
Rubidium 381e8b69d2 Codechange: make size and offset size_t 12 months ago
Rubidium e404ba0631 Codechange: generify GetRemainingParameters to allow custom offsets 12 months ago
Rubidium 1d902a97ce Codechange: move StringParameters to strings_internal.h 12 months ago
Rubidium 0a5e58451b Codechange: pass string parameters by reference 12 months ago
Rubidium aba0d27a28 Codechange: use StringParameters for remapping the NewGRF string control codes 12 months ago
Rubidium edb21620ea Cleanup: remove unneeded checks on remaining buffer size 1 year ago
Rubidium affceea0ae Codechange: switch StringBuilder to use std::string as backend 1 year ago
Rubidium 4e39a58c59 Codechange: let town name generation use StringBuilder 1 year ago
rubidium42 bfcb027cb9
Fix 2dffa7d: fmt::format_to copies the iterator, so some text does not remain during formatting (#10940) 1 year ago
Rubidium 6a519f5d89 Cleanup: strecat has no uses anymore 1 year ago
Rubidium 36aaa9d683 Codechange: let GetStringWithArgs use StringBuilder 1 year ago
Rubidium 2dffa7d0c6 Codechange: let FormatString use StringBuilder 1 year ago
Rubidium ed51cf117a Add: helper output iterator for formatting strings 1 year ago