fix linux build

This commit is contained in:
Thomas Fussell 2016-08-12 23:26:57 -04:00
parent 4baeeb824f
commit 29ef278779
3 changed files with 10 additions and 3 deletions

View File

@ -26,6 +26,7 @@
#include <cstddef>
#include <functional>
#include <unordered_map>
#include <vector>
#include <xlnt/xlnt_config.hpp>
#include <xlnt/styles/border_style.hpp>
@ -91,7 +92,7 @@ public:
border_style style_;
};
static const std::unordered_map<side, std::string> &get_side_names();
static const std::vector<std::pair<side, std::string>> &get_side_names();
border();

View File

@ -81,10 +81,10 @@ border::border()
};
}
const std::unordered_map<xlnt::border::side, std::string> &border::get_side_names()
const std::vector<std::pair<xlnt::border::side, std::string>> &border::get_side_names()
{
static auto *sides =
new std::unordered_map<xlnt::border::side, std::string>
new std::vector<std::pair<xlnt::border::side, std::string>>
{
{ xlnt::border::side::start, "left" },
{ xlnt::border::side::end, "right" },

View File

@ -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<std::string> split_path(const std::string &path, char delim)