/***************************************************************************
- * 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 *
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;