Commit Graph

18 Commits (e1665f39450dd9b70fa67a47bd3b26f4d9bdb9e9)

Author SHA1 Message Date
AnyOldName3 28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
10 months ago
elsid 78b3f7288a
Support UTF-8 by StringRefId::toDebugString 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
jvoisin 9f62f0c292 Reserve the output buffer in lowerCaseUtf8
Since lowercasing an utf8 string shouldn't change its size very much,
it does make sense to reserve the output buffer, to reduce
memory allocations.
2 years ago
Evil Eye 4ff12d8945 Make Class::getName return string_view 2 years ago
Andrei Kortunov fe785ea788 Don't cast away const when we can avoid it 3 years ago
Evil Eye c6470f33d3 Use string_view 3 years ago
Evil Eye 8f48a1f030 Handle non-ASCII characters while saving without triggering an assertion 3 years ago
Bo Svensson 1960e976e2
refactors stringops.hpp (#3192)
With this PR we refactor `StringUtils::replaceAll` to accept `string_view` as suggested in a code comment. In addition, while we are touching this rebuild happy file, we slim it down a bit by moving a few sparingly used functions elsewhere.
3 years ago
Andrei Kortunov afae398b5c Use utf8 lowercase function for journal index to avoid code duplication 7 years ago
Andrei Kortunov 5f41f7c48d Clean code up a bit 7 years ago
Bret Curtis b7c27e5e96 remove boost/tuple 8 years ago
Rohit Nirmal e315a72582 Remove extra semicolons at the end of some lines. 10 years ago
Lukasz Gromanowski 9b73d23139 Fix warning about uninitialized variable inside stream.peak():
openmw/mwgui/bookpage.cpp:394:13: warning: ‘*((void*)& stream +24)’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
scrawl 3c68c87923 Fix some naming guidelines, fix topic index exception, fix exception in keyword search for some journal entries 12 years ago
Nathan Jeffords c7ede9b523 port code to C++03 12 years ago
Nathan Jeffords 6e7c9ebbe6 fix for gcc not handling static constant initialized in class definition 12 years ago
Nathan Jeffords 75757cb675 Created a class to represent a stream of UTF8 characters. 12 years ago