fix : fixed an issue when a variable with a trailing zero was written as an integer

This commit is contained in:
Aleksander Kosarskii 2023-01-30 03:37:59 +05:00
parent 00b3a9bb5d
commit 431dc6a615
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
build/
/tags
/bazel-*
/cmake-build-debug

View File

@ -1,3 +1,3 @@
Start testing: Jan 30 03:31 +05
Start testing: Jan 30 03:33 +05
----------------------------------------------------------
End testing: Jan 30 03:31 +05
End testing: Jan 30 03:33 +05

View File

@ -177,7 +177,9 @@ inline Emitter& Emitter::WriteStreamable(T value) {
}
}
if (!special) {
if ((float)((int) value ) == value ){
stream << std::fixed << std::setprecision(1) << value;
}else if (!special) {
stream << value;
}
m_stream << stream.str();