Skip to content

Commit

Permalink
tidy: Convert HAS_PARAM macros into a static inline functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Jul 10, 2022
1 parent 2d642bd commit 6f46a22
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythbase/http/mythhttpservice.h
Expand Up @@ -33,6 +33,8 @@ class MBASE_PUBLIC MythHTTPService : public QObject
QString m_name;
MythHTTPMetaService* m_staticMetaService { nullptr };
HTTPRequest2 m_request{nullptr};
bool HAS_PARAMv2(const QString& p)
{ return m_request->m_queries.contains(p.toLower()); }
};

class MBASE_PUBLIC V2HttpRedirectException
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythservicecontracts/service.h
Expand Up @@ -64,6 +64,7 @@ class SERVICE_PUBLIC Service : public QObject

public:

bool HAS_PARAM(const QString& p) const { return m_parsedParams.contains(p); }
QList<QString> m_parsedParams; // lowercased
};

Expand Down
2 changes: 0 additions & 2 deletions mythtv/programs/mythbackend/services/serviceUtil.h
Expand Up @@ -52,8 +52,6 @@
(bindvar)[QString(":").append(api_param)] = val; \
}

#define HAS_PARAM(p) m_parsedParams.contains(p)

const QStringList KnownServices = { "Capture", "Channel", "Content", \
"Dvr", "Guide", "Music", \
"Myth", "Video" };
Expand Down
2 changes: 0 additions & 2 deletions mythtv/programs/mythbackend/servicesv2/v2serviceUtil.h
Expand Up @@ -25,8 +25,6 @@
(bindvar)[QString(":").append(api_param)] = val; \
}

#define HAS_PARAMv2(p) m_request->m_queries.contains(QString(p).toLower())

const QStringList KnownServicesV2 = { "Capture", "Channel", "Content", \
"Dvr", "Guide", "Music", \
"Myth", "Video", "Config" };
Expand Down

0 comments on commit 6f46a22

Please sign in to comment.