From ed591e1559443d8c4b508ebd1f815910a0c4985e Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Wed, 10 Aug 2016 00:58:38 -1000 Subject: [PATCH] fix more build errors --- include/xlnt/packaging/relationship.hpp | 2 +- include/xlnt/utils/path.hpp | 2 +- source/packaging/relationship.cpp | 26 ++++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/include/xlnt/packaging/relationship.hpp b/include/xlnt/packaging/relationship.hpp index be186300..a57043ac 100644 --- a/include/xlnt/packaging/relationship.hpp +++ b/include/xlnt/packaging/relationship.hpp @@ -145,7 +145,7 @@ private: type type_; uri source_; uri target_; - target_mode target_mode_; + target_mode mode_; }; } // namespace xlnt diff --git a/include/xlnt/utils/path.hpp b/include/xlnt/utils/path.hpp index 121afd6c..1ae5617d 100644 --- a/include/xlnt/utils/path.hpp +++ b/include/xlnt/utils/path.hpp @@ -181,7 +181,7 @@ struct hash { size_t operator()(const xlnt::path &p) const { - return hasher(p); + return hasher(p.string()); } hash hasher; diff --git a/source/packaging/relationship.cpp b/source/packaging/relationship.cpp index 125d66fa..5d118cd3 100644 --- a/source/packaging/relationship.cpp +++ b/source/packaging/relationship.cpp @@ -21,6 +21,7 @@ // // @license: http://www.opensource.org/licenses/mit-license.php // @author: see AUTHORS file + #include namespace xlnt { @@ -29,11 +30,12 @@ relationship::relationship() { } -relationship::relationship(const std::string &id, type t, const path &target, target_mode mode) +relationship::relationship(const std::string &id, type t, const path &source, const path &target, target_mode mode) : id_(id), type_(t), - target_uri_(target), - target_mode_(mode) + source_(source), + target_(target), + mode_(mode) { } @@ -42,14 +44,19 @@ std::string relationship::get_id() const return id_; } -target_mode relationship::get_target_mode() const +target_mode relationship::get_mode() const { - return target_mode_; + return mode_; } -path relationship::get_target_uri() const +path relationship::get_source() const { - return target_uri_; + return source_; +} + +path relationship::get_target() const +{ + return target_; } relationship::type relationship::get_type() const @@ -61,8 +68,9 @@ bool relationship::operator==(const relationship &rhs) const { return type_ == rhs.type_ && id_ == rhs.id_ - && target_uri_ == rhs.target_uri_ - && target_mode_ == rhs.target_mode_; + && source_ == the.source_ + && target_ == rhs.target_ + && mode_ == rhs.mode_; } } // namespace xlnt