Skip to content

Commit

Permalink
Fix thousands seps in dot graph colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Mar 26, 2024
1 parent 45eeeb9 commit c81071c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SeQuant/external/bliss/graph.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class AbstractGraph;
#include <iterator>
#include <optional>
#include <vector>
#include <locale>
#include "bignum.hh"
#include "heap.hh"
#include "kqueue.hh"
Expand Down Expand Up @@ -693,6 +694,8 @@ class Graph : public AbstractGraph {

auto int_to_rgb = [](unsigned int i) {
std::basic_stringstream<Char> stream;
// Set locale of this stream to C to avoid any kind of thousands separator
stream.imbue(std::locale::classic());
stream << std::setfill(Char('0')) << std::setw(6) << std::hex
<< ((i << 8) >> 8);
return stream.str();
Expand Down

0 comments on commit c81071c

Please sign in to comment.