summaryrefslogtreecommitdiffstats
path: root/qthelper.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-10 22:07:02 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-11 01:57:28 -0700
commit4b8a66f4899cb337899ec1d35058ab7fc1b1bc86 (patch)
tree4fc3bc3059c58003e6a9ad917dfc33b86c7ef667 /qthelper.h
parent4eaceb98614e28ab8c20baa1513733e0e662c7df (diff)
downloadsubsurface-4b8a66f4899cb337899ec1d35058ab7fc1b1bc86.tar.gz
When creating methods that pass QString, use const QString&
This removes unecessary creation and destruction of the object making the code shine a bit more and be more fluffy. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.h')
-rw-r--r--qthelper.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/qthelper.h b/qthelper.h
index 648a68090..9d31f5a12 100644
--- a/qthelper.h
+++ b/qthelper.h
@@ -29,12 +29,12 @@ class DiveComputerList {
public:
DiveComputerList();
~DiveComputerList();
- const DiveComputerNode *getExact(QString m, uint32_t d);
- const DiveComputerNode *get(QString m);
- void addDC(QString m, uint32_t d, QString n = "", QString s = "", QString f = "");
- void rmDC(QString m, uint32_t d);
- DiveComputerNode matchDC(QString m, uint32_t d);
- DiveComputerNode matchModel(QString m);
+ const DiveComputerNode *getExact(const QString& m, uint32_t d);
+ const DiveComputerNode *get(const QString& m);
+ void addDC(const QString& m, uint32_t d,const QString& n = QString(),const QString& s = QString(), const QString& f = QString());
+ void rmDC(const QString& m, uint32_t d);
+ DiveComputerNode matchDC(const QString& m, uint32_t d);
+ DiveComputerNode matchModel(const QString& m);
QMultiMap<QString, DiveComputerNode> dcMap;
QMultiMap<QString, DiveComputerNode> dcWorkingMap;
};