From 29ef278779abf9a81e7a064d94467c66ad98273e Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Fri, 12 Aug 2016 23:26:57 -0400 Subject: [PATCH] fix linux build --- include/xlnt/styles/border.hpp | 3 ++- source/styles/border.cpp | 4 ++-- source/utils/path.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/xlnt/styles/border.hpp b/include/xlnt/styles/border.hpp index def7a78b..ffdfccdd 100644 --- a/include/xlnt/styles/border.hpp +++ b/include/xlnt/styles/border.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -91,7 +92,7 @@ public: border_style style_; }; - static const std::unordered_map &get_side_names(); + static const std::vector> &get_side_names(); border(); diff --git a/source/styles/border.cpp b/source/styles/border.cpp index 85495eb8..e2e39c83 100644 --- a/source/styles/border.cpp +++ b/source/styles/border.cpp @@ -81,10 +81,10 @@ border::border() }; } -const std::unordered_map &border::get_side_names() +const std::vector> &border::get_side_names() { static auto *sides = - new std::unordered_map + new std::vector> { { xlnt::border::side::start, "left" }, { xlnt::border::side::end, "right" }, diff --git a/source/utils/path.cpp b/source/utils/path.cpp index 22ca6202..8f7b3795 100644 --- a/source/utils/path.cpp +++ b/source/utils/path.cpp @@ -78,6 +78,12 @@ bool is_root(const std::string &part) return part == "/"; } + +bool is_absolute(const std::string &part) +{ + return !part.empty() && part[0] == '/'; +} + #endif std::vector split_path(const std::string &path, char delim)