diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-03-26 23:57:19 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-03-26 23:57:19 +0300 |
commit | 1a7e9e8b6b800c24e175370c0fa97e1d1f1585cc (patch) | |
tree | c47bf8ee6ede06a329cf00a005b9cf4adf31e09e /src | |
parent | 1718cde75e4c0db7b74376b847d58559d646ce1e (diff) |
Indent, changelog and submodule update
Diffstat (limited to 'src')
-rw-r--r-- | src/Message.cpp | 46 | ||||
-rw-r--r-- | src/Message.h | 2 | ||||
-rw-r--r-- | src/mumble/ACLEditor.cpp | 12 | ||||
-rw-r--r-- | src/mumble/AudioOutput.cpp | 14 | ||||
-rw-r--r-- | src/mumble/BanEditor.cpp | 2 | ||||
-rw-r--r-- | src/mumble/Messages.cpp | 8 | ||||
-rw-r--r-- | src/mumble/mumble.pro | 4 | ||||
-rw-r--r-- | src/murmur/murmur.pro | 4 |
8 files changed, 46 insertions, 46 deletions
diff --git a/src/Message.cpp b/src/Message.cpp index 7e42de08a..8a3b06253 100644 --- a/src/Message.cpp +++ b/src/Message.cpp @@ -32,30 +32,30 @@ #include "murmur_pch.h" void MessageHandler::dispatch(Connection *cCon, const QByteArray &msg) { -/* - switch (type) { - case MessageHandler::Version: { - MumbleProto::Version mpv; - mpv.ParseFromArray(msg.constData(), msg.size()); - msgVersion(cCon, &mpv); - } - break; - default: - break; - } -*/ + /* + switch (type) { + case MessageHandler::Version: { + MumbleProto::Version mpv; + mpv.ParseFromArray(msg.constData(), msg.size()); + msgVersion(cCon, &mpv); + } + break; + default: + break; + } + */ } void MessageHandler::messageToNetwork(const ::google::protobuf::Message &msg, unsigned int msgType, QByteArray &cache) { - int len = msg.ByteSize(); - if (len > 0x7fffff) - return; - cache.resize(len + 4); - unsigned char *uc = reinterpret_cast<unsigned char *>(cache.data()); - uc[0] = msgType; - uc[1] = (len >> 16) & 0xFF; - uc[2] = (len >> 8) & 0xFF; - uc[3] = len & 0xFF; - - msg.SerializeToArray(uc + 4, len); + int len = msg.ByteSize(); + if (len > 0x7fffff) + return; + cache.resize(len + 4); + unsigned char *uc = reinterpret_cast<unsigned char *>(cache.data()); + uc[0] = msgType; + uc[1] = (len >> 16) & 0xFF; + uc[2] = (len >> 8) & 0xFF; + uc[3] = len & 0xFF; + + msg.SerializeToArray(uc + 4, len); } diff --git a/src/Message.h b/src/Message.h index 1cf5a5489..28fee884d 100644 --- a/src/Message.h +++ b/src/Message.h @@ -60,7 +60,7 @@ class MessageHandler { #define MUMBLE_MH_MSG(x) x, enum MessageType { - MUMBLE_MH_ALL + MUMBLE_MH_ALL }; #undef MUMBLE_MH_MSG static void messageToNetwork(const ::google::protobuf::Message &msg, unsigned int msgType, QByteArray &cache); diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp index 80d1eafb6..6a6f7705e 100644 --- a/src/mumble/ACLEditor.cpp +++ b/src/mumble/ACLEditor.cpp @@ -83,7 +83,7 @@ ACLEditor::ACLEditor(const MumbleProto::ACL &mea, QWidget *p) : QDialog(p) { qlACLs << def; - for(int i=0;i<mea.acls_size();++i) { + for (int i=0;i<mea.acls_size();++i) { const MumbleProto::ACL_ChanACL &as = mea.acls(i); ChanACL *acl = new ChanACL(NULL); @@ -101,15 +101,15 @@ ACLEditor::ACLEditor(const MumbleProto::ACL &mea, QWidget *p) : QDialog(p) { qlACLs << acl; } - for(int i=0;i<mea.groups_size();++i) { + for (int i=0;i<mea.groups_size();++i) { const MumbleProto::ACL_ChanGroup &gs = mea.groups(i); Group *gp = new Group(NULL, u8(gs.name())); - for(int j=0;j<gs.add_size();++j) + for (int j=0;j<gs.add_size();++j) gp->qsAdd.insert(gs.add(j)); - for(int j=0;j<gs.remove_size();++j) + for (int j=0;j<gs.remove_size();++j) gp->qsRemove.insert(gs.remove(j)); - for(int j=0;j<gs.inherited_members_size();++j) + for (int j=0;j<gs.inherited_members_size();++j) gp->qsTemporary.insert(gs.inherited_members(j)); qlGroups << gp; @@ -234,7 +234,7 @@ void ACLEditor::returnQuery(const MumbleProto::QueryUsers &mqu) { if (mqu.names_size() != mqu.ids_size()) return; - for(int i=0;i < mqu.names_size(); ++i) { + for (int i=0;i < mqu.names_size(); ++i) { int id = mqu.ids(i); QString name = u8(mqu.names(i)); qhIDCache.insert(name, id); diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp index 907575b8b..23e40d437 100644 --- a/src/mumble/AudioOutput.cpp +++ b/src/mumble/AudioOutput.cpp @@ -408,13 +408,13 @@ bool AudioOutputSpeech::needSamples(unsigned int snum) { bLastAlive = false; } else { */ - iMissCount++; - if (iMissCount < 5) { - speex_decode(dsDecState, NULL, pOut); - } else { - memset(pOut, 0, sizeof(float) * iFrameSize); - bLastAlive = false; - } + iMissCount++; + if (iMissCount < 5) { + speex_decode(dsDecState, NULL, pOut); + } else { + memset(pOut, 0, sizeof(float) * iFrameSize); + bLastAlive = false; + } } int activity; diff --git a/src/mumble/BanEditor.cpp b/src/mumble/BanEditor.cpp index ca1ac7c3a..9d98a7336 100644 --- a/src/mumble/BanEditor.cpp +++ b/src/mumble/BanEditor.cpp @@ -43,7 +43,7 @@ BanEditor::BanEditor(const MumbleProto::BanList &msg, QWidget *p) : QDialog(p) { qleIP->setValidator(validator); qlBans.clear(); - for(int i=0;i < msg.bans_size(); ++i) { + for (int i=0;i < msg.bans_size(); ++i) { const MumbleProto::BanList_BanEntry &be = msg.bans(i); quint32 v = 0; std::string s = be.address(); diff --git a/src/mumble/Messages.cpp b/src/mumble/Messages.cpp index d094f828c..f305881a7 100644 --- a/src/mumble/Messages.cpp +++ b/src/mumble/Messages.cpp @@ -261,7 +261,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) { if (p) { Channel *pp = p; - while(pp) { + while (pp) { if (pp == c) return; pp = pp->cParent; @@ -278,7 +278,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) { if (msg->links_size()) { QList<Channel *> ql; pmModel->unlinkAll(c); - for(int i=0;i<msg->links_size();++i) { + for (int i=0;i<msg->links_size();++i) { Channel *l = Channel::get(msg->links(i)); if (l) ql << l; @@ -288,7 +288,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) { } if (msg->links_remove_size()) { QList<Channel *> ql; - for(int i=0;i<msg->links_remove_size();++i) { + for (int i=0;i<msg->links_remove_size();++i) { Channel *l = Channel::get(msg->links_remove(i)); if (l) ql << l; @@ -298,7 +298,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) { } if (msg->links_add_size()) { QList<Channel *> ql; - for(int i=0;i<msg->links_add_size();++i) { + for (int i=0;i<msg->links_add_size();++i) { Channel *l = Channel::get(msg->links_add(i)); if (l) ql << l; diff --git a/src/mumble/mumble.pro b/src/mumble/mumble.pro index 8144dfd24..c92fdb2ae 100644 --- a/src/mumble/mumble.pro +++ b/src/mumble/mumble.pro @@ -225,12 +225,12 @@ CONFIG(no-update) { copytrans.CONFIG *= no_link target_predeps QMAKE_EXTRA_COMPILERS *= copytrans - + RESOURCES *= mumble_qt.qrc } lrel.output = ${QMAKE_FILE_BASE}.qm -lrel.commands = $${QMAKE_LRELEASE} ${QMAKE_FILE_NAME} +lrel.commands = $${QMAKE_LRELEASE} ${QMAKE_FILE_NAME} lrel.input = TRANSLATIONS lrel.CONFIG *= no_link target_predeps diff --git a/src/murmur/murmur.pro b/src/murmur/murmur.pro index acf464971..4adbf1df9 100644 --- a/src/murmur/murmur.pro +++ b/src/murmur/murmur.pro @@ -49,7 +49,7 @@ unix { contains(UNAME, Linux) { LIBS *= -lcap } - + contains(UNAME, FreeBSD) { LIBS *= -lcrypto } else { @@ -86,7 +86,7 @@ ice { LIBS *= -lIce -lIceUtil } DEFINES *= USE_ICE - + win32 { INCLUDEPATH *= /dev/Ice/include LIBPATH *= /dev/Ice/lib |