Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: msvc porting miscellaneous fixes #346

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ do { \
# define BITPIT_DEPRECATED_FOR(func, replacement) func __attribute__ ((deprecated(" Use " #replacement)))
#elif defined(_MSC_VER)
# define BITPIT_DEPRECATED(func) __declspec(deprecated) func
# define BITPIT_DEPRECATED_FOR(func, replacement), replacement __declspec(deprecated(" Use " #replacement)) func
# define BITPIT_DEPRECATED_FOR(func, replacement) __declspec(deprecated(" Use " #replacement)) func
#else
# pragma message("WARNING: macros to declare functions as deprecated are not implemented for this compiler")
# define BITPIT_DEPRECATED(func) func
Expand Down
2 changes: 1 addition & 1 deletion src/common/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ std::string LoggerBuffer::getTimestamp() const
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(currentClock.time_since_epoch());
auto millisecs = std::chrono::duration_cast<std::chrono::milliseconds>(currentClock.time_since_epoch() - seconds);
std::array<char, 11> millisecsBuffer;
std::snprintf(millisecsBuffer.data(), millisecsBuffer.size(), "%03u", static_cast<uint>(millisecs.count()));
std::snprintf(millisecsBuffer.data(), millisecsBuffer.size(), "%03u", static_cast<unsigned int>(millisecs.count()));

std::string timestamp;
timestamp.resize(23);
Expand Down