Commit Graph
145 Commits
Author SHA1 Message Date
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
Ivan Savenko 1a4bcfadbc Actually show extraction progress during mod installation 2023-12-18 00:34:00 +02:00
Ivan Savenko 74dedc4cc5 Converted ZipArchive namespace into stateful class 2023-12-18 00:33:32 +02:00
Ivan Savenko 705718abc1 Do not alter case of mod description 2023-12-10 19:16:45 +02:00
Ivan Savenko c717bb5504 Always convert mod ID to lower case before using it 2023-11-19 20:44:28 +02:00
nordsoft e82df8c726 Better solution 2023-11-07 20:10:07 +02:00
nordsoft f10416be06 Do not show entries without name 2023-11-07 20:09:41 +02:00
Alexander Wilms 9e1629fb40 launcher/modManager/cmodlist.cpp: Member functions that don't mutate their objects should be declared "const" 2023-10-28 16:44:58 +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
Ivan Savenko 7e034814c1 Partially revert "Translation" type changes to avoid breaking mods 2023-10-22 16:51:08 +03:00
Ivan Savenko adf58fa834 Hide not installed translation mods to languages other than selected one 2023-10-22 00:07:21 +03:00
Ivan Savenko b50ebba1ba Added mod type "Compatibility" that is hidden in launcher 2023-10-21 23:55:20 +03:00
nordsoft 75d97e86e4 Show progress for mod extraction 2023-09-19 23:38:00 +02:00
Ivan Savenko f8541d0ae4 Merge branch 'vcmi/master' into 'vcmi/develop' 2023-09-15 13:59:02 +03:00
Ivan Savenko e4aa981925 Add more logging to mod downloading process 2023-09-12 21:15:14 +03:00
nordsoft 18c44fc006 Cache archive files 2023-09-09 10:59:29 +02:00
Nordsoft91 d6ff553cac Fix typo 2023-09-09 02:14:27 +02:00
Ivan Savenko e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00
nordsoft bb4905af48 Change resourceID with ResourcePath 2023-09-08 01:54:29 +02:00
nordsoft 8c94d082c8 Merge remote-tracking branch 'upstream/develop' into launcher-size-support 2023-09-08 01:51:52 +02:00
nordsoft 40ea45498f Rename 2023-09-07 19:57:57 +02:00
Ivan Savenko b85a2f99c1 Quick fix to avoid freeze on Launcher startup / mod repo checkout 2023-09-06 01:11:18 +03:00
Ivan Savenko 6f0108e462 Use ResourcePath for referencing texts and json's 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
Nordsoft91 9af73c2212 Merge pull request #2723 from Nordsoft91/versions-fix
Launcher & lib versions unification
2023-09-02 19:42:46 +04:00
nordsoft 32ad463170 Rename 2023-09-02 14:15:37 +04:00
Nordsoft91andIvan Savenko 348b6b0f32 Update launcher/modManager/cmodlistview_moc.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2023-09-02 14:11:56 +04:00
nordsoft 1ef407ea9f Fixes 2023-09-02 14:10:50 +04:00
nordsoft 4024a44b7e Unify internal units 2023-09-02 00:18:23 +04:00
nordsoft 3ee91ca9dc Support local and download mod size 2023-09-01 18:43:26 +04:00
nordsoft 5875dc6b8f Smarter double-click 2023-09-01 17:40:52 +04:00
nordsoft ea7ab9d5ed Migrate launcher to vcmi versions 2023-09-01 04:12:41 +04:00
nordsoft 31956549e6 Double click behavior 2023-09-01 03:29:50 +04:00
Ivan Savenko 62fddca21e Split massive CModHandler class/file into multiple parts:
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Ivan Savenko 5b812649ee Fix handling of "keepDisabled" option in Launcher 2023-07-22 22:45:39 +03:00
Ivan Savenko eb06c5fa3f Added slightly better layout for "About" screen 2023-07-03 14:34:53 +03:00
Ivan Savenko 21c45bd84f Added new settings to Launcher:
- UI Scaling selection
- Allied AI selection
- Separate main/secondary mod repo
2023-07-03 14:34:53 +03:00
Ivan Savenko 814a4b9455 Partial fix for displaying download progress of mods 2023-07-03 14:34:53 +03:00
Ivan Savenko 1f525c59c3 Remove no longer used code 2023-07-03 14:34:53 +03:00
nordsoft 0782ee7689 Strict weak ordering on the data 2023-05-28 00:12:03 +04:00
Ivan Savenko a9aa751ba0 Fix installation of multiple mods at once, e.g. during setup 2023-04-14 12:47:13 +03:00
nordsoft 49255e5a3f Adjustable layout for launcher 2023-04-10 20:33:02 +04:00
krs fdfcab1210 CModListView, firstlaunch and lobby strings reviewed 2023-03-31 19:24:06 +03:00
Ivan Savenko b1fbc7a2fd Attempt to fix icons size on Mac OS 2023-03-27 22:33:36 +03:00
Ivan Savenko 1d1d31c4e8 Added preset list of mod types for mod list 2023-03-27 22:33:36 +03:00
Ivan Savenko efed2991f2 Show human-readable mod names for list of dependencies 2023-03-27 22:33:36 +03:00
Ivan Savenko 14f8348b9e Show list of supported languages in mod info 2023-03-27 22:33:36 +03:00
Ivan Savenko 5357709b17 Correctly handle scenario of unavailable mod repository 2023-03-27 22:33:36 +03:00
Ivan Savenko 369e925af8 Loading of translation mods is now skipped on language mismatch 2023-03-14 16:02:16 +02:00
Ivan Savenko a062e5e425 - Implemented proposition to install translation mod when necessary 2023-03-14 16:02:16 +02:00