diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-27 11:24:34 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-27 12:34:10 (GMT) |
commit | 5beacb825c2df1620462ba68df16eb61d15d7c33 (patch) | |
tree | 81e1c0cf1a838b4de4fabbb316ba7fcb46fb2fb0 /Swiften | |
parent | 0c35b95500ade41d19f0ba5ae0ea325027f5ef34 (diff) | |
download | swift-5beacb825c2df1620462ba68df16eb61d15d7c33.zip swift-5beacb825c2df1620462ba68df16eb61d15d7c33.tar.bz2 |
Fixed valgrind warnings & leaks.
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/EventLoop/Event.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/EventLoop/Event.cpp b/Swiften/EventLoop/Event.cpp new file mode 100644 index 0000000..aa002d3 --- /dev/null +++ b/Swiften/EventLoop/Event.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#include <Swiften/EventLoop/Event.h> + +#include <typeinfo> +#include <iostream> + +std::ostream& operator<<(std::ostream& os, const Swift::Event& e) { + os << "Event(" << e.id << ","; + if (e.owner) { + os << typeid(*e.owner.get()).name(); + } + else { + os << "null"; + } + os << ")"; + return os; +} |