Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MediaArea/ZenLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorAndre Meyering <info@andremeyering.de>2020-05-15 11:59:26 +0300
committerAndre Meyering <info@andremeyering.de>2020-05-15 11:59:26 +0300
commit204afc7764c049b3151af0159255cc5970fe48b3 (patch)
tree10cc3fc552d87becba2d10c7605a43a09cd821f2 /Source
parente73c5194b69bdcd02d73f859f1535d45bc672fb0 (diff)
Ztring.cpp: Explicitly state that fallthrough is wanted
GCC10 warns about this switch case because cases "fall through" the bottom. Adding a simple comment fixes the warning. Note: C++17 has `[[fallthrough]]` but ZenLib supports older C++ versions as well.
Diffstat (limited to 'Source')
-rw-r--r--Source/ZenLib/Ztring.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/ZenLib/Ztring.cpp b/Source/ZenLib/Ztring.cpp
index 500b200..bc38fe4 100644
--- a/Source/ZenLib/Ztring.cpp
+++ b/Source/ZenLib/Ztring.cpp
@@ -1643,18 +1643,23 @@ std::string Ztring::To_UTF8 () const
case 6:
utf8chars[5] = 0x80 | (wc & 0x3f);
wc = (wc >> 6) | 0x4000000;
+ /* fallthrough */
case 5:
utf8chars[4] = 0x80 | (wc & 0x3f);
wc = (wc >> 6) | 0x200000;
+ /* fallthrough */
case 4:
utf8chars[3] = 0x80 | (wc & 0x3f);
wc = (wc >> 6) | 0x10000;
+ /* fallthrough */
case 3:
utf8chars[2] = 0x80 | (wc & 0x3f);
wc = (wc >> 6) | 0x800;
+ /* fallthrough */
case 2:
utf8chars[1] = 0x80 | (wc & 0x3f);
wc = (wc >> 6) | 0xc0;
+ /* fallthrough */
case 1:
utf8chars[0] = (char) wc;
}