summaryrefslogtreecommitdiffstats
path: root/libraries/iconfix/internal/qhexstring_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/iconfix/internal/qhexstring_p.h')
-rw-r--r--libraries/iconfix/internal/qhexstring_p.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/libraries/iconfix/internal/qhexstring_p.h b/libraries/iconfix/internal/qhexstring_p.h
index f01b4cdd..c81904e5 100644
--- a/libraries/iconfix/internal/qhexstring_p.h
+++ b/libraries/iconfix/internal/qhexstring_p.h
@@ -61,40 +61,40 @@
// internal helper. Converts an integer value to an unique string token
template <typename T> struct HexString
{
- inline HexString(const T t) : val(t)
- {
- }
+ inline HexString(const T t) : val(t)
+ {
+ }
- inline void write(QChar *&dest) const
- {
- const ushort hexChars[] = {'0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
- const char *c = reinterpret_cast<const char *>(&val);
- for (uint i = 0; i < sizeof(T); ++i)
- {
- *dest++ = hexChars[*c & 0xf];
- *dest++ = hexChars[(*c & 0xf0) >> 4];
- ++c;
- }
- }
- const T val;
+ inline void write(QChar *&dest) const
+ {
+ const ushort hexChars[] = {'0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+ const char *c = reinterpret_cast<const char *>(&val);
+ for (uint i = 0; i < sizeof(T); ++i)
+ {
+ *dest++ = hexChars[*c & 0xf];
+ *dest++ = hexChars[(*c & 0xf0) >> 4];
+ ++c;
+ }
+ }
+ const T val;
};
// specialization to enable fast concatenating of our string tokens to a string
template <typename T> struct QConcatenable<HexString<T>>
{
- typedef HexString<T> type;
- enum
- {
- ExactSize = true
- };
- static int size(const HexString<T> &)
- {
- return sizeof(T) * 2;
- }
- static inline void appendTo(const HexString<T> &str, QChar *&out)
- {
- str.write(out);
- }
- typedef QString ConvertTo;
+ typedef HexString<T> type;
+ enum
+ {
+ ExactSize = true
+ };
+ static int size(const HexString<T> &)
+ {
+ return sizeof(T) * 2;
+ }
+ static inline void appendTo(const HexString<T> &str, QChar *&out)
+ {
+ str.write(out);
+ }
+ typedef QString ConvertTo;
};