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

27 Commits

Author SHA1 Message Date
Ivan Savenko
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Alexander Wilms
678cacbd25 Remove more redundant virtual specifiers
`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":",2)
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-13 15:21:30 +01:00
Ivan Savenko
c577ea3e8d Fix potentially uninitialized values 2024-02-12 12:31:27 +02:00
Alexander Wilms
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":")
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
Ivan Savenko
bd4d2788ed Split pathfinder into multiple smaller files 2023-06-21 13:46:09 +03:00
Konstantin
86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
Andrii Danylchenko
eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
Andrey Filipenkov
a1cf120ea6 add missing virtual destructors 2022-09-22 11:54:09 +03:00
Andrii Danylchenko
31c9d6e28d Fix performance issue related to TurnInfo construction 2022-06-06 09:47:37 +03:00
Andrii Danylchenko
d47564955e Nullkiller: fix/refactor temporary bonus nodes, fix gather army quest completion 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
70ed3f55a5 Nullkiller: replace a hack with temporary bonus node concept 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
66843b22d3 Nullkiller: async hero chain calculation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
0265de77fa Nullkiller: fix crash, refactor 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
fb3cda666f Nullkiller: tbb and hero chain calculation optimization and parallel cpathfinder initialization 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
45942cfbbe Nullkiller: stabilization, fix memory leaks 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3822d788e8 Nullkiller: allow buy army through pathfinder 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
5bfe71c8f3 Nullkiller: small optimization of AIPathfinder for big maps 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
1806dd8447 Nullkiller: remove AIhelper + refactoring 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
8f8c5ca255 Nullkiller: initial decomposition 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
17a960e850 Nullkiller: gold preasure and turn variables for priority evaluation. Tweaking building behavior 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
37434dc4cf AI: hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3ffcef30f6 AI: add army cost 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
f44eaf8132 AI: inefective chain cancellation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
0e328ab3c2 AI: hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3a0d9fe14e AI: adding towns and dwellings to hero chain 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9d70b28c9b AI: hero chain basic logic 2021-07-26 21:02:50 +03:00