From 4f16157e5132ecd38d99e3b7862892b9eabfa192 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 15 Aug 2013 11:39:00 -0700 Subject: [PATCH] CR feedback --- interface/src/Application.h | 2 +- libraries/voxels/src/JurisdictionMap.cpp | 11 +---------- libraries/voxels/src/JurisdictionMap.h | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index bb7eff8295..88cb86312f 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -474,7 +474,7 @@ private: VoxelSceneStats _voxelSceneStats; int parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress); - std::map _voxelServerJurisdictions; + std::map _voxelServerJurisdictions; std::vector _voxelFades; }; diff --git a/libraries/voxels/src/JurisdictionMap.cpp b/libraries/voxels/src/JurisdictionMap.cpp index 377329caf2..360f74093d 100644 --- a/libraries/voxels/src/JurisdictionMap.cpp +++ b/libraries/voxels/src/JurisdictionMap.cpp @@ -18,7 +18,6 @@ // copy assignment JurisdictionMap& JurisdictionMap::operator=(const JurisdictionMap& other) { copyContents(other); - //printf("JurisdictionMap COPY ASSIGNMENT %p from %p\n", this, &other); return *this; } @@ -28,7 +27,6 @@ JurisdictionMap::JurisdictionMap(JurisdictionMap&& other) : _rootOctalCode(NULL) init(other._rootOctalCode, other._endNodes); other._rootOctalCode = NULL; other._endNodes.clear(); - //printf("JurisdictionMap MOVE CONSTRUCTOR %p from %p\n", this, &other); } // move assignment @@ -36,7 +34,6 @@ JurisdictionMap& JurisdictionMap::operator=(JurisdictionMap&& other) { init(other._rootOctalCode, other._endNodes); other._rootOctalCode = NULL; other._endNodes.clear(); - //printf("JurisdictionMap MOVE ASSIGNMENT %p from %p\n", this, &other); return *this; } #endif @@ -44,10 +41,9 @@ JurisdictionMap& JurisdictionMap::operator=(JurisdictionMap&& other) { // Copy constructor JurisdictionMap::JurisdictionMap(const JurisdictionMap& other) : _rootOctalCode(NULL) { copyContents(other); - //printf("JurisdictionMap COPY CONSTRUCTOR %p from %p\n", this, &other); } -void JurisdictionMap::copyContents(unsigned char* rootCodeIn, const std::vector endNodesIn) { +void JurisdictionMap::copyContents(unsigned char* rootCodeIn, const std::vector& endNodesIn) { unsigned char* rootCode; std::vector endNodes; if (rootCodeIn) { @@ -76,7 +72,6 @@ void JurisdictionMap::copyContents(const JurisdictionMap& other) { JurisdictionMap::~JurisdictionMap() { clear(); - //printf("JurisdictionMap DESTRUCTOR %p\n",this); } void JurisdictionMap::clear() { @@ -99,19 +94,16 @@ JurisdictionMap::JurisdictionMap() : _rootOctalCode(NULL) { std::vector emptyEndNodes; init(rootCode, emptyEndNodes); - //printf("JurisdictionMap DEFAULT CONSTRUCTOR %p\n",this); } JurisdictionMap::JurisdictionMap(const char* filename) : _rootOctalCode(NULL) { clear(); // clean up our own memory readFromFile(filename); - //printf("JurisdictionMap INI FILE CONSTRUCTOR %p\n",this); } JurisdictionMap::JurisdictionMap(unsigned char* rootOctalCode, const std::vector& endNodes) : _rootOctalCode(NULL) { init(rootOctalCode, endNodes); - //printf("JurisdictionMap OCTCODE CONSTRUCTOR %p\n",this); } JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHexCodes) { @@ -128,7 +120,6 @@ JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHe //printOctalCode(endNodeOctcode); _endNodes.push_back(endNodeOctcode); } - //printf("JurisdictionMap HEX STRING CONSTRUCTOR %p\n",this); } diff --git a/libraries/voxels/src/JurisdictionMap.h b/libraries/voxels/src/JurisdictionMap.h index 50aabb65f2..2b72596f76 100644 --- a/libraries/voxels/src/JurisdictionMap.h +++ b/libraries/voxels/src/JurisdictionMap.h @@ -25,7 +25,7 @@ public: JurisdictionMap(const JurisdictionMap& other); // copy constructor // standard assignment - JurisdictionMap& operator= (JurisdictionMap const &other); // copy assignment + JurisdictionMap& operator=(const JurisdictionMap& other); // copy assignment #ifdef HAS_MOVE_SEMANTICS // move constructor and assignment @@ -48,7 +48,7 @@ public: unsigned char* getEndNodeOctalCode(int index) const { return _endNodes[index]; } int getEndNodeCount() const { return _endNodes.size(); } - void copyContents(unsigned char* rootCodeIn, const std::vector endNodesIn); + void copyContents(unsigned char* rootCodeIn, const std::vector& endNodesIn); private: void copyContents(const JurisdictionMap& other); // use assignment instead