fix windows warnings

This commit is contained in:
Brad Hefta-Gaub 2014-01-11 00:07:35 -08:00
parent 1358f68868
commit 825c1c8876
10 changed files with 459 additions and 459 deletions

View file

@ -196,7 +196,7 @@ void AudioMixer::prepareMixForListeningNode(Node* node) {
AudioMixerClientData* otherNodeClientData = (AudioMixerClientData*) otherNode->getLinkedData(); AudioMixerClientData* otherNodeClientData = (AudioMixerClientData*) otherNode->getLinkedData();
// enumerate the ARBs attached to the otherNode and add all that should be added to mix // enumerate the ARBs attached to the otherNode and add all that should be added to mix
for (int i = 0; i < otherNodeClientData->getRingBuffers().size(); i++) { for (unsigned int i = 0; i < otherNodeClientData->getRingBuffers().size(); i++) {
PositionalAudioRingBuffer* otherNodeBuffer = otherNodeClientData->getRingBuffers()[i]; PositionalAudioRingBuffer* otherNodeBuffer = otherNodeClientData->getRingBuffers()[i];
if ((*otherNode != *node if ((*otherNode != *node

View file

@ -14,14 +14,14 @@
#include "AudioMixerClientData.h" #include "AudioMixerClientData.h"
AudioMixerClientData::~AudioMixerClientData() { AudioMixerClientData::~AudioMixerClientData() {
for (int i = 0; i < _ringBuffers.size(); i++) { for (unsigned int i = 0; i < _ringBuffers.size(); i++) {
// delete this attached PositionalAudioRingBuffer // delete this attached PositionalAudioRingBuffer
delete _ringBuffers[i]; delete _ringBuffers[i];
} }
} }
AvatarAudioRingBuffer* AudioMixerClientData::getAvatarAudioRingBuffer() const { AvatarAudioRingBuffer* AudioMixerClientData::getAvatarAudioRingBuffer() const {
for (int i = 0; i < _ringBuffers.size(); i++) { for (unsigned int i = 0; i < _ringBuffers.size(); i++) {
if (_ringBuffers[i]->getType() == PositionalAudioRingBuffer::Microphone) { if (_ringBuffers[i]->getType() == PositionalAudioRingBuffer::Microphone) {
return (AvatarAudioRingBuffer*) _ringBuffers[i]; return (AvatarAudioRingBuffer*) _ringBuffers[i];
} }
@ -56,7 +56,7 @@ int AudioMixerClientData::parseData(unsigned char* packetData, int numBytes) {
InjectedAudioRingBuffer* matchingInjectedRingBuffer = NULL; InjectedAudioRingBuffer* matchingInjectedRingBuffer = NULL;
for (int i = 0; i < _ringBuffers.size(); i++) { for (unsigned int i = 0; i < _ringBuffers.size(); i++) {
if (_ringBuffers[i]->getType() == PositionalAudioRingBuffer::Injector if (_ringBuffers[i]->getType() == PositionalAudioRingBuffer::Injector
&& ((InjectedAudioRingBuffer*) _ringBuffers[i])->getStreamIdentifier() == streamIdentifier) { && ((InjectedAudioRingBuffer*) _ringBuffers[i])->getStreamIdentifier() == streamIdentifier) {
matchingInjectedRingBuffer = (InjectedAudioRingBuffer*) _ringBuffers[i]; matchingInjectedRingBuffer = (InjectedAudioRingBuffer*) _ringBuffers[i];
@ -76,7 +76,7 @@ int AudioMixerClientData::parseData(unsigned char* packetData, int numBytes) {
} }
void AudioMixerClientData::checkBuffersBeforeFrameSend(int jitterBufferLengthSamples) { void AudioMixerClientData::checkBuffersBeforeFrameSend(int jitterBufferLengthSamples) {
for (int i = 0; i < _ringBuffers.size(); i++) { for (unsigned int i = 0; i < _ringBuffers.size(); i++) {
if (_ringBuffers[i]->shouldBeAddedToMix(jitterBufferLengthSamples)) { if (_ringBuffers[i]->shouldBeAddedToMix(jitterBufferLengthSamples)) {
// this is a ring buffer that is ready to go // this is a ring buffer that is ready to go
// set its flag so we know to push its buffer when all is said and done // set its flag so we know to push its buffer when all is said and done
@ -86,7 +86,7 @@ void AudioMixerClientData::checkBuffersBeforeFrameSend(int jitterBufferLengthSam
} }
void AudioMixerClientData::pushBuffersAfterFrameSend() { void AudioMixerClientData::pushBuffersAfterFrameSend() {
for (int i = 0; i < _ringBuffers.size(); i++) { for (unsigned int i = 0; i < _ringBuffers.size(); i++) {
// this was a used buffer, push the output pointer forwards // this was a used buffer, push the output pointer forwards
PositionalAudioRingBuffer* audioBuffer = _ringBuffers[i]; PositionalAudioRingBuffer* audioBuffer = _ringBuffers[i];

View file

@ -542,7 +542,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
QStringList multiConfigList = multiConfig.split(";"); QStringList multiConfigList = multiConfig.split(";");
// read each config to a payload for a VS assignment // read each config to a payload for a VS assignment
for (int i = 0; i < multiConfigList.size(); i++) { for (unsigned int i = 0; i < multiConfigList.size(); i++) {
QString config = multiConfigList.at(i); QString config = multiConfigList.at(i);
qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData()); qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData());
@ -584,7 +584,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
QStringList multiConfigList = multiConfig.split(";"); QStringList multiConfigList = multiConfig.split(";");
// read each config to a payload for a VS assignment // read each config to a payload for a VS assignment
for (int i = 0; i < multiConfigList.size(); i++) { for (unsigned int i = 0; i < multiConfigList.size(); i++) {
QString config = multiConfigList.at(i); QString config = multiConfigList.at(i);
qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData()); qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData());

View file

@ -464,7 +464,7 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
// add to the output samples whatever is in the _localAudioOutput byte array // add to the output samples whatever is in the _localAudioOutput byte array
// that lets this user hear sound effects and loopback (if enabled) // that lets this user hear sound effects and loopback (if enabled)
for (int b = 0; b < _localInjectionByteArrays.size(); b++) { for (unsigned int b = 0; b < _localInjectionByteArrays.size(); b++) {
QByteArray audioByteArray = _localInjectionByteArrays.at(b); QByteArray audioByteArray = _localInjectionByteArrays.at(b);
int16_t* byteArraySamples = (int16_t*) audioByteArray.data(); int16_t* byteArraySamples = (int16_t*) audioByteArray.data();

View file

@ -135,7 +135,7 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
QStringList valueList = QString(valuesPosition).split(MULTI_KEY_VALUE_SEPARATOR); QStringList valueList = QString(valuesPosition).split(MULTI_KEY_VALUE_SEPARATOR);
// user string was UUID, find matching avatar and associate data // user string was UUID, find matching avatar and associate data
for (int i = 0; i < keyList.size(); i++) { for (size_t i = 0; i < keyList.size(); i++) {
if (valueList[i] != " ") { if (valueList[i] != " ") {
if (keyList[i] == DataServerKey::FaceMeshURL) { if (keyList[i] == DataServerKey::FaceMeshURL) {

View file

@ -919,7 +919,7 @@ void MyAvatar::updateChatCircle(float deltaTime) {
// compute the accumulated centers // compute the accumulated centers
glm::vec3 center = _position; glm::vec3 center = _position;
for (int i = 0; i < sortedAvatars.size(); i++) { for (size_t i = 0; i < sortedAvatars.size(); i++) {
SortedAvatar& sortedAvatar = sortedAvatars[i]; SortedAvatar& sortedAvatar = sortedAvatars[i];
sortedAvatar.accumulatedCenter = (center += sortedAvatar.avatar->getPosition()) / (i + 2.0f); sortedAvatar.accumulatedCenter = (center += sortedAvatar.avatar->getPosition()) / (i + 2.0f);
} }

View file

@ -73,7 +73,7 @@ bool SkeletonModel::render(float alpha) {
glm::vec3 skinColor, darkSkinColor; glm::vec3 skinColor, darkSkinColor;
_owningAvatar->getSkinColors(skinColor, darkSkinColor); _owningAvatar->getSkinColors(skinColor, darkSkinColor);
for (int i = 0; i < _jointStates.size(); i++) { for (size_t i = 0; i < _jointStates.size(); i++) {
glPushMatrix(); glPushMatrix();
glm::vec3 position; glm::vec3 position;
@ -191,7 +191,7 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
// match them up as best we can // match them up as best we can
float proportion = fingerIndices.size() / (float)fingerJointIndices.size(); float proportion = fingerIndices.size() / (float)fingerJointIndices.size();
for (int i = 0; i < fingerJointIndices.size(); i++) { for (size_t i = 0; i < fingerJointIndices.size(); i++) {
int fingerIndex = fingerIndices.at(roundf(i * proportion)).index; int fingerIndex = fingerIndices.at(roundf(i * proportion)).index;
glm::vec3 fingerVector = palm.getFingers()[fingerIndex].getTipPosition() - glm::vec3 fingerVector = palm.getFingers()[fingerIndex].getTipPosition() -
palm.getFingers()[fingerIndex].getRootPosition(); palm.getFingers()[fingerIndex].getRootPosition();

View file

@ -203,7 +203,7 @@ void Faceshift::receive(const QByteArray& buffer) {
} }
case fsMsg::MSG_OUT_BLENDSHAPE_NAMES: { case fsMsg::MSG_OUT_BLENDSHAPE_NAMES: {
const vector<string>& names = static_cast<fsMsgBlendshapeNames*>(msg.get())->blendshape_names(); const vector<string>& names = static_cast<fsMsgBlendshapeNames*>(msg.get())->blendshape_names();
for (int i = 0; i < names.size(); i++) { for (size_t i = 0; i < names.size(); i++) {
if (names[i] == "EyeBlink_L") { if (names[i] == "EyeBlink_L") {
_leftBlinkIndex = i; _leftBlinkIndex = i;

View file

@ -337,7 +337,7 @@ QVariantHash parseMapping(QIODevice* device) {
} else if (sections.size() >= 4) { } else if (sections.size() >= 4) {
QVariantHash heading = properties.value(name).toHash(); QVariantHash heading = properties.value(name).toHash();
QVariantList contents; QVariantList contents;
for (int i = 2; i < sections.size(); i++) { for (size_t i = 2; i < sections.size(); i++) {
contents.append(sections.at(i).trimmed()); contents.append(sections.at(i).trimmed());
} }
heading.insertMulti(sections.at(1).trimmed(), contents); heading.insertMulti(sections.at(1).trimmed(), contents);

View file

@ -1251,7 +1251,7 @@ void OctreeElement::addDeleteHook(OctreeElementDeleteHook* hook) {
void OctreeElement::removeDeleteHook(OctreeElementDeleteHook* hook) { void OctreeElement::removeDeleteHook(OctreeElementDeleteHook* hook) {
_deleteHooksLock.lockForWrite(); _deleteHooksLock.lockForWrite();
for (int i = 0; i < _deleteHooks.size(); i++) { for (unsigned int i = 0; i < _deleteHooks.size(); i++) {
if (_deleteHooks[i] == hook) { if (_deleteHooks[i] == hook) {
_deleteHooks.erase(_deleteHooks.begin() + i); _deleteHooks.erase(_deleteHooks.begin() + i);
break; break;
@ -1262,7 +1262,7 @@ void OctreeElement::removeDeleteHook(OctreeElementDeleteHook* hook) {
void OctreeElement::notifyDeleteHooks() { void OctreeElement::notifyDeleteHooks() {
_deleteHooksLock.lockForRead(); _deleteHooksLock.lockForRead();
for (int i = 0; i < _deleteHooks.size(); i++) { for (unsigned int i = 0; i < _deleteHooks.size(); i++) {
_deleteHooks[i]->elementDeleted(this); _deleteHooks[i]->elementDeleted(this);
} }
_deleteHooksLock.unlock(); _deleteHooksLock.unlock();
@ -1275,7 +1275,7 @@ void OctreeElement::addUpdateHook(OctreeElementUpdateHook* hook) {
} }
void OctreeElement::removeUpdateHook(OctreeElementUpdateHook* hook) { void OctreeElement::removeUpdateHook(OctreeElementUpdateHook* hook) {
for (int i = 0; i < _updateHooks.size(); i++) { for (unsigned int i = 0; i < _updateHooks.size(); i++) {
if (_updateHooks[i] == hook) { if (_updateHooks[i] == hook) {
_updateHooks.erase(_updateHooks.begin() + i); _updateHooks.erase(_updateHooks.begin() + i);
return; return;
@ -1284,7 +1284,7 @@ void OctreeElement::removeUpdateHook(OctreeElementUpdateHook* hook) {
} }
void OctreeElement::notifyUpdateHooks() { void OctreeElement::notifyUpdateHooks() {
for (int i = 0; i < _updateHooks.size(); i++) { for (unsigned int i = 0; i < _updateHooks.size(); i++) {
_updateHooks[i]->elementUpdated(this); _updateHooks[i]->elementUpdated(this);
} }
} }