remove counter

This commit is contained in:
chatlanin 2023-05-23 11:24:33 +03:00
parent e928735911
commit b0ea45e84d
33 changed files with 3 additions and 10 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
hack.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

0
meson.build Normal file → Executable file
View File

0
src/concepts/concepts.hpp Normal file → Executable file
View File

0
src/container/container.hpp Normal file → Executable file
View File

0
src/iterators/associative_ostream_iterator.hpp Normal file → Executable file
View File

0
src/iterators/sequence_ostream_iterator.hpp Normal file → Executable file
View File

0
src/logger/logger.cpp Normal file → Executable file
View File

0
src/logger/logger.hpp Normal file → Executable file
View File

0
src/logger/meson.build Normal file → Executable file
View File

0
src/math/matrix.hpp Normal file → Executable file
View File

0
src/math/max.hpp Normal file → Executable file
View File

0
src/math/vector.hpp Normal file → Executable file
View File

0
src/meson.build Normal file → Executable file
View File

0
src/range/range.hpp Normal file → Executable file
View File

0
src/security/is_link.hpp Normal file → Executable file
View File

0
src/security/is_string.hpp Normal file → Executable file
View File

0
src/security/uuid.hpp Normal file → Executable file
View File

0
src/security/validate_email.hpp Normal file → Executable file
View File

0
src/string/string.hpp Normal file → Executable file
View File

0
src/string/string_concat_helper.hpp Normal file → Executable file
View File

0
src/string/utf8_len.hpp Normal file → Executable file
View File

4
src/utils/func_query.hpp Normal file → Executable file
View File

@ -8,7 +8,7 @@
namespace hack::utils namespace hack::utils
{ {
using json = nlohmann::json; using JSON = nlohmann::json;
template<hack::concepts::is_string First> template<hack::concepts::is_string First>
std::string make_one(First f) std::string make_one(First f)
@ -39,7 +39,7 @@ namespace hack::utils
f_str = std::regex_replace(f_str, std::regex("'"), "[quote]"); f_str = std::regex_replace(f_str, std::regex("'"), "[quote]");
return std::string("'") + f_str + std::string("',"); 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); std::string f_str = nlohmann::to_string(f);
f_str = std::regex_replace(f_str, std::regex("'"), "[quote]"); f_str = std::regex_replace(f_str, std::regex("'"), "[quote]");

9
src/utils/utils.hpp Normal file → Executable file
View File

@ -52,8 +52,7 @@ namespace hack::utils
std::array<char, 1024> buffer; std::array<char, 1024> buffer;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose); std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
if (!pipe) if (!pipe) throw std::runtime_error("bash cmd failed");
throw std::runtime_error("bash cmd failed");
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr)
{ {
@ -63,12 +62,6 @@ namespace hack::utils
return result; return result;
} }
template<typename T, T value = 0>
struct counter
{
inline static T id = value;
};
// this function can will use // this function can will use
// as switch wiht string // as switch wiht string
// switch(case_int("key")) // switch(case_int("key"))

0
src/view/color.hpp Normal file → Executable file
View File

0
subprojects/gtest.wrap Normal file → Executable file
View File

0
subprojects/nlohmann_json.wrap Normal file → Executable file
View File

0
tests/container.cpp Normal file → Executable file
View File

0
tests/math.cpp Normal file → Executable file
View File

0
tests/meson.build Normal file → Executable file
View File

0
tests/range.cpp Normal file → Executable file
View File

0
tests/string.cpp Normal file → Executable file
View File