mirror of
https://github.com/holub/mame
synced 2025-07-03 00:56:03 +03:00
util/path.h: Fixed narrowing warning from older versions of clang.
This commit is contained in:
parent
b7f9c64e6b
commit
7b88d53b61
@ -54,7 +54,7 @@ inline std::string &path_append(std::string &path, T &&next, U &&... more)
|
|||||||
if (!path.empty() && !is_directory_separator(path.back()))
|
if (!path.empty() && !is_directory_separator(path.back()))
|
||||||
path.append(PATH_SEPARATOR);
|
path.append(PATH_SEPARATOR);
|
||||||
path.append(std::forward<T>(next));
|
path.append(std::forward<T>(next));
|
||||||
if constexpr (sizeof...(U))
|
if constexpr (sizeof...(U) > 0U)
|
||||||
return path_append(path, std::forward<U>(more)...);
|
return path_append(path, std::forward<U>(more)...);
|
||||||
else
|
else
|
||||||
return path;
|
return path;
|
||||||
@ -72,7 +72,7 @@ template <typename T, typename... U>
|
|||||||
inline std::string path_concat(T &&first, U &&... more)
|
inline std::string path_concat(T &&first, U &&... more)
|
||||||
{
|
{
|
||||||
std::string result(std::forward<T>(first));
|
std::string result(std::forward<T>(first));
|
||||||
if constexpr (sizeof...(U))
|
if constexpr (sizeof...(U) > 0U)
|
||||||
path_append(result, std::forward<U>(more)...);
|
path_append(result, std::forward<U>(more)...);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user