commit | 8dc473a724117ecb4cd9b613dbe5770658017beb | [log] [tgz] |
---|---|---|
author | Junxiao Shi <git@mail1.yoursunny.com> | Fri Mar 02 15:10:18 2018 +0000 |
committer | Alex Afanasyev <aa@cs.fiu.edu> | Sat Mar 03 07:35:50 2018 -0800 |
tree | e0923c267426d9d6b7b4d0c25dcfef478e1f8902 | |
parent | 6f09ab6cde04530db839f9a9119e35e98e69d3ae [diff] [blame] |
tools: simplify on/off attribute printing refs #4004 Change-Id: Idb666ff4dbeddc37f1cb10710ba3d75f7fe8bdb5
diff --git a/tools/nfdc/format-helpers.cpp b/tools/nfdc/format-helpers.cpp index 6d5a983..a329102 100644 --- a/tools/nfdc/format-helpers.cpp +++ b/tools/nfdc/format-helpers.cpp
@@ -177,6 +177,12 @@ return os << attr.attribute << '='; } +std::ostream& +operator<<(std::ostream& os, OnOff v) +{ + return os << (v.flag ? "on" : "off"); +} + std::string formatTimestamp(time::system_clock::TimePoint t) {