File tree 11 files changed +81
-30
lines changed 11 files changed +81
-30
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ BraceWrapping:
42
42
SplitEmptyFunction : ' false'
43
43
SplitEmptyRecord : ' false'
44
44
SplitEmptyNamespace : ' false'
45
-
46
- BreakBeforeConceptDeclarations : Always
45
+
46
+ BreakBeforeConceptDeclarations : Always
47
47
BreakBeforeTernaryOperators : ' true'
48
48
BreakConstructorInitializers : BeforeColon
49
49
BreakInheritanceList : BeforeColon
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ set(WARNING_FLAGS
38
38
-Wno-c++98-compat # C++11
39
39
-Wno-c++98-compat-pedantic # C++11
40
40
-Wno-padded
41
+
42
+ -Wno-unsafe-buffer-usage-in-container
41
43
)
42
44
43
45
foreach (WARNING_FLAG ${WARNING_FLAGS} )
Original file line number Diff line number Diff line change 54
54
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
55
55
set (ICU_ARCH )
56
56
else ()
57
- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES arm )
57
+ if (MSVC_CXX_ARCHITECTURE_ID MATCHES ARM64 )
58
58
set (ICU_ARCH ARM64)
59
59
else ()
60
60
set (ICU_ARCH 64)
Original file line number Diff line number Diff line change 28
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
*/
30
30
31
+ /* c header */
32
+ #include < cstdint> // std::int32_t
33
+ #include < cstdlib> // EXIT_FAILURE, EXIT_SUCCESS
34
+
31
35
/* stl header */
32
- #include < codecvt>
33
36
#include < iomanip>
34
37
#include < iostream>
35
38
#include < limits>
36
39
#include < me
67E6
mory>
37
- #include < numeric>
40
+ #include < string>
41
+ #include < system_error>
38
42
39
43
/* sqlite header */
40
44
#include < sqlite3.h>
53
57
* Tokyo | 35.6839 | 139.7744
54
58
*/
55
59
56
- static std::int32_t printResultAndExit ( std::int32_t _code,
57
- const std::string &_message,
58
- const std::string &_sql ) {
60
+ namespace {
61
+
62
+ std::int32_t printResultAndExit ( std::int32_t _code,
63
+ const std::string &_message,
64
+ const std::string &_sql ) {
59
65
60
- std::cout << " RESULT CODE: (" << _code << " )" << std::endl;
61
- std::cout << " ERROR: '" << _message << " '" << std::endl;
62
- std::cout << " SQL: '" << _sql << " '" << std::endl;
63
- std::cout << std::endl;
64
- return EXIT_FAILURE;
66
+ std::cout << " RESULT CODE: (" << _code << " )" << std::endl;
67
+ std::cout << " ERROR: '" << _message << " '" << std::endl;
68
+ std::cout << " SQL: '" << _sql << " '" << std::endl;
69
+ std::cout << std::endl;
70
+ return EXIT_FAILURE;
71
+ }
65
72
}
66
73
67
74
std::int32_t main () {
Original file line number Diff line number Diff line change 28
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
*/
30
30
31
+ /* c header */
32
+ #include < cstdint> // std::int32_t
33
+ #include < cstdlib> // EXIT_FAILURE, EXIT_SUCCESS
34
+
31
35
/* stl header */
32
- #include < codecvt>
33
- #include < fstream>
34
36
#include < iostream>
35
- #include < locale>
36
37
#include < memory>
37
- #include < vector>
38
+ #include < string>
39
+ #include < system_error>
38
40
39
41
/* sqlite header */
40
42
#include < sqlite3.h>
64
66
* Melbourne | -37.8136 | 144.9631
65
67
*/
66
68
67
- static std::int32_t printResultAndExit ( std::int32_t _code,
68
- const std::string &_message,
69
- const std::string &_sql ) {
69
+ namespace {
70
+
71
+ std::int32_t printResultAndExit ( std::int32_t _code,
72
+ const std::string &_message,
73
+ const std::string &_sql ) {
70
74
71
- std::cout << " RESULT CODE: (" << _code << " )" << std::endl;
72
- std::cout << " ERROR: '" << _message << " '" << std::endl;
73
- std::cout << " SQL: '" << _sql << " '" << std::endl;
74
- std::cout << std::endl;
75
- return EXIT_FAILURE;
75
+ std::cout << " RESULT CODE: (" << _code << " )" << std::endl;
76
+ std::cout << " ERROR: '" << _message << " '" << std::endl;
77
+ std::cout << " SQL: '" << _sql << " '" << std::endl;
78
+ std::cout << std::endl;
79
+ return EXIT_FAILURE;
80
+ }
76
81
}
77
82
78
83
std::int32_t main () {
Original file line number Diff line number Diff line change 30
30
31
31
#pragma once
32
32
33
+ /* c header */
34
+ #include < cstdint> // std::int32_t
35
+
33
36
/* stl header */
34
37
#include < string>
35
38
#include < string_view>
36
39
#include < system_error>
40
+ #include < type_traits>
37
41
38
42
/* modern.cpp.core */
39
43
#include < Singleton.h>
Original file line number Diff line number Diff line change 30
30
31
31
/* c header */
32
32
#include < cmath>
33
+ #include < cstdint> // std::int32_t
33
34
#include < cstring> // std::memcpy
34
35
35
36
/* stl header */
36
37
#include < filesystem>
37
38
#include < fstream>
39
+ #include < iosfwd>
38
40
#include < iostream>
41
+ #include < memory>
39
42
#include < numeric>
43
+ #include < optional>
40
44
#if __cplusplus > 201703L && ( defined __GNUC__ && __GNUC__ >= 10 || defined _MSC_VER && _MSC_VER >= 1926 || defined __clang__ && __clang_major__ >= 10 )
41
45
#include < span>
42
46
#endif
47
+ #include < string>
48
+ #include < system_error>
43
49
#include < vector>
44
50
45
51
/* sqlite header */
46
52
#include < sqlite3.h>
47
53
48
54
/* icu header */
55
+ #include < unicode/stringpiece.h>
49
56
#include < unicode/translit.h>
50
57
#include < unicode/unistr.h>
58
+ #include < unicode/utrans.h>
59
+ #include < unicode/utypes.h>
51
60
52
61
/* modern.cpp.core */
53
- #include < Logger.h>
54
62
#include < StringUtils.h>
55
63
56
64
/* local header */
@@ -272,11 +280,14 @@ namespace vx::sqlite_utils {
272
280
return {};
273
281
}
274
282
275
- /* *
283
+ namespace {
284
+
285
+ /* *
276
286
* @brief Generate own PI.
277
287
* @return Calculated pi value.
278
288
*/
279
- static double pi () { return std::atan ( 1 ) * 4 ; }
289
+ double pi () { return std::atan ( 1 ) * 4 ; }
290
+ }
280
291
281
292
void distance ( sqlite3_context *_context,
282
293
std::int32_t _argc,
Original file line number Diff line number Diff line change 30
30
31
31
#pragma once
32
32
33
+ /* c header */
34
+ #include < cstdint> // std::int32_t
35
+
33
36
/* stl header */
34
37
#include < memory>
35
38
#include < string>
Original file line number Diff line number Diff line change 28
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
*/
30
30
31
+ /* c header */
32
+ #include < cstdint> // std::int32_t
33
+
31
34
/* gtest header */
32
35
#include < gtest/gtest.h>
33
36
34
37
/* sqlite header */
35
38
#include < sqlite3.h>
36
39
40
+ /* stl header */
41
+ #include < system_error>
42
+
37
43
/* sqlite_functions */
38
44
#include < SqliteUtils.h>
39
45
Original file line number Diff line number Diff line change 28
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
*/
30
30
31
- /* stl header */
32
- #include < filesystem >
31
+ /* c header */
32
+ #include < cstdint > // std::int32_t
33
33
34
34
/* gtest header */
35
35
#include < gtest/gtest.h>
36
36
37
37
/* sqlite header */
38
38
#include < sqlite3.h>
39
39
40
+ /* stl header */
41
+ #include < filesystem>
42
+ #include < string_view>
43
+ #include < system_error>
44
+
40
45
/* sqlite_functions */
41
46
#include < SqliteUtils.h>
42
47
Original file line number Diff line number Diff line change 28
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
*/
30
30
31
+ /* c header */
32
+ #include < cstdint> // std::int32_t
33
+
31
34
/* gtest header */
32
35
#include < gtest/gtest.h>
33
36
34
37
/* sqlite header */
35
38
#include < sqlite3.h>
36
39
40
+ /* stl header */
41
+ #include < optional>
42
+ #include < system_error>
43
+ #include < vector>
44
+
37
45
/* modern.cpp.core */
38
46
#include < StringUtils.h>
39
47
You can’t perform that action at this time.
0 commit comments