mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Code review
This commit is contained in:
parent
07b30da2ac
commit
a5b3ae397a
3 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ namespace AudioConstants {
|
|||
const int NETWORK_FRAME_SAMPLES_PER_CHANNEL = NETWORK_FRAME_BYTES_PER_CHANNEL / sizeof(AudioSample);
|
||||
const float NETWORK_FRAME_MSECS = (AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL
|
||||
/ (float)AudioConstants::SAMPLE_RATE) * 1000.0f;
|
||||
const unsigned int NETWORK_FRAME_USECS = (int)floorf(NETWORK_FRAME_MSECS * 1000.0f);
|
||||
const unsigned int NETWORK_FRAME_USECS = (unsigned int)floorf(NETWORK_FRAME_MSECS * 1000.0f);
|
||||
const int MIN_SAMPLE_VALUE = std::numeric_limits<AudioSample>::min();
|
||||
const int MAX_SAMPLE_VALUE = std::numeric_limits<AudioSample>::max();
|
||||
}
|
||||
|
|
|
@ -1529,7 +1529,7 @@ HeightfieldNode* HeightfieldNode::paintMaterial(const glm::vec3& position, const
|
|||
colorContents = _color->getContents();
|
||||
|
||||
} else {
|
||||
colorContents = QByteArray(baseWidth * baseHeight * DataBlock::COLOR_BYTES, 0xFFu);
|
||||
colorContents = QByteArray(baseWidth * baseHeight * DataBlock::COLOR_BYTES, 0xffU);
|
||||
}
|
||||
|
||||
int materialWidth = baseWidth, materialHeight = baseHeight;
|
||||
|
@ -1885,7 +1885,7 @@ HeightfieldNode* HeightfieldNode::clearAndFetchHeight(const glm::vec3& translati
|
|||
spanner->setHeight(HeightfieldHeightPointer(new HeightfieldHeight(spannerHeightWidth,
|
||||
QVector<quint16>(spannerHeightWidth * spannerHeightHeight))));
|
||||
spanner->setColor(HeightfieldColorPointer(new HeightfieldColor(spannerColorWidth,
|
||||
QByteArray(spannerColorWidth * spannerColorHeight * DataBlock::COLOR_BYTES, 0xFFu))));
|
||||
QByteArray(spannerColorWidth * spannerColorHeight * DataBlock::COLOR_BYTES, 0xffU))));
|
||||
spanner->setMaterial(HeightfieldMaterialPointer(new HeightfieldMaterial(spannerMaterialWidth,
|
||||
QByteArray(spannerMaterialWidth * spannerMaterialHeight, 0), QVector<SharedObjectPointer>())));
|
||||
}
|
||||
|
@ -2358,7 +2358,7 @@ void HeightfieldNode::mergeChildren(bool height, bool colorMaterial) {
|
|||
return;
|
||||
}
|
||||
if (colorWidth > 0) {
|
||||
QByteArray colorContents(colorWidth * colorHeight * DataBlock::COLOR_BYTES, 0xFFu);
|
||||
QByteArray colorContents(colorWidth * colorHeight * DataBlock::COLOR_BYTES, 0xffU);
|
||||
for (int i = 0; i < CHILD_COUNT; i++) {
|
||||
HeightfieldColorPointer childColor = _children[i]->getColor();
|
||||
if (!childColor) {
|
||||
|
|
|
@ -802,7 +802,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
|||
qDebug() << "fill encoded byte array with extra garbage (as if it was bitstream with more content)";
|
||||
}
|
||||
QByteArray extraContent;
|
||||
extraContent.fill(0xbau, 10);
|
||||
extraContent.fill(0xbaU, 10);
|
||||
encoded.append(extraContent);
|
||||
|
||||
if (verbose) {
|
||||
|
|
Loading…
Reference in a new issue