From 8182b01ef1b8b486cef31bb215f13883929eabea Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 27 Jul 2020 12:21:15 -0700 Subject: [PATCH] minor --- src/pvxs/data.h | 6 ++---- src/type.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pvxs/data.h b/src/pvxs/data.h index 3bb711c..294abf0 100644 --- a/src/pvxs/data.h +++ b/src/pvxs/data.h @@ -211,10 +211,8 @@ inline bool operator==(TypeCode lhs, TypeCode rhs) { inline bool operator!=(TypeCode lhs, TypeCode rhs) { return lhs.code!=rhs.code; } -inline std::ostream& operator<<(std::ostream& strm, TypeCode c) { - strm< diff --git a/src/type.cpp b/src/type.cpp index 5f12129..fb5e194 100644 --- a/src/type.cpp +++ b/src/type.cpp @@ -94,7 +94,7 @@ StoreType TypeCode::storedAs() const return StoreType::Compound; } else { - throw std::logic_error("TypeCode::storedAs() not map"); + throw std::logic_error(SB()<<"TypeCode::storedAs("<<(*this)<<") not map"); } } @@ -165,6 +165,17 @@ const char* TypeCode::name() const return "\?\?\?_t"; } +std::ostream& operator<<(std::ostream& strm, TypeCode c) +{ + auto name = c.name(); + if(name[0]!='?') { + strm<