Skip to content

Commit b8c7307

Browse files
committed
Simpify CharsetEncoder::isTriviallyCopyable
1 parent cfe9590 commit b8c7307

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/cpp/charsetencoder.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,15 +648,13 @@ void CharsetEncoder::encode(CharsetEncoderPtr& enc,
648648

649649
bool CharsetEncoder::isTriviallyCopyable(const LogString& src, const CharsetEncoderPtr& enc)
650650
{
651-
bool result = false;
651+
bool result;
652652
if (dynamic_cast<LocaleCharsetEncoder*>(enc.get()))
653653
{
654654
result = src.end() == std::find_if(src.begin(), src.end()
655655
, [](const logchar& ch) -> bool { return 0x80 <= (unsigned int)ch; });
656656
}
657-
#if LOG4CXX_LOGCHAR_IS_UTF8
658657
else
659658
result = !!dynamic_cast<TrivialCharsetEncoder*>(enc.get());
660-
#endif
661659
return result;
662660
}

0 commit comments

Comments
 (0)