diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-03-26 14:54:48 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-03-26 21:03:21 -0400 |
| commit | a73904e4c01766ef29722fd5b9d7ec0d4729792c (patch) | |
| tree | 734e3f44dad0947687e3fddb4b7c3f098a2447b4 | |
| parent | 5199a0cefb6facbedf406fd3a141dfe09ffab68b (diff) | |
pkuuid: reset ostream flags after serializing
| -rw-r--r-- | pkuuid.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -153,6 +153,8 @@ std::ostream& operator<<(std::ostream &o, const struct pk_uuid& uuid) { int i; + std::ios_base::fmtflags orig_flags = o.flags(); + auto fill = o.fill(); o << std::hex; for (i = 0; i < 4; ++i) { o << std::setw(2) << std::setfill('0'); @@ -178,6 +180,8 @@ operator<<(std::ostream &o, const struct pk_uuid& uuid) o << std::setw(2) << std::setfill('0'); o << (uint16_t)uuid.uuid[i]; } + o.fill(fill); + o.flags(orig_flags); return o; } |
