From ac875aee3bb77b9408bab5102a12928f17fce0e7 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Sat, 25 Feb 2023 19:30:58 +0100 Subject: [PATCH] bugfix macos and android --- core/src/utils/flog.cpp | 38 ++++++++++++------------- core/src/utils/flog.h | 6 ++-- source_modules/file_source/src/main.cpp | 1 - 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/core/src/utils/flog.cpp b/core/src/utils/flog.cpp index d4032675..9243ef71 100644 --- a/core/src/utils/flog.cpp +++ b/core/src/utils/flog.cpp @@ -9,7 +9,7 @@ #endif #ifdef __ANDROID__ -#include +#include #ifndef FLOG_ANDROID_TAG #define FLOG_ANDROID_TAG "flog" #endif @@ -193,42 +193,42 @@ namespace flog { return buf; } - std::string __toString__(uint8_t value) { - char buf[8]; - sprintf(buf, "%" PRIu8, value); - return buf; - } - std::string __toString__(int16_t value) { char buf[16]; sprintf(buf, "%" PRId16, value); return buf; } - std::string __toString__(uint16_t value) { - char buf[16]; - sprintf(buf, "%" PRIu16, value); - return buf; - } - std::string __toString__(int32_t value) { char buf[32]; sprintf(buf, "%" PRId32, value); return buf; } - std::string __toString__(uint32_t value) { - char buf[32]; - sprintf(buf, "%" PRIu32, value); - return buf; - } - std::string __toString__(int64_t value) { char buf[64]; sprintf(buf, "%" PRId64, value); return buf; } + std::string __toString__(uint8_t value) { + char buf[8]; + sprintf(buf, "%" PRIu8, value); + return buf; + } + + std::string __toString__(uint16_t value) { + char buf[16]; + sprintf(buf, "%" PRIu16, value); + return buf; + } + + std::string __toString__(uint32_t value) { + char buf[32]; + sprintf(buf, "%" PRIu32, value); + return buf; + } + std::string __toString__(uint64_t value) { char buf[64]; sprintf(buf, "%" PRIu64, value); diff --git a/core/src/utils/flog.h b/core/src/utils/flog.h index fe2f1c3c..e1789733 100644 --- a/core/src/utils/flog.h +++ b/core/src/utils/flog.h @@ -19,12 +19,12 @@ namespace flog { std::string __toString__(bool value); std::string __toString__(char value); std::string __toString__(int8_t value); - std::string __toString__(uint8_t value); std::string __toString__(int16_t value); - std::string __toString__(uint16_t value); std::string __toString__(int32_t value); - std::string __toString__(uint32_t value); std::string __toString__(int64_t value); + std::string __toString__(uint8_t value); + std::string __toString__(uint16_t value); + std::string __toString__(uint32_t value); std::string __toString__(uint64_t value); std::string __toString__(float value); std::string __toString__(double value); diff --git a/source_modules/file_source/src/main.cpp b/source_modules/file_source/src/main.cpp index f7e37581..de827e46 100644 --- a/source_modules/file_source/src/main.cpp +++ b/source_modules/file_source/src/main.cpp @@ -175,7 +175,6 @@ private: std::regex expr("[0-9]+Hz"); std::smatch matches; std::regex_search(filename, matches, expr); - flog::warn("{0} {1}", filename, matches.size()); if (matches.empty()) { return 0; } std::string freqStr = matches[0].str(); return std::atof(freqStr.substr(0, freqStr.size() - 2).c_str());