mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
CR feedback
This commit is contained in:
parent
8e07bd42ea
commit
4f16157e51
3 changed files with 4 additions and 13 deletions
|
@ -474,7 +474,7 @@ private:
|
|||
VoxelSceneStats _voxelSceneStats;
|
||||
int parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress);
|
||||
|
||||
std::map<uint16_t,JurisdictionMap> _voxelServerJurisdictions;
|
||||
std::map<uint16_t, JurisdictionMap> _voxelServerJurisdictions;
|
||||
|
||||
std::vector<VoxelFade> _voxelFades;
|
||||
};
|
||||
|
|
|
@ -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<unsigned char*> endNodesIn) {
|
||||
void JurisdictionMap::copyContents(unsigned char* rootCodeIn, const std::vector<unsigned char*>& endNodesIn) {
|
||||
unsigned char* rootCode;
|
||||
std::vector<unsigned char*> 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<unsigned char*> 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<unsigned char*>& 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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<unsigned char*> endNodesIn);
|
||||
void copyContents(unsigned char* rootCodeIn, const std::vector<unsigned char*>& endNodesIn);
|
||||
|
||||
private:
|
||||
void copyContents(const JurisdictionMap& other); // use assignment instead
|
||||
|
|
Loading…
Reference in a new issue