Skip to content

Commit

Permalink
Fix #147
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Oct 23, 2024
1 parent c5fafdb commit b9c2183
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/SvgStream.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "SvgStream.h"

template <>
SvgStream& operator<<(SvgStream& object, const double& data) {
// Make sure negative zeros are converted to positive zero for
// reproducibility of SVGs
object.write(dbl_format(data));
return object;
}
7 changes: 0 additions & 7 deletions src/SvgStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ SvgStream& operator<<(SvgStream& object, const T& data) {
object.write(data);
return object;
}
template <>
SvgStream& operator<<(SvgStream& object, const double& data) {
// Make sure negative zeros are converted to positive zero for
// reproducibility of SVGs
object.write(dbl_format(data));
return object;
}

class SvgStreamFile : public SvgStream {
std::ofstream stream_;
Expand Down

0 comments on commit b9c2183

Please sign in to comment.