1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Open-source engine for Heroes of Might and Magic III
Go to file
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
.github Bump actions/checkout from 3 to 4 2024-01-16 04:21:56 +00:00
AI Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
android Android launcher Spanish folder fix 2024-01-10 11:31:29 +01:00
CI Renamed 'mingw-ubuntu' to 'mingw' to avoid confusion 2023-12-16 14:01:13 +02:00
client Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
cmake_modules Bump version to 1.4.2 2023-12-20 16:27:18 +02:00
config Fixed Reverse-Assignment of Dungeon Hero Classes 2024-01-09 02:21:14 +01:00
debian Set 1.4.2 release date to 25th December 2023-12-24 19:29:33 +02:00
docs Make CI badge link to scheduled builds 2024-01-15 12:24:04 +00:00
include CLoggerBase: Use IvanSavenko's single-statement macro so that ct100 is not immediately destroyed 2024-01-14 14:48:48 +00:00
ios Move ccache wrappers for macOS and iOS builds to apple/ dir 2023-10-06 21:08:45 +02:00
launcher Use auto instead of redundant type in initializations using new 2024-01-16 21:40:53 +00:00
lib Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
lib_server Yet another attempt to fix Windows compile: 2022-12-06 18:35:24 +02:00
mapeditor Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
Mods/vcmi Merge pull request #3476 from kdmcser/develop 2024-01-12 21:54:22 +02:00
osx Update VCMI icon (#2672) 2023-09-01 22:36:32 +03:00
rpm Update RPM spec 2020-05-05 18:44:42 +10:00
scripting Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
scripts/lib vcmi: remove TFaction 2023-04-10 19:28:16 +03:00
server Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
test Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
win Update vcpkg, fix QT paths 2022-09-24 10:53:09 +03:00
xcode Move ccache wrappers for macOS and iOS builds to apple/ dir 2023-10-06 21:08:45 +02:00
.gitattributes Fix links 2023-09-07 11:04:01 +03:00
.gitignore Ignore compile_commands.json 2024-01-02 21:57:27 +01:00
.gitmodules vcmi: new commits in submodules 2023-04-27 20:59:55 +03:00
.travis.yml Squashing editor 2022-09-18 03:23:17 +04:00
AUTHORS.h AUTHORS.h: Global variables should be const. 2023-10-27 14:29:34 +00:00
CCallback.cpp Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
CCallback.h Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
ChangeLog.md Updated changelog with latest changes 2023-12-24 19:29:33 +02:00
CMakeLists.txt Try to work around macOS CPack error 2024-01-15 13:00:41 +00:00
CMakePresets.json Merge branch 'develop' of https://github.com/vcmi/vcmi into windows_mingw_cmake_presets 2024-01-01 22:53:19 +01:00
conanfile.py [Conan] add validate method to catch incorrect combination of options 2023-03-02 12:09:49 +03:00
fuzzylite.pc.in Upgrade to fuzzylite 6.0 as a submodule 2017-08-15 16:05:49 +03:00
Global.h Add OpenBSD defines 2023-12-14 10:29:42 +03:00
license.txt convert line endings from CRLF (Windows) to LF (Linux/Unix) 2023-10-19 16:23:21 +02:00
VCMI_global_debug.props Major overhaul of VS related files 2017-08-19 15:58:55 +02:00
VCMI_global_release.props Workaround linker bug, set higher optimization by default 2018-11-17 11:34:39 +01:00
VCMI_global_user.props Major overhaul of VS related files 2017-08-19 15:58:55 +02:00
VCMI_global.props Fix to include vstd/CLoggerBase.h 2017-08-19 13:32:24 +02:00
VCMI_VS15.sln Update project files to Visual Studio 2017 2018-01-13 16:33:49 +01:00
vcmi.workspace Entities redesign and a few ERM features 2021-02-14 19:05:43 +03:00
vcmibuilder [vcmibuilder] fix default destination directory on macOS 2023-04-01 14:25:26 +03:00
Version.cpp.in wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined 2022-09-24 15:55:21 +03:00
Version.h fix MXE build 2022-09-24 15:55:25 +03:00

VCMI Github Downloads Github Downloads Github Downloads Github Downloads

VCMI Project

VCMI is an open-source recreation of Heroes of Might & Magic III engine, giving it new and extended possibilities.

Vanilla town siege in extended window Vanilla town view with radial menu for touchscreen devices Large Spellbook with German translation New widget for Hero selection, featuring Pavillon Town

Latest release

Latest release can be found in Github Releases page. As of right now we plan to have major releases around 3 times per year. Daily builds are still available at builds.vcmi.download but they are not guaranteed to be stable. So we encourage everybody to use them and report found bugs so that we can fix them. Loading saves made with different major version of VCMI is usually not supported, so you may want to finish your ongoing games before updating. Please see corresponding installation guide articles for details for your platform.

Installation guides

Forge Town in battle Asylum town with new creature dialog Ruins town siege Map editor

Documentation and guidelines for players

Documentation and guidelines for game modders

Documentation and guidelines for developers

Development environment setup instructions:

Engine documentation: (NOTE: may be outdated)

Documentation and guidelines for maintainers

VCMI Project source code is licensed under GPL version 2 or later. VCMI Project assets are licensed under CC-BY-SA 4.0. Assets sources and information about contributors are available under following link: https://github.com/vcmi/vcmi-assets

Copyright (C) 2007-2023 VCMI Team (check AUTHORS file for the contributors list)