aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp/src/context.cpp')
-rw-r--r--lang/cpp/src/context.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index f93887f5..afe32299 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -1906,10 +1906,18 @@ std::ostream &operator<<(std::ostream &os, KeyListMode mode)
std::ostream &operator<<(std::ostream &os, SignatureMode mode)
{
os << "GpgME::SignatureMode(";
-#define CHECK( x ) if ( !(mode & (x)) ) {} else do { os << #x " "; } while (0)
+#undef CHECK
+ switch (mode & (NormalSignatureMode|Detached|Clearsigned)) {
+#define CHECK( x ) case x: os << #x; break
CHECK(NormalSignatureMode);
CHECK(Detached);
CHECK(Clearsigned);
+#undef CHECK
+ default:
+ os << "???" "(" << static_cast<int>(mode) << ')';
+ break;
+ }
+#define CHECK( x ) if ( !(mode & (x)) ) {} else do { os << #x " "; } while (0)
CHECK(SignArchive);
#undef CHECK
return os << ')';