remove counter
This commit is contained in:
parent
e928735911
commit
b0ea45e84d
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
hack.png
Normal file → Executable file
0
hack.png
Normal file → Executable file
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
meson.build
Normal file → Executable file
0
meson.build
Normal file → Executable file
0
src/concepts/concepts.hpp
Normal file → Executable file
0
src/concepts/concepts.hpp
Normal file → Executable file
0
src/container/container.hpp
Normal file → Executable file
0
src/container/container.hpp
Normal file → Executable file
0
src/iterators/associative_ostream_iterator.hpp
Normal file → Executable file
0
src/iterators/associative_ostream_iterator.hpp
Normal file → Executable file
0
src/iterators/sequence_ostream_iterator.hpp
Normal file → Executable file
0
src/iterators/sequence_ostream_iterator.hpp
Normal file → Executable file
0
src/logger/logger.cpp
Normal file → Executable file
0
src/logger/logger.cpp
Normal file → Executable file
0
src/logger/logger.hpp
Normal file → Executable file
0
src/logger/logger.hpp
Normal file → Executable file
0
src/logger/meson.build
Normal file → Executable file
0
src/logger/meson.build
Normal file → Executable file
0
src/math/matrix.hpp
Normal file → Executable file
0
src/math/matrix.hpp
Normal file → Executable file
0
src/math/max.hpp
Normal file → Executable file
0
src/math/max.hpp
Normal file → Executable file
0
src/math/vector.hpp
Normal file → Executable file
0
src/math/vector.hpp
Normal file → Executable file
0
src/meson.build
Normal file → Executable file
0
src/meson.build
Normal file → Executable file
0
src/range/range.hpp
Normal file → Executable file
0
src/range/range.hpp
Normal file → Executable file
0
src/security/is_link.hpp
Normal file → Executable file
0
src/security/is_link.hpp
Normal file → Executable file
0
src/security/is_string.hpp
Normal file → Executable file
0
src/security/is_string.hpp
Normal file → Executable file
0
src/security/uuid.hpp
Normal file → Executable file
0
src/security/uuid.hpp
Normal file → Executable file
0
src/security/validate_email.hpp
Normal file → Executable file
0
src/security/validate_email.hpp
Normal file → Executable file
0
src/string/string.hpp
Normal file → Executable file
0
src/string/string.hpp
Normal file → Executable file
0
src/string/string_concat_helper.hpp
Normal file → Executable file
0
src/string/string_concat_helper.hpp
Normal file → Executable file
0
src/string/utf8_len.hpp
Normal file → Executable file
0
src/string/utf8_len.hpp
Normal file → Executable file
4
src/utils/func_query.hpp
Normal file → Executable file
4
src/utils/func_query.hpp
Normal file → Executable file
@ -8,7 +8,7 @@
|
||||
|
||||
namespace hack::utils
|
||||
{
|
||||
using json = nlohmann::json;
|
||||
using JSON = nlohmann::json;
|
||||
|
||||
template<hack::concepts::is_string First>
|
||||
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]");
|
||||
|
9
src/utils/utils.hpp
Normal file → Executable file
9
src/utils/utils.hpp
Normal file → Executable file
@ -52,8 +52,7 @@ namespace hack::utils
|
||||
std::array<char, 1024> buffer;
|
||||
std::unique_ptr<FILE, decltype(&pclose)> 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<typename T, T value = 0>
|
||||
struct counter
|
||||
{
|
||||
inline static T id = value;
|
||||
};
|
||||
|
||||
// this function can will use
|
||||
// as switch wiht string
|
||||
// switch(case_int("key"))
|
||||
|
0
src/view/color.hpp
Normal file → Executable file
0
src/view/color.hpp
Normal file → Executable file
0
subprojects/gtest.wrap
Normal file → Executable file
0
subprojects/gtest.wrap
Normal file → Executable file
0
subprojects/nlohmann_json.wrap
Normal file → Executable file
0
subprojects/nlohmann_json.wrap
Normal file → Executable file
0
tests/container.cpp
Normal file → Executable file
0
tests/container.cpp
Normal file → Executable file
0
tests/math.cpp
Normal file → Executable file
0
tests/math.cpp
Normal file → Executable file
0
tests/meson.build
Normal file → Executable file
0
tests/meson.build
Normal file → Executable file
0
tests/range.cpp
Normal file → Executable file
0
tests/range.cpp
Normal file → Executable file
0
tests/string.cpp
Normal file → Executable file
0
tests/string.cpp
Normal file → Executable file
Loading…
Reference in New Issue
Block a user