encoding: In OID, make toString, operator== and operator!= const. Refs #1091.
diff --git a/include/ndn-cpp/encoding/oid.hpp b/include/ndn-cpp/encoding/oid.hpp
index bc0dd25..f217889 100644
--- a/include/ndn-cpp/encoding/oid.hpp
+++ b/include/ndn-cpp/encoding/oid.hpp
@@ -39,20 +39,20 @@
}
std::string
- toString();
+ toString() const;
- bool operator == (const OID& oid)
+ bool operator == (const OID& oid) const
{
return equal(oid);
}
- bool operator != (const OID& oid)
+ bool operator != (const OID& oid) const
{
return !equal(oid);
}
private:
- bool equal(const OID& oid);
+ bool equal(const OID& oid) const;
std::vector<int> oid_;
};