Alexander Wilms
|
1b85abb508
|
Use auto instead of redundant type in initializations using new
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > 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 = line.split(":")[1].strip()
if "new " in original_code:
cpp_type = original_code.split(" ")[0]
if original_code.count(cpp_type) == 2:
print()
print(path)
print(original_code)
new_code = "auto "+" ".join(original_code.split(" ")[1:])
print(new_code)
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-16 21:40:53 +00:00 |
|
Alexander Wilms
|
f3277b7953
|
Define each identifier in a dedicated statement
|
2024-01-10 00:22:23 +00:00 |
|
Alexander Wilms
|
f01ec55d21
|
Use the "nullptr" literal.
"nullptr" should be used to denote the null pointer
|
2023-10-27 18:18:59 +00:00 |
|
nordsoft
|
c73c9d773c
|
Fix issue with impossible room ready status
|
2023-09-24 03:15:10 +02:00 |
|
nordsoft
|
0db51e0517
|
Minor fixes for lobby
|
2023-09-09 10:59:29 +02:00 |
|
nordsoft
|
96d244a315
|
Fix compiling
|
2023-09-03 18:28:22 +04:00 |
|
nordsoft
|
1f9bec32a1
|
Maybe ununsed
|
2023-09-03 17:55:16 +04:00 |
|
nordsoft
|
b0105e8a3a
|
Channels support
|
2023-09-03 16:47:34 +04:00 |
|
nordsoft
|
ef853ab96d
|
Move chat logic to separate class
|
2023-09-03 03:05:48 +04:00 |
|
nordsoft
|
d0b3567447
|
Advanced chat
|
2023-09-03 01:46:25 +04:00 |
|
nordsoft
|
75258baefc
|
Chat minor improvements
|
2023-09-02 22:53:44 +04:00 |
|
krs
|
fdfcab1210
|
CModListView, firstlaunch and lobby strings reviewed
|
2023-03-31 19:24:06 +03:00 |
|
Ivan Savenko
|
bafe0c42ce
|
Merge pull request #1293 from IvanSavenko/translate_launcher
Translations support - Launcher
|
2023-01-17 23:05:14 +02:00 |
|
nordsoft
|
1ef9610e30
|
Remove irrelevant comment
|
2023-01-16 20:58:19 +04:00 |
|
nordsoft
|
da085b0058
|
Code review tweaks
|
2023-01-16 20:58:19 +04:00 |
|
nordsoft
|
2cce15efbe
|
Automatic mod conflict resolution
|
2023-01-16 20:58:19 +04:00 |
|
nordsoft
|
a2e358876c
|
Health check fix
|
2023-01-16 20:58:19 +04:00 |
|
nordsoft
|
14fc1c3f26
|
Cosmetic changes
|
2023-01-16 20:58:19 +04:00 |
|
nordsoft
|
8e1d8f835a
|
Implemented support of protocol 4
|
2023-01-16 20:58:19 +04:00 |
|
Ivan Savenko
|
192e856797
|
merge with vcmi/develop
|
2023-01-11 16:47:53 +02:00 |
|
Ivan Savenko
|
8010bff866
|
Formatting
|
2022-12-29 16:37:38 +02:00 |
|
Ivan Savenko
|
cd6a894417
|
Call method from parent class after processing event
|
2022-12-28 17:58:39 +02:00 |
|
Ivan Savenko
|
2687b7af7f
|
Increased default width of lobby room creation window
|
2022-12-28 12:28:59 +02:00 |
|
Ivan Savenko
|
1696db8a3c
|
Launcher translation upgrade, still WIP:
- launcher can be re-translated without restart
- mod info (name/description/etc) can have localized versions
|
2022-12-25 13:19:16 +02:00 |
|
Ivan Savenko
|
9e4cef015d
|
Initial test version of selectable translations for launcher.
|
2022-12-19 19:12:44 +02:00 |
|
Ivan Savenko
|
3219e322ae
|
Fixed all non-silenced gcc/clang warnings
|
2022-12-07 18:05:47 +02:00 |
|
nordsoft
|
98d59eb221
|
Added more comments
|
2022-11-29 19:42:09 +04:00 |
|
nordsoft
|
b9ef95be3e
|
Extend protocol
|
2022-11-27 05:35:05 +04:00 |
|
nordsoft
|
63a402a7fa
|
Some ui improvements
|
2022-11-27 03:41:06 +04:00 |
|
nordsoft
|
6ab8fccc60
|
Fix crash
|
2022-11-17 05:06:23 +04:00 |
|
nordsoft
|
ddebf85665
|
try to fix mxe
|
2022-11-17 04:30:43 +04:00 |
|
nordsoft
|
33575e5ce2
|
Try to fix mxe build
|
2022-11-17 04:05:44 +04:00 |
|
nordsoft
|
05e4188908
|
Support mod list
|
2022-11-17 03:15:26 +04:00 |
|
nordsoft
|
4527bd1a61
|
Disconnection on error
|
2022-11-16 23:53:54 +04:00 |
|
nordsoft
|
179cdee424
|
Improve online lobby visual
|
2022-11-16 23:28:21 +04:00 |
|
nordsoft
|
20573073c9
|
Some tweaks
|
2022-11-16 04:42:43 +04:00 |
|
nordsoft
|
15ba4cda70
|
Cosmetic improvements for lobby
|
2022-11-16 04:22:48 +04:00 |
|
nordsoft
|
8d6a2e4383
|
Fix indentation
|
2022-11-15 22:09:47 +04:00 |
|
nordsoft
|
50a157bfd2
|
support encoding
|
2022-11-15 22:09:47 +04:00 |
|
nordsoft
|
a45fb910af
|
Try to fix mxe build
|
2022-11-15 22:09:46 +04:00 |
|
nordsoft
|
0a149ba73b
|
Fix launcher crash at close
|
2022-11-15 22:09:46 +04:00 |
|
nordsoft
|
f0ac73b217
|
Fix(?) mxe lobby
|
2022-11-15 22:09:46 +04:00 |
|
nordsoft
|
d691925b1f
|
Try to do some fixes
|
2022-11-11 00:02:00 +04:00 |
|
nordsoft
|
81a0ac2398
|
Lobby refactoring and changes
|
2022-11-10 04:20:44 +04:00 |
|
nordsoft
|
57dfeb2ff2
|
Remove excessive code
|
2022-11-08 05:03:33 +04:00 |
|
nordsoft
|
97e5fc8a07
|
Lobby works
|
2022-11-08 04:44:34 +04:00 |
|
nordsoft
|
7b6d9c23b3
|
Attempt to pass lobby parameters as command line arguments
|
2022-11-07 13:44:58 +04:00 |
|
nordsoft
|
410c402dd6
|
Try to fix windows encoding
|
2022-10-30 22:53:05 +04:00 |
|
nordsoft
|
ecfa568774
|
Minor fixes for lobby
|
2022-10-30 22:50:16 +04:00 |
|
nordsoft
|
d8641324a3
|
Try to fix mxe build
|
2022-10-29 21:49:30 +04:00 |
|