mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Pass primitive types by value (#935)
This commit is contained in:
@@ -71,7 +71,7 @@ public:
|
||||
/// @param inst The id that has been assigned
|
||||
/// @return True on success else false
|
||||
///
|
||||
inline bool deleteInstance(const quint8& inst)
|
||||
inline bool deleteInstance(quint8 inst)
|
||||
{
|
||||
VectorPair cond;
|
||||
cond.append(CPair("instance",inst));
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
/// @param name The new name of the instance
|
||||
/// @return True on success else false (instance not found)
|
||||
///
|
||||
inline bool saveName(const quint8& inst, const QString& name)
|
||||
inline bool saveName(quint8 inst, const QString& name)
|
||||
{
|
||||
VectorPair fcond;
|
||||
fcond.append(CPair("friendly_name",name));
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
/// @param justEnabled return just enabled instances if true
|
||||
/// @return The found instances
|
||||
///
|
||||
inline QVector<QVariantMap> getAllInstances(const bool& justEnabled = false)
|
||||
inline QVector<QVariantMap> getAllInstances(bool justEnabled = false)
|
||||
{
|
||||
QVector<QVariantMap> results;
|
||||
getRecords(results, QStringList(), QStringList() << "instance ASC");
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
/// @param[in] user The user id
|
||||
/// @return true on success else false
|
||||
///
|
||||
inline bool instanceExist(const quint8& inst)
|
||||
inline bool instanceExist(quint8 inst)
|
||||
{
|
||||
VectorPair cond;
|
||||
cond.append(CPair("instance",inst));
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
/// @param index The index to search for
|
||||
/// @return The name of this index, may return NOT FOUND if not found
|
||||
///
|
||||
inline const QString getNamebyIndex(const quint8 index)
|
||||
inline const QString getNamebyIndex(quint8 index)
|
||||
{
|
||||
QVariantMap results;
|
||||
VectorPair cond;
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
/// @brief Update 'last_use' timestamp
|
||||
/// @param inst The instance to update
|
||||
///
|
||||
inline void setLastUse(const quint8& inst)
|
||||
inline void setLastUse(quint8 inst)
|
||||
{
|
||||
VectorPair cond;
|
||||
cond.append(CPair("instance", inst));
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
/// @param inst The instance to update
|
||||
/// @param newState True when enabled else false
|
||||
///
|
||||
inline void setEnable(const quint8& inst, const bool& newState)
|
||||
inline void setEnable(quint8 inst, bool newState)
|
||||
{
|
||||
VectorPair cond;
|
||||
cond.append(CPair("instance", inst));
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
/// @param inst The instance to get
|
||||
/// @return True when enabled else false
|
||||
///
|
||||
inline bool isEnabled(const quint8& inst)
|
||||
inline bool isEnabled(quint8 inst)
|
||||
{
|
||||
VectorPair cond;
|
||||
cond.append(CPair("instance", inst));
|
||||
|
@@ -15,7 +15,7 @@ class SettingsTable : public DBManager
|
||||
|
||||
public:
|
||||
/// construct wrapper with settings table
|
||||
SettingsTable(const quint8& instance, QObject* parent = nullptr)
|
||||
SettingsTable(quint8 instance, QObject* parent = nullptr)
|
||||
: DBManager(parent)
|
||||
, _hyperion_inst(instance)
|
||||
{
|
||||
|
Reference in New Issue
Block a user