summaryrefslogtreecommitdiff
path: root/pkuuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'pkuuid.h')
-rw-r--r--pkuuid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkuuid.h b/pkuuid.h
index 8639e87..0de7f6b 100644
--- a/pkuuid.h
+++ b/pkuuid.h
@@ -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;
}