Compare commits

...

6 commits

6 changed files with 11 additions and 9 deletions

View file

@ -773,7 +773,7 @@ static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, f
#ifdef __STDC_LIB_EXT1__ #ifdef __STDC_LIB_EXT1__
len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
#else #else
len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); len = snprintf(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
#endif #endif
s->func(s->context, buffer, len); s->func(s->context, buffer, len);

View file

@ -8,7 +8,7 @@ namespace psemek::journal
std::string current_time() std::string current_time()
{ {
const auto now = std::chrono::high_resolution_clock::now(); const auto now = std::chrono::system_clock::now();
return std::format("{:%FT%TZ}", now); return std::format("{:%FT%TZ}", now);
} }

View file

@ -2,7 +2,6 @@
#include <psemek/util/to_string.hpp> #include <psemek/util/to_string.hpp>
#include <psemek/util/exception.hpp> #include <psemek/util/exception.hpp>
#include <psemek/util/hash_table.hpp> #include <psemek/util/hash_table.hpp>
#include <boost/stacktrace/stacktrace.hpp>
#include <chrono> #include <chrono>
#include <ctime> #include <ctime>

View file

@ -16,8 +16,7 @@ namespace psemek::util
#else #else
struct stacktrace struct stacktrace
{ {
template <typename Stream> friend std::ostream & operator << (std::ostream & stream, stacktrace)
friend Stream & operator << (Stream & stream, stacktrace)
{ {
stream << "(stacktrace disabled)\n"; stream << "(stacktrace disabled)\n";
return stream; return stream;

View file

@ -38,7 +38,7 @@ namespace psemek::util
value_ = std::move(new_value); value_ = std::move(new_value);
} }
T exchange(T && new_value) const T exchange(T && new_value)
{ {
std::lock_guard lock{mutex_}; std::lock_guard lock{mutex_};
std::swap(value_, new_value); std::swap(value_, new_value);

View file

@ -49,9 +49,13 @@ function(psemek_add_executable_impl target is_application)
target_link_libraries(${target} PUBLIC psemek) target_link_libraries(${target} PUBLIC psemek)
if(${is_application}) if(${is_application})
target_link_libraries(${target} PUBLIC if(ANDROID)
"-Wl,--whole-archive $<TARGET_FILE:${PSEMEK_BACKEND_LIBRARY}> -Wl,--no-whole-archive" target_link_libraries(${target} PUBLIC
${PSEMEK_BACKEND_LIBRARY}) "-Wl,--whole-archive $<TARGET_FILE:${PSEMEK_BACKEND_LIBRARY}> -Wl,--no-whole-archive"
${PSEMEK_BACKEND_LIBRARY})
else()
target_link_libraries(${target} PUBLIC ${PSEMEK_BACKEND_LIBRARY})
endif()
endif() endif()
install(TARGETS ${target}) install(TARGETS ${target})