blob: dc85f734aff4712700feef0c25647f585541d9d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From bdcbdb6f6e0f35ed0a0df50f0a9d19441af9c866 Mon Sep 17 00:00:00 2001
From: Martin Oberzalek <kingleo@gmx.at>
Date: Wed, 27 Jul 2022 09:25:03 +0200
Subject: [PATCH] Fixed compilation with clang
---
src/cpputils/cpputilsshared/cpputilsformat/format2.h | 2 +-
src/cpputils/cpputilsshared/leoini.h | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/cpputils/cpputilsshared/cpputilsformat/format2.h b/src/cpputils/cpputilsshared/cpputilsformat/format2.h
index eb084e2..b3d7624 100644
--- a/src/cpputils/cpputilsshared/cpputilsformat/format2.h
+++ b/src/cpputils/cpputilsshared/cpputilsformat/format2.h
@@ -40,7 +40,7 @@ namespace Tools {
bool _is_string;
public:
- BaseArg( bool is_int_, bool is_string_ )
+ BaseArg( bool is_int_ = false, bool is_string_ = false )
: _is_int( is_int_ ),
_is_string( is_string_ )
{}
diff --git a/src/cpputils/cpputilsshared/leoini.h b/src/cpputils/cpputilsshared/leoini.h
index ee77511..0ad8493 100644
--- a/src/cpputils/cpputilsshared/leoini.h
+++ b/src/cpputils/cpputilsshared/leoini.h
@@ -278,12 +278,11 @@ namespace Leo
std::string::size_type end = s.find( ']', start );
if( start == std::string::npos ||
- end == std::string::npos )
- s = "";
- else
- s = s.substr( start+1, start-end -1 );
-
- return s2x<A>(s);
+ end == std::string::npos ) {
+ return s2x<A>("");
+ } else {
+ return s2x<A>( s.substr( start+1, start-end -1 ) );
+ }
}
} // namespace Leo
--
2.35.1
|