With v3.12.0 shfmt changed the behavior of the `--simplify` option to
ignore any EditorConfig when it's provided. Therefore, this option is
now moved to the EditorConfig as suggested by the shfmt author. See
https://github.com/mvdan/sh/issues/1173 for details.
Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.
Update premake script to include missing deps and drop various extra
paths for simplification.
Don't always include wx/wx.h via precompiled.h in case PCH is disabled.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Fix ERROR: JavaScript error where 'difficulty' is not defined on line
247 of config.js.
The bug was introduced in commit 062be89694 where two issues occurred:
this.difficulty was incorrectly set to the entire difficultyLevel module
instead of the difficulty parameter value.
Later comparisons used undefined difficulty variable instead of the
imported difficultyLevel module
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.
Add markers to precompiled.h header includes to avoid
include-what-you-use wanting them to be removed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
GetGUIObjectByName was previously made stricter, logging an
error if it doesn't find the target object.
This commit deals with the resulting error-causing (invalid) calls,
by deleting them if they're unnecessary or converting them to the new
TryGetGUIObjectByName (which doesn't log any errors).
It previously failed silently and just returned undefined which would often
only cause errors later on. Printing an error as soon as that happens helps
with debugging, by directly catching typos, for example.
For cases where the queried object may not exist, a new Engine function
called TryGetGUIObjectByName is introduced. It doesn't log any errors
and behaves exactly as GetGUIObjectByName used to.
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
For the memleak warning actually wx will free it for us, so just
suppress the warning.
```
source/soundmanager/data/SoundData.cpp:48:29: error: Iterators of different containers 'CSoundData::sSoundData' and 'sSoundData' are used together. [mismatchingContainers]
if ((itemFind = CSoundData::sSoundData.find( theData->GetFileName().string() )) != sSoundData.end())
^
source/soundmanager/data/SoundData.cpp:62:28: error: Iterators of different containers 'CSoundData::sSoundData' and 'sSoundData' are used together. [mismatchingContainers]
if ((itemFind = CSoundData::sSoundData.find(itemPath.string())) != sSoundData.end())
^
source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp:145:3: error: Memory leak: buf [memleak]
}
^
```
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
While std::is_pod is required it is not sufficient so use
std::is_integral as condition which is.
Further replace the static_assert with a requires and use the new endian
support to avoid use preprocessor.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
wxWigets 3.0 does stuff that is deprecated in C++20, namely bitwise
operation between different enumeration types. wxWidgets 3.2 has
widespread support and in fact 3.3 was release recently so 3.4 won't be
that far off anymore either. Requiring 3.2 will allow us to do several
cleanups.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Current GCC doesn't warn here, so add -Wno-stringop-overflow,
-Wno-attribute-warning, -Wno-restrict and -Wno-array-bounds to the list
of warnings for old GCC.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
mozilla/LinkedList.h uses __PRETTY_FUNCTION__ in debug builds, even when
using MSVC, so just define it to allow building with C++20.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The implicit conversion form sting literal to char* for C compatibility
was removed with C++11, seems MSVC caught up with this in C++20.
Use explicit cast instead where needed and change API to const char*
otherwise.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Was done for Android support but the cleanup didn't revert to the
original version and at least clang-20 warns -Wmain
Ref: f4625e69af
Ref: 20d23eb340
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
C++20 removed a sizable portion of valid places to use volatile
specifier. As mongoose is on the way out just add the warning to the
list of suppressed warnings. Further add a warning already suppressed
when using GCC to the list of suppressed warnings with Clang.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
std::is_pod is deprecated in C++20 and as such triggers
-Wdeprecated-declarations when built with C++20, "is_standard_layout &&
is_trivial" is the equivalent, so migrate to that.
While at it replace runtime dispatch with compile time and reduce the
required trait for memcpy to what is really needed.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.
Define ATLASDLLIMPEXP in a regular header instead of a PCH header and
dedupe its definition.
wxWidgets uses WX_ATTRIBUTE_PRINTF this days, so remove the workaround
for ATTRIBUTE_PRINTF.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
- Explicitly delete move constructor and move assignment operator to
avoid risk of memory leaks
- Remove unused class and typo
- Use same invocation of ScriptInterface as elsewhere
The addition of seagulls made fish selection boxes large, leading to clumbsiness when trying to select fish. Using the footprint for the selection box makes for a more intuitive selection.
Those functions were added to the C11 standard as an extension under the
name wcsnlen_s and strnlen_s. Also supported under that name in Windows.
Renaming avoids a possible name conflict with the posix functions of the
same name. Further this new name follows the pattern of names of the
other "secure" functions.
Fixes: #8274
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.
Drop the wxWidgets specific handling of precompiled headers in some
places, it isn't consistently used which it would have to to have meaning
and was mostly for early VS implementation of precompiled headers and a
lot of time has gone by since.
Drop Borland C++ compiler specific quirk, that compiler was
discontinued long ago and doesn't support modern C++.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.
Add "source" to include path for AtlasUI target to allow for absolute
includes. In the future all but one should be removed.
Drop check for at least boost 1.40.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/simulatation2
and fix what needs to be fixed.
source/simulation2/system/ComponentTest.h uses cxxtest, so add cxxtest
to the deps for simulation2 target.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/simulation2
and fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with files in source/scriptinterface and
fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/simulation2
and fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Modules don't expose global symbols. Because of that not all functions
have to be cramed in to one class. The functions can now be split in a
more readable way.
Ref: #8081
Make include-what-you-use happy with some files in source/ps and fix
what needs to be fixed.
Delete source/ps/FutureForward.h as it is no longer used.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>