mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:36:49 +02:00
clean up various warnings
This commit is contained in:
parent
7ce62f49e2
commit
b9c9ff6a14
6 changed files with 11 additions and 11 deletions
|
@ -723,11 +723,10 @@ void Avatar::renderDisplayName() {
|
||||||
.arg(getReceiveRate());
|
.arg(getReceiveRate());
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray ba = _displayName.toLocal8Bit();
|
QByteArray nameUTF8 = renderedDisplayName.toLocal8Bit();
|
||||||
const char* text = ba.data();
|
|
||||||
|
|
||||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||||
textRenderer(DISPLAYNAME)->draw(text_x, text_y, renderedDisplayName, color);
|
textRenderer(DISPLAYNAME)->draw(text_x, text_y, nameUTF8.data(), color);
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
|
|
@ -796,8 +796,8 @@ void AudioClient::handleAudioInput() {
|
||||||
float loudness = 0.0f;
|
float loudness = 0.0f;
|
||||||
|
|
||||||
for (int i = 0; i < numNetworkSamples; i++) {
|
for (int i = 0; i < numNetworkSamples; i++) {
|
||||||
float thisSample = fabsf(networkAudioSamples[i]);
|
int thisSample = std::abs(networkAudioSamples[i]);
|
||||||
loudness += thisSample;
|
loudness += (float) thisSample;
|
||||||
|
|
||||||
if (thisSample > (AudioConstants::MAX_SAMPLE_VALUE * AudioNoiseGate::CLIPPING_THRESHOLD)) {
|
if (thisSample > (AudioConstants::MAX_SAMPLE_VALUE * AudioNoiseGate::CLIPPING_THRESHOLD)) {
|
||||||
_timeSinceLastClip = 0.0f;
|
_timeSinceLastClip = 0.0f;
|
||||||
|
|
|
@ -53,7 +53,7 @@ void AudioNoiseGate::gateSamples(int16_t* samples, int numSamples) {
|
||||||
|
|
||||||
|
|
||||||
float loudness = 0;
|
float loudness = 0;
|
||||||
float thisSample = 0;
|
int thisSample = 0;
|
||||||
int samplesOverNoiseGate = 0;
|
int samplesOverNoiseGate = 0;
|
||||||
|
|
||||||
const float NOISE_GATE_HEIGHT = 7.0f;
|
const float NOISE_GATE_HEIGHT = 7.0f;
|
||||||
|
@ -69,7 +69,7 @@ void AudioNoiseGate::gateSamples(int16_t* samples, int numSamples) {
|
||||||
for (int i = 0; i < numSamples; i++) {
|
for (int i = 0; i < numSamples; i++) {
|
||||||
measuredDcOffset += samples[i];
|
measuredDcOffset += samples[i];
|
||||||
samples[i] -= (int16_t) _dcOffset;
|
samples[i] -= (int16_t) _dcOffset;
|
||||||
thisSample = fabsf(samples[i]);
|
thisSample = std::abs(samples[i]);
|
||||||
|
|
||||||
if (thisSample >= ((float) AudioConstants::MAX_SAMPLE_VALUE * CLIPPING_THRESHOLD)) {
|
if (thisSample >= ((float) AudioConstants::MAX_SAMPLE_VALUE * CLIPPING_THRESHOLD)) {
|
||||||
_didClipInLastFrame = true;
|
_didClipInLastFrame = true;
|
||||||
|
|
|
@ -121,8 +121,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void render(const int16_t* in, int16_t* out, const uint32_t frameCount) {
|
void render(const int16_t* in, int16_t* out, const uint32_t frameCount) {
|
||||||
if (!_buffer || (frameCount > _frameCount))
|
if (frameCount > _frameCount) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int scale = (2 << ((8 * sizeof(int16_t)) - 1));
|
const int scale = (2 << ((8 * sizeof(int16_t)) - 1));
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ glm::vec2 Font::drawString(float x, float y, const QString & str,
|
||||||
advance.y -= _rowHeight;
|
advance.y -= _rowHeight;
|
||||||
// If we've wrapped right out of the bounds, then we're
|
// If we've wrapped right out of the bounds, then we're
|
||||||
// done with rendering the tokens
|
// done with rendering the tokens
|
||||||
if (bounds.y > 0 && abs(advance.y) > bounds.y) {
|
if (bounds.y > 0 && std::abs(advance.y) > bounds.y) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
@ -464,7 +464,7 @@ glm::vec2 Font::drawString(float x, float y, const QString & str,
|
||||||
advance.y -= _rowHeight;
|
advance.y -= _rowHeight;
|
||||||
// If we've wrapped right out of the bounds, then we're
|
// If we've wrapped right out of the bounds, then we're
|
||||||
// done with rendering the tokens
|
// done with rendering the tokens
|
||||||
if (bounds.y > 0 && abs(advance.y) > bounds.y) {
|
if (bounds.y > 0 && std::abs(advance.y) > bounds.y) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -871,7 +871,7 @@ int TextTemplate::evalBlockGeneration(std::ostream& dst, const BlockPointer& blo
|
||||||
case Command::INCLUDE: {
|
case Command::INCLUDE: {
|
||||||
TextTemplatePointer include = _config->findInclude(block->command.arguments.front().c_str());
|
TextTemplatePointer include = _config->findInclude(block->command.arguments.front().c_str());
|
||||||
if (include && !include->_root->blocks.empty()) {
|
if (include && !include->_root->blocks.empty()) {
|
||||||
if (&include->_root) {
|
if (include->_root) {
|
||||||
generateTree(dst, include->_root, vars);
|
generateTree(dst, include->_root, vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue