summaryrefslogtreecommitdiff
path: root/src/commodity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/commodity.h')
-rw-r--r--src/commodity.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commodity.h b/src/commodity.h
index d6885ee9..bfbabe6b 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -188,6 +188,9 @@ public:
return comm == *this;
return base.get() == comm.base.get();
}
+ bool operator==(const string& name) const {
+ return base_symbol() == name;
+ }
static bool symbol_needs_quotes(const string& symbol);