diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 09:01:05 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 09:01:05 +0100 |
commit | 4d9746c828558c9f872e0aed52442863affb25d5 (patch) | |
tree | 507d7c2ba67f47d3cbbcf01a722236ff1b48426b /common/index.h | |
parent | 9cea920b7dd51867a0be0fed2f461b6be73c103e (diff) | |
download | sink-4d9746c828558c9f872e0aed52442863affb25d5.tar.gz sink-4d9746c828558c9f872e0aed52442863affb25d5.zip |
Fromatted the whole codebase with clang-format.
clang-format -i */**{.cpp,.h}
Diffstat (limited to 'common/index.h')
-rw-r--r-- | common/index.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/common/index.h b/common/index.h index 3ee322a..0345f56 100644 --- a/common/index.h +++ b/common/index.h | |||
@@ -12,15 +12,17 @@ | |||
12 | class SINK_EXPORT Index | 12 | class SINK_EXPORT Index |
13 | { | 13 | { |
14 | public: | 14 | public: |
15 | enum ErrorCodes { | 15 | enum ErrorCodes |
16 | { | ||
16 | IndexNotAvailable = -1 | 17 | IndexNotAvailable = -1 |
17 | }; | 18 | }; |
18 | 19 | ||
19 | class Error | 20 | class Error |
20 | { | 21 | { |
21 | public: | 22 | public: |
22 | Error(const QByteArray &s, int c, const QByteArray &m) | 23 | Error(const QByteArray &s, int c, const QByteArray &m) : store(s), message(m), code(c) |
23 | : store(s), message(m), code(c) {} | 24 | { |
25 | } | ||
24 | QByteArray store; | 26 | QByteArray store; |
25 | QByteArray message; | 27 | QByteArray message; |
26 | int code; | 28 | int code; |
@@ -32,8 +34,8 @@ public: | |||
32 | void add(const QByteArray &key, const QByteArray &value); | 34 | void add(const QByteArray &key, const QByteArray &value); |
33 | void remove(const QByteArray &key, const QByteArray &value); | 35 | void remove(const QByteArray &key, const QByteArray &value); |
34 | 36 | ||
35 | void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, | 37 | void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, const std::function<void(const Error &error)> &errorHandler, |
36 | const std::function<void(const Error &error)> &errorHandler, bool matchSubStringKeys = false); | 38 | bool matchSubStringKeys = false); |
37 | QByteArray lookup(const QByteArray &key); | 39 | QByteArray lookup(const QByteArray &key); |
38 | 40 | ||
39 | private: | 41 | private: |