diff --git a/interface/src/Audio.h b/interface/src/Audio.h index 8d6371a6f9..c9fc8402e7 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -40,19 +40,19 @@ public: void addReceivedAudioToBuffer(unsigned char* receivedData, int receivedBytes); - float getLastInputLoudness() const { return _lastInputLoudness; }; + float getLastInputLoudness() const { return _lastInputLoudness; } - void setLastAcceleration(glm::vec3 lastAcceleration) { _lastAcceleration = lastAcceleration; }; - void setLastVelocity(glm::vec3 lastVelocity) { _lastVelocity = lastVelocity; }; + void setLastAcceleration(glm::vec3 lastAcceleration) { _lastAcceleration = lastAcceleration; } + void setLastVelocity(glm::vec3 lastVelocity) { _lastVelocity = lastVelocity; } - void setJitterBufferSamples(int samples) { _jitterBufferSamples = samples; }; - int getJitterBufferSamples() { return _jitterBufferSamples; }; + void setJitterBufferSamples(int samples) { _jitterBufferSamples = samples; } + int getJitterBufferSamples() { return _jitterBufferSamples; } void lowPassFilter(int16_t* inputBuffer); void startCollisionSound(float magnitude, float frequency, float noise, float duration); - float getCollisionSoundMagnitude() { return _collisionSoundMagnitude; }; + float getCollisionSoundMagnitude() { return _collisionSoundMagnitude; } void ping(); @@ -61,8 +61,8 @@ public: // The results of the analysis are written to the log. bool eventuallyAnalyzePing(); - void setListenMode(AudioRingBuffer::ListenMode mode) { _listenMode = mode; }; - void setListenRadius(float radius) { _listenRadius = radius; }; + void setListenMode(AudioRingBuffer::ListenMode mode) { _listenMode = mode; } + void setListenRadius(float radius) { _listenRadius = radius; } void addListenSource(int sourceID); void removeListenSource(int sourceID); void clearListenSources(); diff --git a/interface/src/Environment.cpp b/interface/src/Environment.cpp index adfb1cfb3b..4f4e694713 100644 --- a/interface/src/Environment.cpp +++ b/interface/src/Environment.cpp @@ -38,13 +38,31 @@ static sockaddr getZeroAddress() { return addr; } +Environment::Environment() + : _initialized(false) { +} + +Environment::~Environment() { + if (_initialized) { + delete _skyFromAtmosphereProgram; + delete _skyFromSpaceProgram; + } +} + void Environment::init() { + if (_initialized) { + qDebug("[ERROR] Environment is already initialized.\n"); + return; + } + switchToResourcesParentIfRequired(); _skyFromAtmosphereProgram = createSkyProgram("Atmosphere", _skyFromAtmosphereUniformLocations); _skyFromSpaceProgram = createSkyProgram("Space", _skyFromSpaceUniformLocations); // start off with a default-constructed environment data _data[getZeroAddress()][0]; + + _initialized = true; } void Environment::resetToDefault() { diff --git a/interface/src/Environment.h b/interface/src/Environment.h index 7bdbfa600b..1095687ae0 100644 --- a/interface/src/Environment.h +++ b/interface/src/Environment.h @@ -22,6 +22,8 @@ class ProgramObject; class Environment { public: + Environment(); + ~Environment(); void init(); void resetToDefault(); @@ -40,6 +42,7 @@ private: void renderAtmosphere(Camera& camera, const EnvironmentData& data); + bool _initialized; ProgramObject* _skyFromAtmosphereProgram; ProgramObject* _skyFromSpaceProgram; diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 2b4b07f898..dc288fd73b 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -413,6 +413,13 @@ Menu::Menu() : addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::DestructiveAddVoxel); } +Menu::~Menu() { + qDebug("[DEBUG] Menu destructor.\n]"); + bandwidthDetailsClosed(); + voxelStatsDetailsClosed(); + delete _voxelModeActionsGroup; +} + void Menu::loadSettings(QSettings* settings) { if (!settings) { settings = Application::getInstance()->getSettings(); @@ -855,8 +862,10 @@ void Menu::bandwidthDetails() { } void Menu::bandwidthDetailsClosed() { - delete _bandwidthDialog; - _bandwidthDialog = NULL; + if (_bandwidthDialog) { + delete _bandwidthDialog; + _bandwidthDialog = NULL; + } } void Menu::voxelStatsDetails() { @@ -870,8 +879,10 @@ void Menu::voxelStatsDetails() { } void Menu::voxelStatsDetailsClosed() { - delete _voxelStatsDialog; - _voxelStatsDialog = NULL; + if (_voxelStatsDialog) { + delete _voxelStatsDialog; + _voxelStatsDialog = NULL; + } } void Menu::cycleFrustumRenderMode() { diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 7a796e1aa9..e207ffe32d 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -79,6 +79,7 @@ private: static Menu* _instance; Menu(); + ~Menu(); typedef void(*settingsAction)(QSettings*, QAction*); static void loadAction(QSettings* set, QAction* action); diff --git a/interface/src/Transmitter.cpp b/interface/src/Transmitter.cpp index eac769ead7..c82b018ec4 100644 --- a/interface/src/Transmitter.cpp +++ b/interface/src/Transmitter.cpp @@ -29,6 +29,12 @@ Transmitter::Transmitter() : } +Transmitter::~Transmitter() { + if (_lastReceivedPacket) { + delete _lastReceivedPacket; + } +} + void Transmitter::checkForLostTransmitter() { // If we are in motion, check for loss of transmitter packets if (glm::length(_estimatedRotation) > 0.f) { diff --git a/interface/src/Transmitter.h b/interface/src/Transmitter.h index 27426e1d27..b35d7200bd 100644 --- a/interface/src/Transmitter.h +++ b/interface/src/Transmitter.h @@ -25,6 +25,7 @@ class Transmitter { public: Transmitter(); + ~Transmitter(); void render(); void checkForLostTransmitter(); void resetLevels(); diff --git a/interface/src/starfield/Controller.h b/interface/src/starfield/Controller.h index cefe46664e..186a23c742 100644 --- a/interface/src/starfield/Controller.h +++ b/interface/src/starfield/Controller.h @@ -70,6 +70,10 @@ namespace starfield { _renderer(0l) { } + ~Controller() { + delete _renderer; + } + #if !STARFIELD_MULTITHREADING #define lock #define _(x) diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index db328053c0..2179cb3c4d 100755 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -78,11 +78,11 @@ public: // Hand State - void setHandState(char s) { _handState = s; }; - char getHandState() const {return _handState; }; + void setHandState(char s) { _handState = s; } + char getHandState() const {return _handState; } // getters for camera details - const glm::vec3& getCameraPosition() const { return _cameraPosition; }; + const glm::vec3& getCameraPosition() const { return _cameraPosition; } const glm::quat& getCameraOrientation() const { return _cameraOrientation; } float getCameraFov() const { return _cameraFov; } float getCameraAspectRatio() const { return _cameraAspectRatio; } diff --git a/libraries/shared/src/NetworkPacket.h b/libraries/shared/src/NetworkPacket.h index 01bced6a71..8017f7057e 100644 --- a/libraries/shared/src/NetworkPacket.h +++ b/libraries/shared/src/NetworkPacket.h @@ -32,12 +32,12 @@ public: NetworkPacket(sockaddr& address, unsigned char* packetData, ssize_t packetLength); - sockaddr& getAddress() { return _address; }; - ssize_t getLength() const { return _packetLength; }; - unsigned char* getData() { return &_packetData[0]; }; + sockaddr& getAddress() { return _address; } + ssize_t getLength() const { return _packetLength; } + unsigned char* getData() { return &_packetData[0]; } - const sockaddr& getAddress() const { return _address; }; - const unsigned char* getData() const { return &_packetData[0]; }; + const sockaddr& getAddress() const { return _address; } + const unsigned char* getData() const { return &_packetData[0]; } private: void copyContents(const sockaddr& address, const unsigned char* packetData, ssize_t packetLength); diff --git a/libraries/shared/src/Node.h b/libraries/shared/src/Node.h index df20664bda..2de75bcec1 100644 --- a/libraries/shared/src/Node.h +++ b/libraries/shared/src/Node.h @@ -58,15 +58,15 @@ public: NodeData* getLinkedData() const { return _linkedData; } void setLinkedData(NodeData* linkedData) { _linkedData = linkedData; } - bool isAlive() const { return _isAlive; }; - void setAlive(bool isAlive) { _isAlive = isAlive; }; + bool isAlive() const { return _isAlive; } + void setAlive(bool isAlive) { _isAlive = isAlive; } void recordBytesReceived(int bytesReceived); float getAverageKilobitsPerSecond(); float getAveragePacketsPerSecond(); - int getPingMs() const { return _pingMs; }; - void setPingMs(int pingMs) { _pingMs = pingMs; }; + int getPingMs() const { return _pingMs; } + void setPingMs(int pingMs) { _pingMs = pingMs; } void lock() { pthread_mutex_lock(&_mutex); } void unlock() { pthread_mutex_unlock(&_mutex); } diff --git a/libraries/shared/src/NodeList.h b/libraries/shared/src/NodeList.h index 669e82da13..b76eab9da0 100644 --- a/libraries/shared/src/NodeList.h +++ b/libraries/shared/src/NodeList.h @@ -156,9 +156,9 @@ private: class NodeListIterator : public std::iterator { public: NodeListIterator(const NodeList* nodeList, int nodeIndex); - ~NodeListIterator() {}; + ~NodeListIterator() {} - int getNodeIndex() { return _nodeIndex; }; + int getNodeIndex() { return _nodeIndex; } NodeListIterator& operator=(const NodeListIterator& otherValue); diff --git a/libraries/shared/src/PerfStat.h b/libraries/shared/src/PerfStat.h index 22eb5d38b5..320da3d280 100644 --- a/libraries/shared/src/PerfStat.h +++ b/libraries/shared/src/PerfStat.h @@ -35,9 +35,9 @@ private: public: std::string group; - PerfStatHistory(): count(0), totalTime(0.0) {}; + PerfStatHistory(): count(0), totalTime(0.0) {} PerfStatHistory(std::string myGroup, double initialTime, long int initialCount) : - count(initialCount), totalTime(initialTime), group(myGroup) {}; + count(initialCount), totalTime(initialTime), group(myGroup) {} void recordTime(double thisTime) { totalTime+=thisTime; @@ -94,7 +94,7 @@ public: _start(usecTimestampNow()), _message(message), _renderWarningsOn(renderWarnings), - _alwaysDisplay(alwaysDisplay) { }; + _alwaysDisplay(alwaysDisplay) { } ~PerformanceWarning(); }; diff --git a/libraries/shared/src/PointerStack.h b/libraries/shared/src/PointerStack.h index a9066c54fc..1626db3a3b 100644 --- a/libraries/shared/src/PointerStack.h +++ b/libraries/shared/src/PointerStack.h @@ -18,7 +18,7 @@ public: PointerStack() : _elements(NULL), _elementsInUse(0), - _sizeOfElementsArray(0) {}; + _sizeOfElementsArray(0) {} ~PointerStack(); @@ -28,7 +28,7 @@ public: } _elements[_elementsInUse] = element; _elementsInUse++; - }; + } void* pop() { if (_elementsInUse) { @@ -39,14 +39,14 @@ public: return element; } return NULL; - }; + } void* top() const { return (_elementsInUse) ? _elements[_elementsInUse - 1] : NULL; } - bool isEmpty() const { return (_elementsInUse == 0); }; - bool empty() const { return (_elementsInUse == 0); }; - int count() const { return _elementsInUse; }; - int size() const { return _elementsInUse; }; + bool isEmpty() const { return (_elementsInUse == 0); } + bool empty() const { return (_elementsInUse == 0); } + int count() const { return _elementsInUse; } + int size() const { return _elementsInUse; } private: void growAndPush(void* element); diff --git a/libraries/shared/src/SharedUtil.h b/libraries/shared/src/SharedUtil.h index 32553b967b..82850d8de3 100644 --- a/libraries/shared/src/SharedUtil.h +++ b/libraries/shared/src/SharedUtil.h @@ -106,7 +106,7 @@ int removeFromSortedArrays(void* value, void** valueArray, float* keyArray, int* // Helper Class for debugging class debug { public: - static const char* valueOf(bool checkValue) { return checkValue ? "yes" : "no"; }; + static const char* valueOf(bool checkValue) { return checkValue ? "yes" : "no"; } }; #endif /* defined(__hifi__SharedUtil__) */ diff --git a/libraries/shared/src/StdDev.h b/libraries/shared/src/StdDev.h index ca13b67a61..74937f6f9a 100644 --- a/libraries/shared/src/StdDev.h +++ b/libraries/shared/src/StdDev.h @@ -16,7 +16,7 @@ class StDev { void addValue(float v); float getAverage(); float getStDev(); - int getSamples() {return sampleCount;}; + int getSamples() {return sampleCount;} private: float * data; int sampleCount; diff --git a/libraries/voxels/src/Tags.cpp b/libraries/voxels/src/Tags.cpp index 32d717cc6b..ef0a2a1faf 100644 --- a/libraries/voxels/src/Tags.cpp +++ b/libraries/voxels/src/Tags.cpp @@ -108,6 +108,10 @@ TagList::TagList(std::stringstream &ss) : } } +TagList::~TagList() { + _data.clear(); +} + TagCompound::TagCompound(std::stringstream &ss) : Tag(TAG_Compound, ss), _size(0), @@ -145,6 +149,10 @@ TagCompound::TagCompound(std::stringstream &ss) : } } +TagCompound::~TagCompound() { + _data.clear(); +} + TagIntArray::TagIntArray(std::stringstream &ss) : Tag(TAG_Int_Array, ss) { _size = ss.get() << 24 | ss.get() << 16 | ss.get() << 8 | ss.get(); diff --git a/libraries/voxels/src/Tags.h b/libraries/voxels/src/Tags.h index 9888190b14..84aec00627 100644 --- a/libraries/voxels/src/Tags.h +++ b/libraries/voxels/src/Tags.h @@ -124,6 +124,7 @@ private: class TagList : public Tag { public: TagList(std::stringstream &ss); + ~TagList(); int getTagId() const {return _tagId;} int getSize () const {return _size; } @@ -138,6 +139,7 @@ private: class TagCompound : public Tag { public: TagCompound(std::stringstream &ss); + ~TagCompound(); int getSize () const {return _size; } std::list getData () const {return _data; } diff --git a/libraries/voxels/src/VoxelNode.h b/libraries/voxels/src/VoxelNode.h index 5035dbaad3..c98b26744c 100644 --- a/libraries/voxels/src/VoxelNode.h +++ b/libraries/voxels/src/VoxelNode.h @@ -34,8 +34,8 @@ public: VoxelNode(unsigned char * octalCode); // regular constructor ~VoxelNode(); - unsigned char* getOctalCode() const { return _octalCode; }; - VoxelNode* getChildAtIndex(int childIndex) const { return _children[childIndex]; }; + unsigned char* getOctalCode() const { return _octalCode; } + VoxelNode* getChildAtIndex(int childIndex) const { return _children[childIndex]; } void deleteChildAtIndex(int childIndex); VoxelNode* removeChildAtIndex(int childIndex); VoxelNode* addChildAtIndex(int childIndex); @@ -45,15 +45,15 @@ public: void setRandomColor(int minimumBrightness); bool collapseIdenticalLeaves(); - const AABox& getAABox() const { return _box; }; - const glm::vec3& getCenter() const { return _box.getCenter(); }; - const glm::vec3& getCorner() const { return _box.getCorner(); }; - float getScale() const { return _box.getSize().x; /* voxelScale = (1 / powf(2, *node->getOctalCode())); */ }; - int getLevel() const { return *_octalCode + 1; /* one based or zero based? this doesn't correctly handle 2 byte case */ }; + const AABox& getAABox() const { return _box; } + const glm::vec3& getCenter() const { return _box.getCenter(); } + const glm::vec3& getCorner() const { return _box.getCorner(); } + float getScale() const { return _box.getSize().x; } // voxelScale = (1 / powf(2, *node->getOctalCode())); } + int getLevel() const { return *_octalCode + 1; } // one based or zero based? this doesn't correctly handle 2 byte case float getEnclosingRadius() const; - bool isColored() const { return (_trueColor[3]==1); }; + bool isColored() const { return (_trueColor[3]==1); } bool isInView(const ViewFrustum& viewFrustum) const; ViewFrustum::location inFrustum(const ViewFrustum& viewFrustum) const; float distanceToCamera(const ViewFrustum& viewFrustum) const; @@ -68,18 +68,18 @@ public: bool isLeaf() const { return _childCount == 0; } int getChildCount() const { return _childCount; } void printDebugDetails(const char* label) const; - bool isDirty() const { return _isDirty; }; - void clearDirtyBit() { _isDirty = false; }; - bool hasChangedSince(uint64_t time) const { return (_lastChanged > time); }; - void markWithChangedTime() { _lastChanged = usecTimestampNow(); }; - uint64_t getLastChanged() const { return _lastChanged; }; + bool isDirty() const { return _isDirty; } + void clearDirtyBit() { _isDirty = false; } + bool hasChangedSince(uint64_t time) const { return (_lastChanged > time); } + void markWithChangedTime() { _lastChanged = usecTimestampNow(); } + uint64_t getLastChanged() const { return _lastChanged; } void handleSubtreeChanged(VoxelTree* myTree); - glBufferIndex getBufferIndex() const { return _glBufferIndex; }; - bool isKnownBufferIndex() const { return (_glBufferIndex != GLBUFFER_INDEX_UNKNOWN); }; - void setBufferIndex(glBufferIndex index) { _glBufferIndex = index; }; - VoxelSystem* getVoxelSystem() const { return _voxelSystem; }; - void setVoxelSystem(VoxelSystem* voxelSystem) { _voxelSystem = voxelSystem; }; + glBufferIndex getBufferIndex() const { return _glBufferIndex; } + bool isKnownBufferIndex() const { return (_glBufferIndex != GLBUFFER_INDEX_UNKNOWN); } + void setBufferIndex(glBufferIndex index) { _glBufferIndex = index; } + VoxelSystem* getVoxelSystem() const { return _voxelSystem; } + void setVoxelSystem(VoxelSystem* voxelSystem) { _voxelSystem = voxelSystem; } // Used by VoxelSystem for rendering in/out of view and LOD @@ -89,10 +89,10 @@ public: #ifndef NO_FALSE_COLOR // !NO_FALSE_COLOR means, does have false color void setFalseColor(colorPart red, colorPart green, colorPart blue); void setFalseColored(bool isFalseColored); - bool getFalseColored() { return _falseColored; }; + bool getFalseColored() { return _falseColored; } void setColor(const nodeColor& color); - const nodeColor& getTrueColor() const { return _trueColor; }; - const nodeColor& getColor() const { return _currentColor; }; + const nodeColor& getTrueColor() const { return _trueColor; } + const nodeColor& getColor() const { return _currentColor; } #else void setFalseColor(colorPart red, colorPart green, colorPart blue) { /* no op */ }; void setFalseColored(bool isFalseColored) { /* no op */ }; @@ -103,18 +103,18 @@ public: const nodeColor& getColor() const { return _trueColor; }; #endif - void setDensity(float density) { _density = density; }; - float getDensity() const { return _density; }; - void setSourceID(uint16_t sourceID) { _sourceID = sourceID; }; - uint16_t getSourceID() const { return _sourceID; }; + void setDensity(float density) { _density = density; } + float getDensity() const { return _density; } + void setSourceID(uint16_t sourceID) { _sourceID = sourceID; } + uint16_t getSourceID() const { return _sourceID; } static void addDeleteHook(VoxelNodeDeleteHook* hook); static void removeDeleteHook(VoxelNodeDeleteHook* hook); void recalculateSubTreeNodeCount(); - unsigned long getSubTreeNodeCount() const { return _subtreeNodeCount; }; - unsigned long getSubTreeInternalNodeCount() const { return _subtreeNodeCount - _subtreeLeafNodeCount; }; - unsigned long getSubTreeLeafNodeCount() const { return _subtreeLeafNodeCount; }; + unsigned long getSubTreeNodeCount() const { return _subtreeNodeCount; } + unsigned long getSubTreeInternalNodeCount() const { return _subtreeNodeCount - _subtreeLeafNodeCount; } + unsigned long getSubTreeLeafNodeCount() const { return _subtreeLeafNodeCount; } private: void calculateAABox(); diff --git a/libraries/voxels/src/VoxelNodeBag.h b/libraries/voxels/src/VoxelNodeBag.h index a29e7678c9..01d7303165 100644 --- a/libraries/voxels/src/VoxelNodeBag.h +++ b/libraries/voxels/src/VoxelNodeBag.h @@ -27,8 +27,8 @@ public: bool contains(VoxelNode* node); // is this node in the bag? void remove(VoxelNode* node); // remove a specific item from the bag - bool isEmpty() const { return (_elementsInUse == 0); }; - int count() const { return _elementsInUse; }; + bool isEmpty() const { return (_elementsInUse == 0); } + int count() const { return _elementsInUse; } void deleteAll(); diff --git a/libraries/voxels/src/VoxelProjectedPolygon.h b/libraries/voxels/src/VoxelProjectedPolygon.h index 5846b3d34d..51daf28330 100644 --- a/libraries/voxels/src/VoxelProjectedPolygon.h +++ b/libraries/voxels/src/VoxelProjectedPolygon.h @@ -19,19 +19,19 @@ class BoundingBox { public: enum { BOTTOM_LEFT, BOTTOM_RIGHT, TOP_RIGHT, TOP_LEFT, VERTEX_COUNT }; - BoundingBox(glm::vec2 corner, glm::vec2 size) : corner(corner), size(size), _set(true) {}; - BoundingBox() : _set(false) {}; + BoundingBox(glm::vec2 corner, glm::vec2 size) : corner(corner), size(size), _set(true) {} + BoundingBox() : _set(false) {} glm::vec2 corner; glm::vec2 size; bool contains(const BoundingBox& box) const; bool contains(const glm::vec2& point) const; - bool pointInside(const glm::vec2& point) const { return contains(point); }; - + bool pointInside(const glm::vec2& point) const { return contains(point); } + void explandToInclude(const BoundingBox& box); - float area() const { return size.x * size.y; }; + float area() const { return size.x * size.y; } - int getVertexCount() const { return VERTEX_COUNT; }; + int getVertexCount() const { return VERTEX_COUNT; } glm::vec2 getVertex(int vertexNumber) const; BoundingBox topHalf() const; @@ -66,23 +66,23 @@ public: _vertexCount(vertexCount), _maxX(-FLT_MAX), _maxY(-FLT_MAX), _minX(FLT_MAX), _minY(FLT_MAX), _distance(0) - { }; + { } - ~VoxelProjectedPolygon() { }; - const ProjectedVertices& getVertices() const { return _vertices; }; - const glm::vec2& getVertex(int i) const { return _vertices[i]; }; + ~VoxelProjectedPolygon() { } + const ProjectedVertices& getVertices() const { return _vertices; } + const glm::vec2& getVertex(int i) const { return _vertices[i]; } void setVertex(int vertex, const glm::vec2& point); - int getVertexCount() const { return _vertexCount; }; - void setVertexCount(int vertexCount) { _vertexCount = vertexCount; }; + int getVertexCount() const { return _vertexCount; } + void setVertexCount(int vertexCount) { _vertexCount = vertexCount; } float getDistance() const { return _distance; } void setDistance(float distance) { _distance = distance; } - bool getAnyInView() const { return _anyInView; }; - void setAnyInView(bool anyInView) { _anyInView = anyInView; }; - bool getAllInView() const { return _allInView; }; - void setAllInView(bool allInView) { _allInView = allInView; }; - void setProjectionType(unsigned char type) { _projectionType = type; }; - unsigned char getProjectionType() const { return _projectionType; }; + bool getAnyInView() const { return _anyInView; } + void setAnyInView(bool anyInView) { _anyInView = anyInView; } + bool getAllInView() const { return _allInView; } + void setAllInView(bool allInView) { _allInView = allInView; } + void setProjectionType(unsigned char type) { _projectionType = type; } + unsigned char getProjectionType() const { return _projectionType; } bool pointInside(const glm::vec2& point, bool* matchesVertex = NULL) const; diff --git a/libraries/voxels/src/VoxelSceneStats.h b/libraries/voxels/src/VoxelSceneStats.h index 0883de45e1..fe358c686c 100644 --- a/libraries/voxels/src/VoxelSceneStats.h +++ b/libraries/voxels/src/VoxelSceneStats.h @@ -120,7 +120,7 @@ public: /// Returns details about items tracked by VoxelSceneStats /// \param Item item The item from the stats you're interested in. - ItemInfo& getItemInfo(Item item) { return _ITEMS[item]; }; + ItemInfo& getItemInfo(Item item) { return _ITEMS[item]; } /// Returns a UI formatted value of an item tracked by VoxelSceneStats /// \param Item item The item from the stats you're interested in. diff --git a/libraries/voxels/src/VoxelTree.h b/libraries/voxels/src/VoxelTree.h index 4128ba6cbd..4425bb96b1 100644 --- a/libraries/voxels/src/VoxelTree.h +++ b/libraries/voxels/src/VoxelTree.h @@ -158,10 +158,10 @@ public: int encodeTreeBitstream(VoxelNode* node, unsigned char* outputBuffer, int availableBytes, VoxelNodeBag& bag, EncodeBitstreamParams& params) ; - bool isDirty() const { return _isDirty; }; - void clearDirtyBit() { _isDirty = false; }; - void setDirtyBit() { _isDirty = true; }; - unsigned long int getNodesChangedFromBitstream() const { return _nodesChangedFromBitstream; }; + bool isDirty() const { return _isDirty; } + void clearDirtyBit() { _isDirty = false; } + void setDirtyBit() { _isDirty = true; } + unsigned long int getNodesChangedFromBitstream() const { return _nodesChangedFromBitstream; } bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, VoxelNode*& node, float& distance, BoxFace& face);