From b0ea45e84d613ae863119547acfeb885342887da Mon Sep 17 00:00:00 2001 From: chatlanin Date: Tue, 23 May 2023 11:24:33 +0300 Subject: [PATCH] remove counter --- .gitignore | 0 README.md | 0 hack.png | Bin meson.build | 0 src/concepts/concepts.hpp | 0 src/container/container.hpp | 0 src/iterators/associative_ostream_iterator.hpp | 0 src/iterators/sequence_ostream_iterator.hpp | 0 src/logger/logger.cpp | 0 src/logger/logger.hpp | 0 src/logger/meson.build | 0 src/math/matrix.hpp | 0 src/math/max.hpp | 0 src/math/vector.hpp | 0 src/meson.build | 0 src/range/range.hpp | 0 src/security/is_link.hpp | 0 src/security/is_string.hpp | 0 src/security/uuid.hpp | 0 src/security/validate_email.hpp | 0 src/string/string.hpp | 0 src/string/string_concat_helper.hpp | 0 src/string/utf8_len.hpp | 0 src/utils/func_query.hpp | 4 ++-- src/utils/utils.hpp | 9 +-------- src/view/color.hpp | 0 subprojects/gtest.wrap | 0 subprojects/nlohmann_json.wrap | 0 tests/container.cpp | 0 tests/math.cpp | 0 tests/meson.build | 0 tests/range.cpp | 0 tests/string.cpp | 0 33 files changed, 3 insertions(+), 10 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 README.md mode change 100644 => 100755 hack.png mode change 100644 => 100755 meson.build mode change 100644 => 100755 src/concepts/concepts.hpp mode change 100644 => 100755 src/container/container.hpp mode change 100644 => 100755 src/iterators/associative_ostream_iterator.hpp mode change 100644 => 100755 src/iterators/sequence_ostream_iterator.hpp mode change 100644 => 100755 src/logger/logger.cpp mode change 100644 => 100755 src/logger/logger.hpp mode change 100644 => 100755 src/logger/meson.build mode change 100644 => 100755 src/math/matrix.hpp mode change 100644 => 100755 src/math/max.hpp mode change 100644 => 100755 src/math/vector.hpp mode change 100644 => 100755 src/meson.build mode change 100644 => 100755 src/range/range.hpp mode change 100644 => 100755 src/security/is_link.hpp mode change 100644 => 100755 src/security/is_string.hpp mode change 100644 => 100755 src/security/uuid.hpp mode change 100644 => 100755 src/security/validate_email.hpp mode change 100644 => 100755 src/string/string.hpp mode change 100644 => 100755 src/string/string_concat_helper.hpp mode change 100644 => 100755 src/string/utf8_len.hpp mode change 100644 => 100755 src/utils/func_query.hpp mode change 100644 => 100755 src/utils/utils.hpp mode change 100644 => 100755 src/view/color.hpp mode change 100644 => 100755 subprojects/gtest.wrap mode change 100644 => 100755 subprojects/nlohmann_json.wrap mode change 100644 => 100755 tests/container.cpp mode change 100644 => 100755 tests/math.cpp mode change 100644 => 100755 tests/meson.build mode change 100644 => 100755 tests/range.cpp mode change 100644 => 100755 tests/string.cpp diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/hack.png b/hack.png old mode 100644 new mode 100755 diff --git a/meson.build b/meson.build old mode 100644 new mode 100755 diff --git a/src/concepts/concepts.hpp b/src/concepts/concepts.hpp old mode 100644 new mode 100755 diff --git a/src/container/container.hpp b/src/container/container.hpp old mode 100644 new mode 100755 diff --git a/src/iterators/associative_ostream_iterator.hpp b/src/iterators/associative_ostream_iterator.hpp old mode 100644 new mode 100755 diff --git a/src/iterators/sequence_ostream_iterator.hpp b/src/iterators/sequence_ostream_iterator.hpp old mode 100644 new mode 100755 diff --git a/src/logger/logger.cpp b/src/logger/logger.cpp old mode 100644 new mode 100755 diff --git a/src/logger/logger.hpp b/src/logger/logger.hpp old mode 100644 new mode 100755 diff --git a/src/logger/meson.build b/src/logger/meson.build old mode 100644 new mode 100755 diff --git a/src/math/matrix.hpp b/src/math/matrix.hpp old mode 100644 new mode 100755 diff --git a/src/math/max.hpp b/src/math/max.hpp old mode 100644 new mode 100755 diff --git a/src/math/vector.hpp b/src/math/vector.hpp old mode 100644 new mode 100755 diff --git a/src/meson.build b/src/meson.build old mode 100644 new mode 100755 diff --git a/src/range/range.hpp b/src/range/range.hpp old mode 100644 new mode 100755 diff --git a/src/security/is_link.hpp b/src/security/is_link.hpp old mode 100644 new mode 100755 diff --git a/src/security/is_string.hpp b/src/security/is_string.hpp old mode 100644 new mode 100755 diff --git a/src/security/uuid.hpp b/src/security/uuid.hpp old mode 100644 new mode 100755 diff --git a/src/security/validate_email.hpp b/src/security/validate_email.hpp old mode 100644 new mode 100755 diff --git a/src/string/string.hpp b/src/string/string.hpp old mode 100644 new mode 100755 diff --git a/src/string/string_concat_helper.hpp b/src/string/string_concat_helper.hpp old mode 100644 new mode 100755 diff --git a/src/string/utf8_len.hpp b/src/string/utf8_len.hpp old mode 100644 new mode 100755 diff --git a/src/utils/func_query.hpp b/src/utils/func_query.hpp old mode 100644 new mode 100755 index 8de6098..662690c --- a/src/utils/func_query.hpp +++ b/src/utils/func_query.hpp @@ -8,7 +8,7 @@ namespace hack::utils { - using json = nlohmann::json; + using JSON = nlohmann::json; template std::string make_one(First f) @@ -39,7 +39,7 @@ namespace hack::utils f_str = std::regex_replace(f_str, std::regex("'"), "[quote]"); return std::string("'") + f_str + std::string("',"); } - inline std::string make_one(json f) + inline std::string make_one(JSON f) { std::string f_str = nlohmann::to_string(f); f_str = std::regex_replace(f_str, std::regex("'"), "[quote]"); diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp old mode 100644 new mode 100755 index d0bddda..d2260c4 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -52,8 +52,7 @@ namespace hack::utils std::array buffer; std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); - if (!pipe) - throw std::runtime_error("bash cmd failed"); + if (!pipe) throw std::runtime_error("bash cmd failed"); while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { @@ -63,12 +62,6 @@ namespace hack::utils return result; } - template - struct counter - { - inline static T id = value; - }; - // this function can will use // as switch wiht string // switch(case_int("key")) diff --git a/src/view/color.hpp b/src/view/color.hpp old mode 100644 new mode 100755 diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap old mode 100644 new mode 100755 diff --git a/subprojects/nlohmann_json.wrap b/subprojects/nlohmann_json.wrap old mode 100644 new mode 100755 diff --git a/tests/container.cpp b/tests/container.cpp old mode 100644 new mode 100755 diff --git a/tests/math.cpp b/tests/math.cpp old mode 100644 new mode 100755 diff --git a/tests/meson.build b/tests/meson.build old mode 100644 new mode 100755 diff --git a/tests/range.cpp b/tests/range.cpp old mode 100644 new mode 100755 diff --git a/tests/string.cpp b/tests/string.cpp old mode 100644 new mode 100755