From 50e616df8dc27cb1b1db07cd89a3ec26b794a542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 11 Nov 2012 14:44:34 +0100 Subject: [PATCH] Move stream operators to the TagLib namespace --- taglib/toolkit/tbytevector.cpp | 2 +- taglib/toolkit/tbytevector.h | 12 +++---- taglib/toolkit/tstring.cpp | 8 ++--- taglib/toolkit/tstring.h | 58 +++++++++++++++++----------------- taglib/toolkit/tstringlist.cpp | 2 +- taglib/toolkit/tstringlist.h | 12 +++---- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index 59e3a9ed..452aded8 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -724,7 +724,7 @@ void ByteVector::detach() // related functions //////////////////////////////////////////////////////////////////////////////// -std::ostream &operator<<(std::ostream &s, const ByteVector &v) +std::ostream &TagLib::operator<<(std::ostream &s, const ByteVector &v) { for(TagLib::uint i = 0; i < v.size(); i++) s << v[i]; diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index 0c583263..eb4292f5 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -414,12 +414,12 @@ namespace TagLib { ByteVectorPrivate *d; }; + /*! + * \relates TagLib::ByteVector + * Streams the ByteVector \a v to the output stream \a s. + */ + TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v); + } -/*! - * \relates TagLib::ByteVector - * Streams the ByteVector \a v to the output stream \a s. - */ -TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v); - #endif diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp index 402ce2b8..b18e578f 100644 --- a/taglib/toolkit/tstring.cpp +++ b/taglib/toolkit/tstring.cpp @@ -811,28 +811,28 @@ void String::prepare(Type t) // related functions //////////////////////////////////////////////////////////////////////////////// -const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2) +const TagLib::String TagLib::operator+(const TagLib::String &s1, const TagLib::String &s2) { String s(s1); s.append(s2); return s; } -const TagLib::String operator+(const char *s1, const TagLib::String &s2) +const TagLib::String TagLib::operator+(const char *s1, const TagLib::String &s2) { String s(s1); s.append(s2); return s; } -const TagLib::String operator+(const TagLib::String &s1, const char *s2) +const TagLib::String TagLib::operator+(const TagLib::String &s1, const char *s2) { String s(s1); s.append(s2); return s; } -std::ostream &operator<<(std::ostream &s, const String &str) +std::ostream &TagLib::operator<<(std::ostream &s, const String &str) { s << str.to8Bit(); return s; diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h index bcbe28fd..a1ba164c 100644 --- a/taglib/toolkit/tstring.h +++ b/taglib/toolkit/tstring.h @@ -453,35 +453,35 @@ namespace TagLib { StringPrivate *d; }; + /*! + * \relates TagLib::String + * + * Concatenates \a s1 and \a s2 and returns the result as a string. + */ + TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2); + + /*! + * \relates TagLib::String + * + * Concatenates \a s1 and \a s2 and returns the result as a string. + */ + TAGLIB_EXPORT const TagLib::String operator+(const char *s1, const TagLib::String &s2); + + /*! + * \relates TagLib::String + * + * Concatenates \a s1 and \a s2 and returns the result as a string. + */ + TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const char *s2); + + + /*! + * \relates TagLib::String + * + * Send the string to an output stream. + */ + TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::String &str); + } -/*! - * \relates TagLib::String - * - * Concatenates \a s1 and \a s2 and returns the result as a string. - */ -TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2); - -/*! - * \relates TagLib::String - * - * Concatenates \a s1 and \a s2 and returns the result as a string. - */ -TAGLIB_EXPORT const TagLib::String operator+(const char *s1, const TagLib::String &s2); - -/*! - * \relates TagLib::String - * - * Concatenates \a s1 and \a s2 and returns the result as a string. - */ -TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const char *s2); - - -/*! - * \relates TagLib::String - * - * Send the string to an output stream. - */ -TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::String &str); - #endif diff --git a/taglib/toolkit/tstringlist.cpp b/taglib/toolkit/tstringlist.cpp index 655fe6c4..0645ede5 100644 --- a/taglib/toolkit/tstringlist.cpp +++ b/taglib/toolkit/tstringlist.cpp @@ -116,7 +116,7 @@ StringList &StringList::append(const StringList &l) // related functions //////////////////////////////////////////////////////////////////////////////// -std::ostream &operator<<(std::ostream &s, const StringList &l) +std::ostream &TagLib::operator<<(std::ostream &s, const StringList &l) { s << l.toString(); return s; diff --git a/taglib/toolkit/tstringlist.h b/taglib/toolkit/tstringlist.h index f94b50f5..2a0cf385 100644 --- a/taglib/toolkit/tstringlist.h +++ b/taglib/toolkit/tstringlist.h @@ -104,12 +104,12 @@ namespace TagLib { StringListPrivate *d; }; + /*! + * \related TagLib::StringList + * Send the StringList to an output stream. + */ + std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l); + } -/*! - * \related TagLib::StringList - * Send the StringList to an output stream. - */ -std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l); - #endif