Compare commits
6 commits
a9094975be
...
940c2bb07e
| Author | SHA1 | Date | |
|---|---|---|---|
| 940c2bb07e | |||
| cd87a325d0 | |||
| 44d4deca22 | |||
| e3030416ce | |||
| f251b1b07f | |||
| c0a60cbdc8 |
6 changed files with 11 additions and 9 deletions
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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})
|
||||||
|
if(ANDROID)
|
||||||
target_link_libraries(${target} PUBLIC
|
target_link_libraries(${target} PUBLIC
|
||||||
"-Wl,--whole-archive $<TARGET_FILE:${PSEMEK_BACKEND_LIBRARY}> -Wl,--no-whole-archive"
|
"-Wl,--whole-archive $<TARGET_FILE:${PSEMEK_BACKEND_LIBRARY}> -Wl,--no-whole-archive"
|
||||||
${PSEMEK_BACKEND_LIBRARY})
|
${PSEMEK_BACKEND_LIBRARY})
|
||||||
|
else()
|
||||||
|
target_link_libraries(${target} PUBLIC ${PSEMEK_BACKEND_LIBRARY})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${target})
|
install(TARGETS ${target})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue