remove ignored const qualifiers

This commit is contained in:
Dennis Luxen 2013-08-11 22:10:05 +02:00
parent a75ae8bbef
commit 45754b27de
2 changed files with 13 additions and 13 deletions

View File

@ -55,39 +55,39 @@ const boost::uuids::uuid & UUID::GetUUID() const {
return named_uuid; return named_uuid;
} }
const bool UUID::IsMagicNumberOK() const { bool UUID::IsMagicNumberOK() const {
return 1297240911 == magic_number; return 1297240911 == magic_number;
} }
const bool UUID::TestGraphUtil(const UUID & other) const { bool UUID::TestGraphUtil(const UUID & other) const {
if(!other.IsMagicNumberOK()) { if(!other.IsMagicNumberOK()) {
throw OSRMException("hsgr input file misses magic number. Check or reprocess the file"); throw OSRMException("hsgr input file misses magic number. Check or reprocess the file");
} }
return std::equal(md5_graph, md5_graph+32, other.md5_graph); return std::equal(md5_graph, md5_graph+32, other.md5_graph);
} }
const bool UUID::TestPrepare(const UUID & other) const { bool UUID::TestPrepare(const UUID & other) const {
if(!other.IsMagicNumberOK()) { if(!other.IsMagicNumberOK()) {
throw OSRMException("extracted input file misses magic number. Check or reprocess the file"); throw OSRMException("extracted input file misses magic number. Check or reprocess the file");
} }
return std::equal(md5_prepare, md5_prepare+32, other.md5_prepare); return std::equal(md5_prepare, md5_prepare+32, other.md5_prepare);
} }
const bool UUID::TestRTree(const UUID & other) const { bool UUID::TestRTree(const UUID & other) const {
if(!other.IsMagicNumberOK()) { if(!other.IsMagicNumberOK()) {
throw OSRMException("r-tree input file misses magic number. Check or reprocess the file"); throw OSRMException("r-tree input file misses magic number. Check or reprocess the file");
} }
return std::equal(md5_tree, md5_tree+32, other.md5_tree); return std::equal(md5_tree, md5_tree+32, other.md5_tree);
} }
const bool UUID::TestNodeInfo(const UUID & other) const { bool UUID::TestNodeInfo(const UUID & other) const {
if(!other.IsMagicNumberOK()) { if(!other.IsMagicNumberOK()) {
throw OSRMException("nodes file misses magic number. Check or reprocess the file"); throw OSRMException("nodes file misses magic number. Check or reprocess the file");
} }
return std::equal(md5_nodeinfo, md5_nodeinfo+32, other.md5_nodeinfo); return std::equal(md5_nodeinfo, md5_nodeinfo+32, other.md5_nodeinfo);
} }
const bool UUID::TestQueryObjects(const UUID & other) const { bool UUID::TestQueryObjects(const UUID & other) const {
if(!other.IsMagicNumberOK()) { if(!other.IsMagicNumberOK()) {
throw OSRMException("missing magic number. Check or reprocess the file"); throw OSRMException("missing magic number. Check or reprocess the file");
} }

View File

@ -41,12 +41,12 @@ public:
UUID(); UUID();
~UUID(); ~UUID();
const boost::uuids::uuid & GetUUID() const; const boost::uuids::uuid & GetUUID() const;
const bool IsMagicNumberOK() const; bool IsMagicNumberOK() const;
const bool TestGraphUtil(const UUID & other) const; bool TestGraphUtil(const UUID & other) const;
const bool TestPrepare(const UUID & other) const; bool TestPrepare(const UUID & other) const;
const bool TestRTree(const UUID & other) const; bool TestRTree(const UUID & other) const;
const bool TestNodeInfo(const UUID & other) const; bool TestNodeInfo(const UUID & other) const;
const bool TestQueryObjects(const UUID & other) const; bool TestQueryObjects(const UUID & other) const;
private: private:
const unsigned magic_number; const unsigned magic_number;
char md5_prepare[33]; char md5_prepare[33];
@ -60,4 +60,4 @@ private:
bool has_64_bits; bool has_64_bits;
}; };
#endif /* UUID_H */ #endif /* UUID_H */