Commit graph

9 commits

Author SHA1 Message Date
phosit
153dfe7ef1
Don't use g_GUI in TurnManager
The turn-manager shouldn't know about the gui.
2026-01-23 21:05:14 +01:00
phosit
ba2351611c
Remove LoadScripts from CSimualation2
`LoadScripts` and `LoadDefaultScripts` have to be called imediately
after the `CSimulation2` constructor.

By doing the necesarry work in the constructor and removing
`LoadScripts` and `LoadDefaultScripts` the interface of `CSimulation2`
is simplified.
2026-01-01 17:27:54 +01:00
phosit
3c9b4b922e
Make getCameraProperty a lambda
A lambda is more explicit which argument it takes.
2025-11-18 20:02:06 +01:00
Ralph Sennhauser
66738c12a1
Suppress false positive in cppcheck
```
source/simulation2/components/CCmpRangeManager.cpp:1953:18: error: Out of bounds access in 'm_LosRevealAll[MAX_LOS_PLAYER_ID+1]', if 'm_LosRevealAll' size is 16 and 'MAX_LOS_PLAYER_ID+1' is 17 [containerOutOfBounds]
   m_LosRevealAll[MAX_LOS_PLAYER_ID+1] = enabled;
                 ^
source/simulation2/components/CCmpRangeManager.cpp:1967:21: error: Out of bounds access in 'm_LosRevealAll[MAX_LOS_PLAYER_ID+1]', if 'm_LosRevealAll' size is 16 and 'MAX_LOS_PLAYER_ID+1' is 17 [containerOutOfBounds]
  if (m_LosRevealAll[MAX_LOS_PLAYER_ID+1] || player == -1)
                    ^
```

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-11-11 21:35:01 +01:00
phosit
d786ac2dce
Suppress wrong positive of cppcheck in Game.cpp 2025-11-01 17:52:35 +01:00
Vladislav Belov
f2752f7230
Removes ARBShader capability 2025-10-14 13:04:16 +02:00
Vladislav Belov
c99345a24b Adds MapReader to cppcheck ignore. 2025-10-13 16:57:15 +02:00
Itms
9150c20818
Remove ScriptTypes and ScriptExtraHeaders headers
The first header was used to include the SpiderMonkey JS API at once,
with safeguards and preprocessor defines. Nowadays, SpiderMonkey
provides modular headers allowing us to include what we use, refs #8086.

Some defines have to be moved to compiler options but it is apparently
a mistake from the SM developers:
https://bugzilla.mozilla.org/show_bug.cgi?id=1987876
2025-09-14 13:17:18 +02:00
Ralph Sennhauser
6da4e606d4
Add cppcheck workflow
Add a workflow for linting and add a cppcheck job.

The job is using cppcheck provided by package manager. Existing errors
are suppressed to get going with CI linting, ideally tho the suppression
list would be empty. Some of the suppressed errors are only found with
more recent cppcheck than what is available in the runner.

Also remove old arclint cppcheck setup.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-03-30 18:06:01 +02:00