diff options
| author | Sven Fischer | 2024-05-23 16:49:57 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2024-10-14 21:37:35 +0200 |
| commit | 0b2af562710d1bac7fd32ca3f05bf1d713bb97e4 (patch) | |
| tree | c3dd2afbc4d83e4476dcb8cdb25ddae6e89788bf /src/catch2/catch_timer.cpp | |
| parent | 69d62abc9a48033177b99ae79c13a6f1b280e94c (diff) | |
| download | catch3-0b2af562710d1bac7fd32ca3f05bf1d713bb97e4.tar.gz | |
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.
Diffstat (limited to 'src/catch2/catch_timer.cpp')
| -rw-r--r-- | src/catch2/catch_timer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/catch_timer.cpp b/src/catch2/catch_timer.cpp index 51396654..efdd8b7d 100644 --- a/src/catch2/catch_timer.cpp +++ b/src/catch2/catch_timer.cpp @@ -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; } |