From c03300fe14e5caffbee87565b76a64febfc4313a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 6 Jun 2019 10:19:59 +0200 Subject: Use small_vector in path::normalize() --- libbutl/path.cxx | 4 ++-- libbutl/path.mxx | 3 ++- libbutl/path.txx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libbutl/path.cxx b/libbutl/path.cxx index f027233..608f309 100644 --- a/libbutl/path.cxx +++ b/libbutl/path.cxx @@ -29,7 +29,6 @@ #ifndef __cpp_lib_modules_ts #include -#include #include #include @@ -124,7 +123,8 @@ namespace butl } #ifndef _WIN32 - static const vector tmp_vars ({"TMPDIR", "TMP", "TEMP", "TEMPDIR"}); + static const small_vector tmp_vars ( + {"TMPDIR", "TMP", "TEMP", "TEMPDIR"}); static string temp_directory () diff --git a/libbutl/path.mxx b/libbutl/path.mxx index d5dde59..2de85e9 100644 --- a/libbutl/path.mxx +++ b/libbutl/path.mxx @@ -16,7 +16,6 @@ #include // invalid_argument #include // hash -#include #ifdef _WIN32 #include // replace() #endif @@ -29,10 +28,12 @@ export module butl.path; #ifdef __cpp_lib_modules_ts import std.core; #endif +import butl.small_vector; #ifdef _WIN32 import butl.utility; #endif #else +#include #ifdef _WIN32 #include // *case*() #endif diff --git a/libbutl/path.txx b/libbutl/path.txx index e407a16..77fbbd7 100644 --- a/libbutl/path.txx +++ b/libbutl/path.txx @@ -151,7 +151,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. string_type& s (this->path_); difference_type& ts (this->tsep_); - typedef std::vector paths; + using paths = small_vector; paths ps; bool tsep (ts != 0); // Trailing directory separator. -- cgit v1.1