summaryrefslogtreecommitdiff
path: root/indra/llcommon/fsyspath.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/fsyspath.h')
-rw-r--r--indra/llcommon/fsyspath.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/indra/llcommon/fsyspath.h b/indra/llcommon/fsyspath.h
index f66970ed8f..2c900c02a7 100644
--- a/indra/llcommon/fsyspath.h
+++ b/indra/llcommon/fsyspath.h
@@ -79,11 +79,8 @@ public:
// shadow base-class string() method with UTF-8 aware method
std::string string() const
{
- // Short of forbidden type punning, I see no way to avoid copying this
- // std::u8string to a std::string.
- auto u8str{ super::u8string() };
- // from https://github.com/tahonermann/char8_t-remediation/blob/master/char8_t-remediation.h#L180-L182
- return { u8str.begin(), u8str.end() };
+ auto u8 = super::u8string();
+ return std::string(u8.begin(), u8.end());
}
// On Posix systems, where value_type is already char, this operator
// std::string() method shadows the base class operator string_type()