openvdb8.patch 615 B

1234567891011121314151617
  1. diff --git a/intern/openvdb/openvdb_util.cc b/intern/openvdb/openvdb_util.cc
  2. index a221a537851..899b41ff09b 100644
  3. --- a/intern/openvdb/openvdb_util.cc
  4. +++ b/intern/openvdb/openvdb_util.cc
  5. @@ -27,5 +27,10 @@ ScopeTimer::ScopeTimer(const std::string &message) : m_message(message), m_timer
  6. ScopeTimer::~ScopeTimer()
  7. {
  8. - std::printf("%s: %fms\n", m_message.c_str(), m_timer.delta());
  9. +#if OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 7
  10. + double delta = m_timer.milliseconds();
  11. +#else
  12. + double delta = m_timer.delta(); /* Deprecated in OpenVDB 7. */
  13. +#endif
  14. + std::printf("%s: %fms\n", m_message.c_str(), delta);
  15. }