Fix includes
[quassel.git] / src / core / ctcpparser.cpp
index f4177c6..63c3dde 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2010 by the Quassel Project                        *
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -250,13 +250,10 @@ void CtcpParser::packedReply(CoreNetwork *net, const QString &bufname, const QLi
     answerSize += replies.at(i).size();
   }
 
-  QByteArray quotedReply(answerSize, 0);
-  int nextPos = 0;
-  QByteArray &reply = quotedReply;
+  QByteArray quotedReply;
+  quotedReply.reserve(answerSize);
   for(int i = 0; i < replies.count(); i++) {
-    reply = replies.at(i);
-    quotedReply.replace(nextPos, reply.size(), reply);
-    nextPos += reply.size();
+    quotedReply.append(replies.at(i));
   }
 
   params << net->serverEncode(bufname) << quotedReply;