1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file src/visualizer/StringHacks.cpp
10 #include "visualizer/StringHacks.h"
12 std::ostream
&operator<<(std::ostream
&stream
, const QString
&string
) {
13 stream
<< string
.toStdString();
17 uint
qHash(const std::string
&string
) {
18 /* Hashing algorithm: djb2. */
21 const char *p
= string
.c_str();
23 hash
= c
+ (hash
<< 6) + (hash
<< 16) - hash
;