Explicitly cast values of different types
In case the warning -Werror=conversion is active with GCC, the warnings about "conversion from A to B may change value" lead to a compilation error. This explicitly convert the values to address these warnings.
This commit is contained in:
1 parent
69d62abc9a
commit
0b2af56271
3 files changed
+6
-6
No files matched your search
@@ -30,7 +30,7 @@ namespace Catch {
|
||||
return static_cast<unsigned int>(getElapsedMicroseconds()/1000);
|
||||
}
|
||||
auto Timer::getElapsedSeconds() const -> double {
|
||||
return getElapsedMicroseconds()/1000000.0;
|
||||
return static_cast<double>(getElapsedMicroseconds())/1000000.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user