From ce8d0176cbb2f58ccd1a3caafb53773b86efbe72 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Mon, 24 Apr 2023 22:13:17 +0300 Subject: [PATCH] fix version --- bin/main.cpp | 4 ++-- meson.build | 2 +- props.json | 2 -- src/string/utf8_len.hpp | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 props.json diff --git a/bin/main.cpp b/bin/main.cpp index eb8e1a4..e2a4c42 100644 --- a/bin/main.cpp +++ b/bin/main.cpp @@ -31,12 +31,12 @@ int f(int a) int plus(int a) { - return a++; + return ++a; } int minus(int a) { - return a--; + return --a; } struct ForTypeTrace diff --git a/meson.build b/meson.build index a884d3a..d678870 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'hack', 'cpp', - # version : run_command('jq', '-r', '.version', join_paths(meson.source_root(), 'props.json'), check: true).stdout().strip(), + version: '1.0.0', default_options : [ 'warning_level=1', 'optimization=3', diff --git a/props.json b/props.json deleted file mode 100644 index 1922ced..0000000 --- a/props.json +++ /dev/null @@ -1,2 +0,0 @@ -{"version": "0.0.3"} - diff --git a/src/string/utf8_len.hpp b/src/string/utf8_len.hpp index 852efa8..58ea4e9 100644 --- a/src/string/utf8_len.hpp +++ b/src/string/utf8_len.hpp @@ -5,6 +5,7 @@ namespace hack::string { + // подсчет кол-ва символов inline std::size_t utf8_len(const std::string& utf8) { return std::wstring_convert, char32_t>{}.from_bytes(utf8).size();