Skip to content

Commit c616725

Browse files
committed
Revert "Restored 0.27.2 "toString()" behaviour of Exifdatum.value().toString() for CommentValue."
This reverts commit ecae9dc.
1 parent 2866415 commit c616725

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/exif.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,8 @@ namespace Exiv2 {
226226
if ( ti ) {
227227
fct = ti->printFct_;
228228
if ( ti->typeId_ == comment ) {
229-
fct=NULL;
230-
const Exiv2::CommentValue* cv = dynamic_cast<const Exiv2::CommentValue*>(&value());
231-
Exiv2::CommentValue::CharsetId csId = cv->charsetId();
232-
if ( csId != CommentValue::undefined ) {
233-
os << "charset=" << CommentValue::CharsetInfo::name(csId) << " ";
234-
}
235-
os << cv->comment();
236-
#if 0
237-
os << "|| value().toString() = " << value().toString();
238-
#endif
229+
os << value().toString();
230+
fct=NULL;
239231
}
240232
}
241233
if ( fct ) fct(os, value(), pMetadata);

src/value.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,10 @@ namespace Exiv2 {
548548

549549
std::ostream& CommentValue::write(std::ostream& os) const
550550
{
551+
CharsetId csId = charsetId();
552+
if (csId != undefined) {
553+
os << "charset=" << CharsetInfo::name(csId) << " ";
554+
}
551555
return os << comment();
552556
}
553557

0 commit comments

Comments
 (0)