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 |
|
Alexander Wilms
|
f3277b7953
|
Define each identifier in a dedicated statement
|
2024-01-10 00:22:23 +00:00 |
|
Laserlicht
|
cb9c4bbaf0
|
unlimited replay option
|
2023-12-28 20:48:19 +01:00 |
|
Laserlicht
|
a3e27b859e
|
extra option tab
|
2023-12-28 19:41:01 +01:00 |
|
Laserlicht
|
c471b626a2
|
code review
|
2023-12-27 15:26:08 +01:00 |
|
Laserlicht
|
fc4827c89c
|
option for allowing cheats
|
2023-12-27 14:39:35 +01:00 |
|
Ivan Savenko
|
50536e28da
|
Fixed invalid text ID in description of "start with hero" campaign bonus
|
2023-12-23 18:13:31 +02:00 |
|
Ivan Savenko
|
ec1aee68d5
|
Fix invisible chat in pregame. Fixed positioning of chat box
|
2023-12-23 18:12:55 +02:00 |
|
Ivan Savenko
|
37a8c8db8d
|
Workaround for vcmi-extras bug
|
2023-12-22 18:40:29 +02:00 |
|
Ivan Savenko
|
fe5918ebf5
|
Clients will now switch to turn options when host does so
|
2023-12-22 18:40:28 +02:00 |
|
Ivan Savenko
|
76cb5387c5
|
Access CHero in a way that will throw exception on invalid access
instead of crash
|
2023-12-13 16:50:56 +02:00 |
|
Ivan Savenko
|
edbe25b33a
|
Updated layout and localizations
|
2023-12-07 16:36:44 +02:00 |
|
Ivan Savenko
|
861c53059e
|
Added callbacks for preset dropdowns
|
2023-12-07 13:57:16 +02:00 |
|
Ivan Savenko
|
653304b004
|
Implemented accumulating timers, rename creature timer to unit timer
|
2023-12-07 13:57:16 +02:00 |
|
Ivan Savenko
|
02f7193260
|
Fix regression from map translation - properly translate custom main
hero name
|
2023-11-27 20:27:10 +02:00 |
|
Ivan Savenko
|
e5e01ab35d
|
Disable spectator mode in single player to avoid confusing players
|
2023-11-20 14:38:57 +02:00 |
|
Ivan Savenko
|
13763cad8e
|
Remove few more implicit conversions
|
2023-11-15 15:55:19 +02:00 |
|
Ivan Savenko
|
0842f5afee
|
Removed remaining usages of std::vector<bool>
|
2023-11-15 15:55:18 +02:00 |
|
Ivan Savenko
|
f65f4b1285
|
Disable new UI if enhancements are off
|
2023-11-13 19:49:41 +02:00 |
|
Ivan Savenko
|
d1ae5bbee5
|
Implement AI simturns checkbox
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
c5eeaa6526
|
Added non-linear slider for better simturn duration selection
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
7d54f6a9c0
|
Implemented basic support for plural forms in translations
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
e160b8557b
|
Implement min/max simturns callbacks
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
32633d5f52
|
Initial version of Turn Options tab screen
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
3268ebe27c
|
Moved some code from OptionTab to separate class, OptionTabBase
|
2023-11-13 19:06:56 +02:00 |
|
Ivan Savenko
|
59806bf112
|
Fix right-click tooltips for starting hero/towns
|
2023-11-12 17:17:07 +02:00 |
|
Ivan Savenko
|
86a3806bec
|
MetaString refactor to eliminate integer usage for identifiers
- entity names are now stored and serialized as text ID's
- added helper methods for convenience to get entities names to
metastring
|
2023-11-07 22:47:10 +02:00 |
|
Tomasz Zieliński
|
c909bd766e
|
Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
# lib/rmg/CMapGenOptions.cpp
# lib/rmg/CMapGenOptions.h
|
2023-11-07 20:54:04 +01:00 |
|
Andrii Danylchenko
|
0927d3e3e8
|
Merge pull request #3145 from vcmi/fix-3142
#3142 - fi custom campaign selection screen
|
2023-11-05 11:12:58 +02:00 |
|
Andrii Danylchenko
|
d50ebd7d58
|
#3142 - fi custom campaign selection screen
|
2023-11-04 14:34:18 +02:00 |
|
Ivan Savenko
|
8d5fa41a19
|
Minor fixes
|
2023-11-03 16:03:29 +02:00 |
|
Ivan Savenko
|
10e50548e7
|
Converted Component class to use VariantIdentifier instead of int
|
2023-11-02 12:00:04 +02:00 |
|
Tomasz Zieliński
|
6e7b68d0e6
|
Unused variable, unused code
|
2023-10-30 21:33:49 +01:00 |
|
Tomasz Zieliński
|
e105b23a37
|
Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
# Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON
# Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON
# Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON
# client/lobby/RandomMapTab.cpp
|
2023-10-30 20:08:13 +01:00 |
|
Tomasz Zieliński
|
f39edf9413
|
Update ally and enemy flags when selecting new template
|
2023-10-30 07:48:51 +01:00 |
|
Tomasz Zieliński
|
4f2cde018c
|
Fixed most of reported issues, removed unused code.
|
2023-10-29 21:25:39 +01:00 |
|
Ivan Savenko
|
0169c65937
|
Merge pull request #3100 from IvanSavenko/split_net_packs
Split netpacks.h into multiple files
|
2023-10-29 13:46:40 +02:00 |
|
Tomasz Zieliński
|
368a185008
|
Cleaning up the code
|
2023-10-29 10:05:24 +01:00 |
|
Tomasz Zieliński
|
07dac8b6d4
|
Works more or less
|
2023-10-28 20:30:38 +02:00 |
|
Nordsoft91
|
8f2b50a5e2
|
Merge pull request #3095 from Laserlicht/team_alignment
fix team alignments
|
2023-10-26 23:19:18 +02:00 |
|
Tomasz Zieliński
|
a817e481d0
|
Merge fix
|
2023-10-26 10:46:04 +02:00 |
|
Tomasz Zieliński
|
36911d1e0a
|
Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
# client/lobby/RandomMapTab.cpp
|
2023-10-26 10:31:41 +02:00 |
|
Laserlicht
|
e28d14d16d
|
not needed anymore
|
2023-10-24 18:56:30 +02:00 |
|
Laserlicht
|
abb279f5b4
|
use config
|
2023-10-24 18:51:58 +02:00 |
|
Ivan Savenko
|
5523f05284
|
Moved ArtifactLocation to a separate file
|
2023-10-23 19:02:28 +03:00 |
|
Ivan Savenko
|
b88a8da4e8
|
Split off some netpack structures into separate files
|
2023-10-23 13:59:15 +03:00 |
|
Ivan Savenko
|
a70ad7202f
|
Merge pull request #3088 from Laserlicht/non_squared
Minimap keep aspect ratio (Letterboxing)
|
2023-10-22 16:55:58 +03:00 |
|
Laserlicht
|
b67548e7cf
|
format
|
2023-10-22 15:06:12 +02:00 |
|
Laserlicht
|
7b370d1967
|
fix team alignments
|
2023-10-22 15:00:04 +02:00 |
|
Ivan Savenko
|
8752551786
|
Merge pull request #3086 from Laserlicht/show_random
show random maps
|
2023-10-22 12:29:31 +03:00 |
|