mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 01:22:25 +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());
|
||||
}
|
||||
|
||||
QByteArray ba = _displayName.toLocal8Bit();
|
||||
const char* text = ba.data();
|
||||
QByteArray nameUTF8 = renderedDisplayName.toLocal8Bit();
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
@ -796,8 +796,8 @@ void AudioClient::handleAudioInput() {
|
|||
float loudness = 0.0f;
|
||||
|
||||
for (int i = 0; i < numNetworkSamples; i++) {
|
||||
float thisSample = fabsf(networkAudioSamples[i]);
|
||||
loudness += thisSample;
|
||||
int thisSample = std::abs(networkAudioSamples[i]);
|
||||
loudness += (float) thisSample;
|
||||
|
||||
if (thisSample > (AudioConstants::MAX_SAMPLE_VALUE * AudioNoiseGate::CLIPPING_THRESHOLD)) {
|
||||
_timeSinceLastClip = 0.0f;
|
||||
|
|
|
@ -53,7 +53,7 @@ void AudioNoiseGate::gateSamples(int16_t* samples, int numSamples) {
|
|||
|
||||
|
||||
float loudness = 0;
|
||||
float thisSample = 0;
|
||||
int thisSample = 0;
|
||||
int samplesOverNoiseGate = 0;
|
||||
|
||||
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++) {
|
||||
measuredDcOffset += samples[i];
|
||||
samples[i] -= (int16_t) _dcOffset;
|
||||
thisSample = fabsf(samples[i]);
|
||||
thisSample = std::abs(samples[i]);
|
||||
|
||||
if (thisSample >= ((float) AudioConstants::MAX_SAMPLE_VALUE * CLIPPING_THRESHOLD)) {
|
||||
_didClipInLastFrame = true;
|
||||
|
|
|
@ -121,8 +121,9 @@ public:
|
|||
}
|
||||
|
||||
void render(const int16_t* in, int16_t* out, const uint32_t frameCount) {
|
||||
if (!_buffer || (frameCount > _frameCount))
|
||||
if (frameCount > _frameCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
// If we've wrapped right out of the bounds, then we're
|
||||
// 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;
|
||||
}
|
||||
continue;
|
||||
|
@ -464,7 +464,7 @@ glm::vec2 Font::drawString(float x, float y, const QString & str,
|
|||
advance.y -= _rowHeight;
|
||||
// If we've wrapped right out of the bounds, then we're
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -871,7 +871,7 @@ int TextTemplate::evalBlockGeneration(std::ostream& dst, const BlockPointer& blo
|
|||
case Command::INCLUDE: {
|
||||
TextTemplatePointer include = _config->findInclude(block->command.arguments.front().c_str());
|
||||
if (include && !include->_root->blocks.empty()) {
|
||||
if (&include->_root) {
|
||||
if (include->_root) {
|
||||
generateTree(dst, include->_root, vars);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue