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

117 Commits

Author SHA1 Message Date
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +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
7cf738b20e
Merge pull request #3462 from Laserlicht/trim_text
limit textboxes
2024-01-12 21:53:30 +02:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
Laserlicht
056dccda30
different max width 2024-01-08 00:08:05 +01:00
Laserlicht
24d4816a36
trim text 2024-01-07 23:42:48 +01:00
Laserlicht
8b262e49a6
add sort for changedate 2024-01-07 20:17:44 +01:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Laserlicht
0eba0ee686
show random maps 2023-10-21 02:12:34 +02:00
Laserlicht
ec8580b99e
Merge branch 'develop' into patch-4map_overview_rework 2023-10-02 21:03:16 +02:00
Laserlicht
79e66c38df
layout 2023-09-30 17:14:22 +02:00
Laserlicht
718bafc8af
map overview rework 2023-09-30 15:05:12 +02:00
nordsoft
03c099d4fd First steps 2023-09-27 22:53:13 +02:00
Laserlicht
9cf274362e
small folder optimation 2023-09-12 20:28:54 +02:00
Ivan Savenko
1d0e696db6 Added RenderHandler that acts as factory for images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Michael
e0460a0dec
up should be first 2023-09-02 19:04:06 +02:00
Ivan Savenko
ce20d913e0 Fix checking PlayerColor's for validness 2023-08-27 01:35:38 +03:00
Nordsoft91
4edee00a97
Merge pull request #2605 from Laserlicht/map_preview
Map preview
2023-08-21 14:56:21 +04:00
Michael
05a88bd8ac
another try... 2023-08-20 23:34:09 +02:00
Michael
080630b39f
try to fix 2023-08-20 22:22:46 +02:00
Michael
5c5576313b
handle long texts better; big window also for only one layer 2023-08-20 16:58:13 +02:00
Michael
952ce3061b
avoid crash if any error in map 2023-08-20 14:28:10 +02:00
Michael
e3a4c65100
code review 2023-08-20 14:14:47 +02:00
Michael
1d94536299
code review 2023-08-20 13:16:39 +02:00
Nordsoft91
4a6deedd5e
Merge pull request #2530 from Nordsoft91/tutorial
Support tutorial
2023-08-19 18:06:15 +04:00
Michael
e44f713f01
side by side map; player colors 2023-08-17 23:09:20 +02:00
Michael
edc11fd451
Map preview initial draft 2023-08-17 09:56:50 +02:00
Nordsoft91
96e820ddac
Merge pull request #2517 from Laserlicht/folders 2023-08-17 10:09:37 +04:00
Michael
71bcc611f5
review 2023-08-15 20:19:13 +02:00
Michael
0452dbd80d
remove copy of cropped asset 2023-08-14 23:08:20 +02:00
Michael
92159e57ef
Update SelectionTab.cpp
fix possible -1
2023-08-12 19:51:18 +02:00
Ivan Savenko
f13a53c1d9 Merge remote-tracking branch 'vcmi/beta' into develop 2023-08-12 17:28:47 +03:00
Michael
f0b60cf166
suggestions; use internally uppercase; fix; fullname 2023-08-11 23:56:20 +02:00
Michael
6ca5518ff1
Buxfix 2023-08-11 20:09:41 +02:00
Michael
2d9bb34825
format 2023-08-11 01:49:10 +02:00
Michael
2b093b8850
case handling 2023-08-11 01:46:22 +02:00
Michael
092a0d72a1
whitespace format 2023-08-11 00:19:24 +02:00
Michael
c260ce5814
current folder in first line 2023-08-10 23:52:16 +02:00
Michael
48747eea9d
bigger line for folder 2023-08-10 23:37:19 +02:00
Michael
f24c636d17
code review suggestions 2023-08-10 22:15:32 +02:00
Michael
92fd317a84
erase -> pop_back 2023-08-09 20:27:24 +02:00
nordsoft
f4869cbfb0 Tutorial load game mode 2023-08-09 15:29:48 +04:00
nordsoft
1def98a862 Tutorial implemented 2023-08-09 03:54:09 +04:00
Michael
6013549ef8
no old selection 2023-08-09 00:41:13 +02:00
Michael
8693dab9ec
fix filter 2023-08-09 00:13:02 +02:00
Michael
bbe04c747d
Folder Icon, Save, Folder on top... 2023-08-08 23:46:30 +02:00
Michael
855b94b316
fix 2023-08-08 02:30:28 +02:00
Michael
8b8006c0e0
bring it to work... 2023-08-08 02:04:06 +02:00
Michael
5e1f1294e5
rework 2023-08-08 00:38:13 +02:00