Skip to content

Commit

Permalink
tidy: Fix "statment should be in braces" warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Dec 14, 2021
1 parent 23d03c9 commit 2e967ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythbase/http/mythhttpservice.cpp
Expand Up @@ -199,6 +199,7 @@ HTTPResponse MythHTTPService::HTTPRequest(HTTPRequest2 Request)

// Cleanup
for (size_t i = 0; i < typecount; ++i)
{
if ((param[i] != nullptr) && (types[i] != 0))
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
Expand All @@ -207,6 +208,7 @@ HTTPResponse MythHTTPService::HTTPRequest(HTTPRequest2 Request)
QMetaType(types[i]).destroy(param[i]);
#endif
}
}

// Return the previous error
if (count != typecount)
Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythbase/http/serialisers/mythserialiser.cpp
Expand Up @@ -112,9 +112,11 @@ HTTPData MythSerialiser::Serialise(const QString &Name, const QVariant& Value, c
{
LOG(VB_HTTP, LOG_DEBUG, QString("Looking for serialiser for '%1'").arg(mime));
for (const auto & jsontype : s_jsonTypes)
{
if (const auto & alias = jsontype.Aliases().indexOf(mime); alias >= 0)
if (MythJSONSerialiser json(Name, Value); json.Result() != nullptr)
return WrapData(json.Result(), jsontype, jsontype.Aliases().at(alias));
}

if (const auto & alias = s_xmlType.Aliases().indexOf(mime); alias >= 0)
if (MythXMLSerialiser xml(Name, Value); xml.Result() != nullptr)
Expand Down

0 comments on commit 2e967ab

Please sign in to comment.