Cleanup: fix compiler warnings

This commit is contained in:
Brecht Van Lommel
2020-01-26 16:35:58 +01:00
parent 34c8ba6d3e
commit 3788901107
12 changed files with 36 additions and 16 deletions

View File

@@ -27,5 +27,10 @@ ScopeTimer::ScopeTimer(const std::string &message) : m_message(message), m_timer
ScopeTimer::~ScopeTimer()
{
std::printf("%s: %fms\n", m_message.c_str(), m_timer.delta());
#if OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 7
double delta = m_timer.milliseconds();
#else
double delta = m_timer.delta(); /* Deprecated in OpenVDB 7. */
#endif
std::printf("%s: %fms\n", m_message.c_str(), delta);
}