diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-14 11:41:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-14 18:14:46 +0200 |
commit | 81b09254eeb8970394cd564132d1d76fec687057 (patch) | |
tree | a10126b6474d46e1aac72e91d2279944e1c56f82 /csv/csv.h | |
parent | 2b02600171a88afa0c7ffdfa06ba61395df99341 (diff) |
csv: code quality fixes
- use std::move where applicable
- reformat more
- make const stuff static, use QStringLiteral
- fix regexes to make progress more
- always move further into file even if regexes fail
- apply less defensive coding, but still enough
- remove stuff we don't use
Diffstat (limited to 'csv/csv.h')
-rw-r--r-- | csv/csv.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -17,17 +17,17 @@ class CSV_EXPORT CSV { public: QString readLine(); - QStringList parseLine(); - static QStringList parseLine(QString line); + bool parseLine(QStringList& ret); void setCodec(const char* codecName); static bool getGameData(const int gameID, unsigned char* table, QString& gamename); private: - QIODevice *m_device; - QTextCodec *m_codec; + CSV(QIODevice* device); + + QIODevice* m_device; QString m_string; int m_pos; - QRegExp m_rx; - CSV(QIODevice * device); - CSV(QString &string); + + static const QTextCodec* m_codec; + static const QRegExp m_rx, m_rx2; }; |