From 544d20d4c0183c2b3a186e2f05b64298ceea1df8 Mon Sep 17 00:00:00 2001
From: Philip Taylor <philip@zaynar.co.uk>
Date: Tue, 20 Jan 2015 23:15:44 +0000
Subject: [PATCH 02/13] Add Path::string8 (which returns a UTF-8 encoded
std::string).
This saves the hassle of writing utf8_from_wstring(path.string()) in places like log messages.
---
source/lib/path.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/source/lib/path.h b/source/lib/path.h
index 02083ec..7facfb6 100644
a
|
b
|
|
41 | 41 | # include "boost/functional/hash.hpp" |
42 | 42 | #endif |
43 | 43 | |
| 44 | #include "lib/utf8.h" |
| 45 | |
44 | 46 | #include <cstring> |
45 | 47 | |
46 | 48 | namespace ERR |
… |
… |
public:
|
125 | 127 | return path; |
126 | 128 | } |
127 | 129 | |
| 130 | std::string string8() const |
| 131 | { |
| 132 | return utf8_from_wstring(path); |
| 133 | } |
| 134 | |
128 | 135 | bool operator<(const Path& rhs) const |
129 | 136 | { |
130 | 137 | return path < rhs.path; |