1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-15 22:49:48 +00:00
Commit Graph

18 Commits

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.
2024-03-14 23:39:33 +00:00
elsid
78b3f7288a
Support UTF-8 by StringRefId::toDebugString 2023-06-01 22:16:47 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
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.
2022-09-05 19:46:39 +02:00
Evil Eye
4ff12d8945 Make Class::getName return string_view 2022-08-16 21:15:03 +02:00
Andrei Kortunov
fe785ea788 Don't cast away const when we can avoid it 2022-07-03 16:36:41 +04:00
Evil Eye
c6470f33d3 Use string_view 2021-11-14 11:26:16 +01:00
Evil Eye
8f48a1f030 Handle non-ASCII characters while saving without triggering an assertion 2021-11-14 11:26:06 +01:00
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.
2021-11-05 10:53:52 +01:00
Andrei Kortunov
afae398b5c Use utf8 lowercase function for journal index to avoid code duplication 2018-05-24 12:53:06 +04:00
Andrei Kortunov
5f41f7c48d Clean code up a bit 2017-11-21 13:03:38 +04:00
Bret Curtis
b7c27e5e96 remove boost/tuple 2017-06-09 19:08:53 +02:00
Rohit Nirmal
e315a72582 Remove extra semicolons at the end of some lines. 2014-09-06 13:04:52 -05:00
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>
2013-12-28 13:55:54 +01:00
scrawl
3c68c87923 Fix some naming guidelines, fix topic index exception, fix exception in keyword search for some journal entries 2013-05-01 10:28:59 +02:00
Nathan Jeffords
c7ede9b523 port code to C++03 2013-04-24 20:22:57 -07:00
Nathan Jeffords
6e7c9ebbe6 fix for gcc not handling static constant initialized in class definition 2013-04-24 20:22:57 -07:00
Nathan Jeffords
75757cb675 Created a class to represent a stream of UTF8 characters. 2013-04-24 20:20:00 -07:00