1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
Alexander Wilms
73019c204d Replace redundant types with auto for the lvalues of template factory functions for smart pointers
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt

import re

with open("redundant_types.txt") as f:
    for line in f:
        line = line.strip()
        path = line.split(":", 1)[0]
        original_code = ":".join(line.split(":")[1:]).strip()

        print()
        print(path)
        print(original_code)
        prefix = "auto "
        if original_code.startswith("static"):
            static = True
        else:
            static = False

        cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
        print(cpp_type)

        if static:
            new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
        else:
            new_code = "auto "+ " ".join(original_code.split(" ")[1:])
        print(new_code)

        if True:
            with open(path, "r") as f:
                filedata = f.read()

            filedata = filedata.replace(original_code, new_code)

            with open(path, "w") as f:
                f.write(filedata)
2024-01-17 12:50:00 +00:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
593b82d178 Removed all references to boost::interprocess library 2023-07-30 20:14:57 +03:00
Ivan Savenko
4d08a131d3 Reorganization of boost filesystem usage
- Removed (most of) boost filesystem namespace usings
- Replaced boost::filesystem::fstream with std::fstream and different
constructor that should be available on any plaftorm
2023-07-28 19:12:04 +03:00
krs
8d407be67f Updated according to Ivan's review. 2023-01-20 15:14:52 +02:00
krs
05971d5bb5 Resource converter changes after review. 2023-01-20 15:14:52 +02:00
krs
774a8e024c Fixed early return in PcxToPng convertor
Convertor would abort if no regular file found, instead of continuing to next item.
2023-01-20 15:14:52 +02:00
krs
8f433d345a Refactored resource Convertor to be more easy on the eyes
Added a little more documentation to functions.
Not using anymore dyrectory_iterator but directory_entry.
Private functions made a little more generic, extracting some parametrers to higher levels.
Export Bitmaps is no longer tied to SPRITES folder.
2023-01-20 15:14:52 +02:00
Ivan Savenko
246281e62a Merged vcmi/beta with vcmi/develop 2023-01-15 17:46:42 +02:00
Andrey Filipenkov
2f14914120 fix Boost deprecation warnings
warnings introduced in v1.81

# Conflicts:
#	mapeditor/resourceExtractor/ResourceConverter.cpp
2023-01-15 17:28:09 +02:00
Ivan Savenko
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
krs
117496cb23 PCX file conversion in Resource Extractor throws exception on IOS (boost::locale stuff) 2022-12-06 00:49:39 +02:00
krs
c32cd190f2 ResourceExtractor code moved to a static class. 2022-11-27 19:35:11 +02:00
krs
9b3cab1181 IVCMIDirs::userExtractedPath() created 2022-11-27 19:35:11 +02:00
krs
14b031118c exportBitmaps now uses QT libs 2022-11-27 19:35:11 +02:00
krs
ec1a995218 export bitmaps now by default prepends def name to exported PNG 2022-11-27 19:35:11 +02:00
krs
75b4b64b6f Final checks according to review 2022-11-27 19:35:11 +02:00
krs
d516a5f529 More changes following review. 2022-11-27 19:35:10 +02:00
krs
eecaa20693 Resource extractor "enablers" are now command line options
In VCMI_lib the extractArchives will be passed all the way down the call chain!
2022-11-27 19:35:10 +02:00
krs
cca1f074bf Convert PCX to PNG, Final touches, everything deactivated. 2022-11-27 19:35:10 +02:00
krs
10ec486251 Extractor moved to Editor 2022-11-27 19:35:10 +02:00