Commit a67e2acf authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix warning: implicit-fallthrough

parent 6a6a81eb
......@@ -125,12 +125,13 @@ inline T fixEndianess(T v, Exiv2::ByteOrder order)
Exiv2::ByteOrder invertByteOrder(Exiv2::ByteOrder order)
{
switch (order) {
case Exiv2::invalidByteOrder:
warnKrita << "KisExifIO: Can't invert Exiv2::invalidByteOrder";
case Exiv2::littleEndian:
return Exiv2::bigEndian;
case Exiv2::bigEndian:
return Exiv2::littleEndian;
case Exiv2::invalidByteOrder:
warnKrita << "KisExifIO: Can't invert Exiv2::invalidByteOrder";
return Exiv2::invalidByteOrder;
}
return Exiv2::invalidByteOrder;
}
......
......@@ -66,15 +66,15 @@ KisMetaData::Value exivValueToKMDValue(const Exiv2::Value::AutoPtr value, bool f
case Exiv2::unsignedRational:
if(value->size() < 2)
{
dbgMetaData << "Invalid size :" << value->size() << " value =" << value->toString().c_str();
return KisMetaData::Value();
dbgMetaData << "Invalid size :" << value->size() << " value =" << value->toString().c_str();
return KisMetaData::Value();
}
return KisMetaData::Value(KisMetaData::Rational(value->toRational().first , value->toRational().second));
case Exiv2::signedRational:
if(value->size() < 2)
{
dbgMetaData << "Invalid size :" << value->size() << " value =" << value->toString().c_str();
return KisMetaData::Value();
dbgMetaData << "Invalid size :" << value->size() << " value =" << value->toString().c_str();
return KisMetaData::Value();
}
return KisMetaData::Value(KisMetaData::Rational(value->toRational().first , value->toRational().second));
case Exiv2::date:
......@@ -166,7 +166,9 @@ Exiv2::Value* kmdValueToExivValue(const KisMetaData::Value& value, Exiv2::TypeId
return new Exiv2::ValueType<Exiv2::URational>(Exiv2::URational(value.asRational().numerator, value.asRational().denominator));
}
case KisMetaData::Value::OrderedArray:
/* Falls through */
case KisMetaData::Value::UnorderedArray:
/* Falls through */
case KisMetaData::Value::AlternativeArray: {
switch (type) {
case Exiv2::unsignedByte:
......@@ -187,10 +189,12 @@ Exiv2::Value* kmdValueToExivValue(const KisMetaData::Value& value, Exiv2::TypeId
}
return ev;
}
break;
default:
dbgMetaData << type << " " << value;
//Q_ASSERT(false);
}
/* Falls through */
}
default:
dbgMetaData << type << " " << value;
......@@ -255,7 +259,7 @@ Exiv2::Value* kmdValueToExivXmpValue(const KisMetaData::Value& value)
Exiv2::Value* arrV = new Exiv2::LangAltValue;
QMap<QString, KisMetaData::Value> langArray = value.asLangArray();
for (QMap<QString, KisMetaData::Value>::iterator it = langArray.begin();
it != langArray.end(); ++it) {
it != langArray.end(); ++it) {
QString exivVal;
if (it.key() != "x-default") {
exivVal = "lang=" + it.key() + ' ';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment