From e43a11f7b23e8008be0b6115f5aa1e9478d07ea4 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Tue, 19 Jan 2010 14:04:09 +0000 Subject: [PATCH] #662: Code tweak and updated expected test results. --- src/value.cpp | 8 ++------ test/data/bugfixes-test.out | Bin 64491 -> 64491 bytes 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/value.cpp b/src/value.cpp index d36ae8ac..b8a4f9f2 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -476,12 +476,8 @@ namespace Exiv2 { if (pos != std::string::npos) c = comment.substr(pos+1); } if (charsetId == unicode) { - if (byteOrder_ == littleEndian) { - convertStringCharset(c, "UTF-8", "UCS-2LE"); - } - else { - convertStringCharset(c, "UTF-8", "UCS-2BE"); - } + const char* to = byteOrder_ == littleEndian ? "UCS-2LE" : "UCS-2BE"; + convertStringCharset(c, "UTF-8", to); } const std::string code(CharsetInfo::code(charsetId), 8); return StringValueBase::read(code + c); diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out index 02efcdf5caf70775f4edb0cbbdf782d8160f1025..a8ca1a482a1c26159fa1bfc12376a04a2cdfde91 100644 GIT binary patch delta 16 YcmaF;o%!{5<_!%JjE0*VC9)m^07=#d-T(jq delta 16 YcmaF;o%!{5<_!%Jj24?4C9)m^07?J{