mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
refs #36, fix for warnings on xcode 11.2 due to unhelpful use of references
This commit is contained in:
parent
7301cd1105
commit
c1a2fb5d17
@ -2511,7 +2511,7 @@ GHC_INLINE path path::parent_path() const
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
path pp;
|
path pp;
|
||||||
for (const string_type& s : input_iterator_range<iterator>(begin(), --end())) {
|
for (string_type s : input_iterator_range<iterator>(begin(), --end())) {
|
||||||
if (s == "/") {
|
if (s == "/") {
|
||||||
// don't use append to join a path-
|
// don't use append to join a path-
|
||||||
pp += s;
|
pp += s;
|
||||||
@ -2622,7 +2622,7 @@ GHC_INLINE path path::lexically_normal() const
|
|||||||
{
|
{
|
||||||
path dest;
|
path dest;
|
||||||
bool lastDotDot = false;
|
bool lastDotDot = false;
|
||||||
for (const string_type& s : *this) {
|
for (string_type s : *this) {
|
||||||
if (s == ".") {
|
if (s == ".") {
|
||||||
dest /= "";
|
dest /= "";
|
||||||
continue;
|
continue;
|
||||||
@ -3379,7 +3379,7 @@ GHC_INLINE bool create_directories(const path& p, std::error_code& ec) noexcept
|
|||||||
{
|
{
|
||||||
path current;
|
path current;
|
||||||
ec.clear();
|
ec.clear();
|
||||||
for (const path::string_type& part : p) {
|
for (path::string_type part : p) {
|
||||||
current /= part;
|
current /= part;
|
||||||
if (current != p.root_name() && current != p.root_path()) {
|
if (current != p.root_name() && current != p.root_path()) {
|
||||||
std::error_code tec;
|
std::error_code tec;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user