Commit Graph

50 Commits (eaae0bb5e71b237cc1fe1388ab74e6bd3aa0c69e)

Author SHA1 Message Date
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
PeterN 64d6ad50f9
Codechange: Split GetItem with GetOrCreateItem. (#10952)
`IniGroup::GetItem()` returns nullptr if the item does not exist, but does not if the create parameter is set to true. Resolve CodeQL warnings with `GetOrCreateItem()` which returns a reference to the item instead.
1 year ago
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 1 year ago
Rubidium d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
Rubidium 43c65a3fec Codechange: use std::string for base media filename/warning storage 1 year ago
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 1 year ago
rubidium42 6ba55e663e Codechange: do not hide variables with other variables 1 year ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
rubidium42 8c2e3a004e Codechange: [Network] Do not leak os_abstraction.h via base_media_func.h 3 years ago
Michael Lutz b408fe77f7 Codechange: Use std::string in file scanners. 3 years ago
Michael Lutz dd138fc460 Codechange: Stringify config file paths. 3 years ago
frosch cc1679e317 Codechange: Apple LLVM fails to implement std::optional::value() also on pretty recent version. Use operator* instead. 4 years ago
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 4 years ago
Michael Lutz 715aa67a9c Codechange: Use std::string in INI file parsing. 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Berbe 04c74355ba Fix: IniLoadFile::LoadFromDisk expects filename but BaseMedia::AddFile provided full path (#7348) 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Charles Pigott 5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 6 years ago
Alberth 1a5a95aa49 Fix: Make switch on MD5File::ChecksumResult complete to avoid compiler warning 6 years ago
Niels Martin Hansen 5ab06ef8a3 Fix: Don't complain if CAT music files are missing entirely
Just complain if an index into a CAT file that exists is invalid.
6 years ago
Charles Pigott 5c5267726f Fix: Warning about base set template instantiations with clang 6 years ago
rubidium 29c2e73ba6 (svn r26637) -Fix [FS#6038]: segmentation fault when encountering a .obg/.obs/.obm with empty string/zero length/ MD5 checksums 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium d336bf65df (svn r26073) -Cleanup: unneeded check against NULL 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
rubidium 945469f993 (svn r24870) -Change: make the duplicate base set message slightly more verbose, and mention files with wrong md5 checksums or files that are missing explicitly 12 years ago
frosch c9bcc42aa6 (svn r24496) -Fix [FS#5276]: Make sure all template functions are instantiated by at least one compilation unit. 12 years ago
yexo fe31aa28c4 (svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro) 12 years ago
michi_cc a9b6c5cd86 (svn r23886) -Codechange: Allow limiting the MD5 file hash to the first x bytes of the file. 13 years ago
rubidium 2b897b4fa0 (svn r23219) -Change: different directories for basesets and newgrfs. So data to baseset or newgrf, and gm to baseset 13 years ago
rubidium 15f671279d (svn r23214) -Codechange: for base media sets pass the "search in tars" parameter to determine what to do 13 years ago
rubidium 414c397000 (svn r22904) -Codechange: add tar filename to file scanning 13 years ago
rubidium 05300a00b1 (svn r22824) -Codechange: pass sub directory to ini loading 13 years ago
rubidium ff143c6708 (svn r22413) -Document: even more stuff 13 years ago
rubidium 6c9078fd30 (svn r21844) -Codechange: move documentation towards the code to make it more likely to be updates [a-c]. 14 years ago
rubidium 5e08df7689 (svn r20607) -Fix: retain information about all base sets that are found and not only the latest version. This to stop confusing people that use newer versions of the base sets than those available via BaNaNaS. 14 years ago
rubidium 83e40b8ced (svn r19674) -Fix [FS#3774]: crash when the music/graphics metadata files were unreadable 14 years ago
yexo 3b9da089e5 (svn r19212) -Fix: base graphics set with an empty filename in the obg file caused segfaults 14 years ago
rubidium 03e5434e63 (svn r19206) -Add: concept of fallback base sets, i.e. do not automatically load the NoMusic/NoSound sets when there is another set 14 years ago
alberth 33a96b5ef3 (svn r19132) -Codechange: No need to end a line with ;;. 15 years ago
yexo f709290220 (svn r19095) -Fix: segfault when a baseset has an empty metadata field 15 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 a8d6d18b22 (svn r18608) -Change: add the concept of music sets 15 years ago
rubidium d5d2354296 (svn r17790) -Feature: translatable base sound/graphics set descriptions 15 years ago
rubidium 984efae368 (svn r17291) -Fix [FS#3147]: crash after upgrading base graphics/sound set when opening the game options menu and you were using the upgraded set 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 2fd1b000e5 (svn r17241) -Change: make a distinction between missing and corrupted data files. If (at least) one data file is missing do not consider the set to be useable. Do also no autodetect sets with missing files. 15 years ago
rubidium f118932643 (svn r17133) -Codechange: generalise the code that searches for base graphics 15 years ago