summaryrefslogtreecommitdiff
path: root/fxbarcode/BC_UtilCodingConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/BC_UtilCodingConvert.cpp')
-rw-r--r--fxbarcode/BC_UtilCodingConvert.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fxbarcode/BC_UtilCodingConvert.cpp b/fxbarcode/BC_UtilCodingConvert.cpp
index f1dea885c3..f0f497a07b 100644
--- a/fxbarcode/BC_UtilCodingConvert.cpp
+++ b/fxbarcode/BC_UtilCodingConvert.cpp
@@ -25,9 +25,7 @@ void CBC_UtilCodingConvert::LocaleToUtf8(const CFX_ByteString& src,
std::vector<uint8_t>& dst) {
CFX_WideString unicode = CFX_WideString::FromLocal(src.AsStringC());
CFX_ByteString utf8 = unicode.UTF8Encode();
- for (int32_t i = 0; i < utf8.GetLength(); i++) {
- dst.push_back(utf8[i]);
- }
+ dst = std::vector<uint8_t>(utf8.begin(), utf8.end());
}
void CBC_UtilCodingConvert::Utf8ToLocale(const std::vector<uint8_t>& src,