aboutsummaryrefslogtreecommitdiff
path: root/bpkg/types
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-07-30 17:25:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-07-30 17:25:23 +0200
commitb94b5381f68061121c22f2786ba1fa774f1ee6f6 (patch)
tree887717ac2e585c93141e71509f8779e852c4967d /bpkg/types
parentbee19e051ea565813588a532bfbae4ce0b2f4a71 (diff)
Convert to use canonical directory separators
Diffstat (limited to 'bpkg/types')
-rw-r--r--bpkg/types16
1 files changed, 2 insertions, 14 deletions
diff --git a/bpkg/types b/bpkg/types
index aa88701..2e03675 100644
--- a/bpkg/types
+++ b/bpkg/types
@@ -81,22 +81,10 @@ namespace bpkg
using paths = std::vector<path>;
using dir_paths = std::vector<dir_path>;
- // Custom path printing.
+ // Custom path printing (with trailing slash for directories).
//
inline ostream&
- operator<< (ostream& os, const path& p) {return os << p.string ();}
-
- inline ostream&
- operator<< (ostream& os, const dir_path& p)
- {
- const string& s (p.string ());
- os << s;
-
- if (!s.empty () && !dir_path::traits::is_separator (s.back ()))
- os << dir_path::traits::directory_separator;
-
- return os;
- }
+ operator<< (ostream& os, const path& p) {return os << p.representation ();}
}
#endif // BPKG_TYPES