-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint(stats_handler): refactor code (#94)
- Loading branch information
1 parent
3b11b9b
commit 268e396
Showing
24 changed files
with
98 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libtomcrypt
updated
383 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule rapidjson
updated
2 files
+2 −2 | include/rapidjson/reader.h | |
+3 −0 | test/unittest/readertest.cpp |
Submodule zlib
updated
36 files
+1 −0 | .gitignore | |
+6 −4 | Makefile.in | |
+2 −2 | configure | |
+12 −12 | contrib/infback9/infback9.c | |
+11 −3 | contrib/minizip/Makefile | |
+1 −1 | contrib/minizip/configure.ac | |
+57 −0 | contrib/minizip/ints.h | |
+2 −29 | contrib/minizip/ioapi.h | |
+2 −1 | contrib/minizip/minizip.c | |
+1 −1 | contrib/minizip/minizip.pc.in | |
+17 −16 | contrib/minizip/skipset.h | |
+12 −5 | contrib/minizip/zip.c | |
+7 −4 | contrib/vstudio/vc10/zlibvc.def | |
+7 −4 | contrib/vstudio/vc11/zlibvc.def | |
+7 −4 | contrib/vstudio/vc12/zlibvc.def | |
+7 −4 | contrib/vstudio/vc14/zlibvc.def | |
+161 −158 | contrib/vstudio/vc17/zlibvc.def | |
+7 −4 | contrib/vstudio/vc9/zlibvc.def | |
+13 −1 | deflate.c | |
+3 −0 | deflate.h | |
+12 −12 | examples/enough.c | |
+9 −9 | examples/gun.c | |
+12 −12 | infback.c | |
+4 −4 | inffast.c | |
+21 −21 | inflate.c | |
+6 −0 | os400/bndsrc | |
+4 −0 | os400/zlib.inc | |
+2 −2 | test/infcover.c | |
+2 −0 | trees.c | |
+1 −0 | win32/zlib.def | |
+2 −1 | zconf.h | |
+2 −1 | zconf.h.cmakein | |
+2 −1 | zconf.h.in | |
+17 −5 | zlib.h | |
+4 −0 | zlib.map | |
+2 −0 | zutil.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <std_include.hpp> | ||
#include "env.hpp" | ||
|
||
namespace utils::env | ||
{ | ||
std::string get_value(const std::string& name) | ||
{ | ||
const char* var_value = nullptr; | ||
#ifdef _WIN32 | ||
|
||
char* buffer = nullptr; | ||
size_t len = 0; | ||
if (_dupenv_s(&buffer, &len, name.c_str()) == 0 && buffer != nullptr) | ||
{ | ||
var_value = buffer; | ||
} | ||
|
||
const auto _ = gsl::finally([&] | ||
{ | ||
std::free(buffer); | ||
}); | ||
|
||
if (var_value) | ||
{ | ||
return var_value; | ||
} | ||
|
||
return {}; | ||
#else | ||
var_value = std::getenv(name.c_str()); | ||
return var_value ? std::string{ var_value } : std::string{}; | ||
#endif | ||
} | ||
} |
Oops, something went wrong.