diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index d55490998d..e7e4202e96 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -813,7 +813,7 @@ Menu::Menu() { }); essLogAction->setEnabled(nodeList->getThisNodeCanRez()); - action = addActionToQMenuAndActionHash(developerMenu, "Script Log (HMD friendly)...", Qt::NoButton, + addActionToQMenuAndActionHash(developerMenu, "Script Log (HMD friendly)...", Qt::NoButton, qApp, SLOT(showScriptLogs())); addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::VerboseLogging, 0, false, diff --git a/interface/src/ui/overlays/Circle3DOverlay.cpp b/interface/src/ui/overlays/Circle3DOverlay.cpp index ef89213d68..8b04f17269 100644 --- a/interface/src/ui/overlays/Circle3DOverlay.cpp +++ b/interface/src/ui/overlays/Circle3DOverlay.cpp @@ -201,13 +201,12 @@ void Circle3DOverlay::render(RenderArgs* args) { float tickMarkAngle = getMajorTickMarksAngle(); float angle = _startAt - fmodf(_startAt, tickMarkAngle) + tickMarkAngle; - float angleInRadians = glm::radians(angle); float tickMarkLength = getMajorTickMarksLength(); float startRadius = (tickMarkLength > 0.0f) ? _innerRadius : _outerRadius; float endRadius = startRadius + tickMarkLength; while (angle <= _endAt) { - angleInRadians = glm::radians(angle); + float angleInRadians = glm::radians(angle); glm::vec2 thisPointA(cosf(angleInRadians) * startRadius, sinf(angleInRadians) * startRadius); glm::vec2 thisPointB(cosf(angleInRadians) * endRadius, sinf(angleInRadians) * endRadius); @@ -223,13 +222,12 @@ void Circle3DOverlay::render(RenderArgs* args) { float tickMarkAngle = getMinorTickMarksAngle(); float angle = _startAt - fmodf(_startAt, tickMarkAngle) + tickMarkAngle; - float angleInRadians = glm::radians(angle); float tickMarkLength = getMinorTickMarksLength(); float startRadius = (tickMarkLength > 0.0f) ? _innerRadius : _outerRadius; float endRadius = startRadius + tickMarkLength; while (angle <= _endAt) { - angleInRadians = glm::radians(angle); + float angleInRadians = glm::radians(angle); glm::vec2 thisPointA(cosf(angleInRadians) * startRadius, sinf(angleInRadians) * startRadius); glm::vec2 thisPointB(cosf(angleInRadians) * endRadius, sinf(angleInRadians) * endRadius); diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index 84e248b74d..dbf4725e68 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -2423,9 +2423,7 @@ OctreeElement::AppendState EntityItemProperties::encodeEntityEditPacket(PacketTy if (appendState != OctreeElement::COMPLETED) { didntFitProperties = propertiesDidntFit; } - } - if (success) { packetData->endSubTree(); const char* finalizedData = reinterpret_cast(packetData->getFinalizedData()); @@ -2436,7 +2434,6 @@ OctreeElement::AppendState EntityItemProperties::encodeEntityEditPacket(PacketTy buffer.resize(finalizedSize); } else { qCDebug(entities) << "ERROR - encoded edit message doesn't fit in output buffer."; - success = false; appendState = OctreeElement::NONE; // if we got here, then we didn't include the item // maybe we should assert!!! } @@ -2444,7 +2441,6 @@ OctreeElement::AppendState EntityItemProperties::encodeEntityEditPacket(PacketTy packetData->discardSubTree(); } - return appendState; } @@ -2834,7 +2830,6 @@ bool EntityItemProperties::encodeEraseEntityMessage(const EntityItemID& entityIt outputLength = sizeof(numberOfIds); memcpy(copyAt, entityItemID.toRfc4122().constData(), NUM_BYTES_RFC4122_UUID); - copyAt += NUM_BYTES_RFC4122_UUID; outputLength += NUM_BYTES_RFC4122_UUID; buffer.resize(outputLength); @@ -2856,7 +2851,6 @@ bool EntityItemProperties::encodeCloneEntityMessage(const EntityItemID& entityID outputLength += NUM_BYTES_RFC4122_UUID; memcpy(copyAt, newEntityID.toRfc4122().constData(), NUM_BYTES_RFC4122_UUID); - copyAt += NUM_BYTES_RFC4122_UUID; outputLength += NUM_BYTES_RFC4122_UUID; buffer.resize(outputLength); diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 839cb915e2..0d4abe78d3 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -140,7 +140,6 @@ struct IrradianceKTXPayload { data += sizeof(Version); memcpy(&_irradianceSH, data, sizeof(SphericalHarmonics)); - data += sizeof(SphericalHarmonics); return true; } diff --git a/libraries/networking/src/PacketSender.cpp b/libraries/networking/src/PacketSender.cpp index 6288743c46..14cfde8d18 100644 --- a/libraries/networking/src/PacketSender.cpp +++ b/libraries/networking/src/PacketSender.cpp @@ -267,8 +267,6 @@ bool PacketSender::nonThreadedProcess() { // Keep average packets and time for "second half" of check interval _lastPPSCheck += (elapsedSinceLastCheck / 2); _packetsOverCheckInterval = (_packetsOverCheckInterval / 2); - - elapsedSinceLastCheck = now - _lastPPSCheck; } } @@ -296,12 +294,10 @@ bool PacketSender::nonThreadedProcess() { DependencyManager::get()->sendPacketList(std::move(packetPair.second.second), *packetPair.first); } - packetsSentThisCall += packetCount; _packetsOverCheckInterval += packetCount; _totalPacketsSent += packetCount; - _totalBytesSent += packetSize; emit packetSent(packetSize); // FIXME should include number of packets? _lastSendTime = now; diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index f0e41d59ea..9bb0e25982 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -401,7 +401,6 @@ int Octree::readElementData(const OctreeElementPointer& destinationElement, cons // tell the element to read the subsequent data int rootDataSize = _rootElement->readElementDataFromBuffer(nodeData + bytesRead, bytesLeftToRead, args); bytesRead += rootDataSize; - bytesLeftToRead -= rootDataSize; } return bytesRead; diff --git a/libraries/recording/src/recording/impl/PointerClip.cpp b/libraries/recording/src/recording/impl/PointerClip.cpp index bd632a3f4a..bb8d6cfb33 100644 --- a/libraries/recording/src/recording/impl/PointerClip.cpp +++ b/libraries/recording/src/recording/impl/PointerClip.cpp @@ -61,7 +61,6 @@ PointerFrameHeaderList parseFrameHeaders(uchar* const start, const size_t& size) current += sizeof(FrameSize); header.fileOffset = current - start; if (end - current < header.size) { - current = end; break; } current += header.size;