mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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;
|
VoxelSceneStats _voxelSceneStats;
|
||||||
int parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress);
|
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;
|
std::vector<VoxelFade> _voxelFades;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
// copy assignment
|
// copy assignment
|
||||||
JurisdictionMap& JurisdictionMap::operator=(const JurisdictionMap& other) {
|
JurisdictionMap& JurisdictionMap::operator=(const JurisdictionMap& other) {
|
||||||
copyContents(other);
|
copyContents(other);
|
||||||
//printf("JurisdictionMap COPY ASSIGNMENT %p from %p\n", this, &other);
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ JurisdictionMap::JurisdictionMap(JurisdictionMap&& other) : _rootOctalCode(NULL)
|
||||||
init(other._rootOctalCode, other._endNodes);
|
init(other._rootOctalCode, other._endNodes);
|
||||||
other._rootOctalCode = NULL;
|
other._rootOctalCode = NULL;
|
||||||
other._endNodes.clear();
|
other._endNodes.clear();
|
||||||
//printf("JurisdictionMap MOVE CONSTRUCTOR %p from %p\n", this, &other);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// move assignment
|
// move assignment
|
||||||
|
@ -36,7 +34,6 @@ JurisdictionMap& JurisdictionMap::operator=(JurisdictionMap&& other) {
|
||||||
init(other._rootOctalCode, other._endNodes);
|
init(other._rootOctalCode, other._endNodes);
|
||||||
other._rootOctalCode = NULL;
|
other._rootOctalCode = NULL;
|
||||||
other._endNodes.clear();
|
other._endNodes.clear();
|
||||||
//printf("JurisdictionMap MOVE ASSIGNMENT %p from %p\n", this, &other);
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,10 +41,9 @@ JurisdictionMap& JurisdictionMap::operator=(JurisdictionMap&& other) {
|
||||||
// Copy constructor
|
// Copy constructor
|
||||||
JurisdictionMap::JurisdictionMap(const JurisdictionMap& other) : _rootOctalCode(NULL) {
|
JurisdictionMap::JurisdictionMap(const JurisdictionMap& other) : _rootOctalCode(NULL) {
|
||||||
copyContents(other);
|
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;
|
unsigned char* rootCode;
|
||||||
std::vector<unsigned char*> endNodes;
|
std::vector<unsigned char*> endNodes;
|
||||||
if (rootCodeIn) {
|
if (rootCodeIn) {
|
||||||
|
@ -76,7 +72,6 @@ void JurisdictionMap::copyContents(const JurisdictionMap& other) {
|
||||||
|
|
||||||
JurisdictionMap::~JurisdictionMap() {
|
JurisdictionMap::~JurisdictionMap() {
|
||||||
clear();
|
clear();
|
||||||
//printf("JurisdictionMap DESTRUCTOR %p\n",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JurisdictionMap::clear() {
|
void JurisdictionMap::clear() {
|
||||||
|
@ -99,19 +94,16 @@ JurisdictionMap::JurisdictionMap() : _rootOctalCode(NULL) {
|
||||||
|
|
||||||
std::vector<unsigned char*> emptyEndNodes;
|
std::vector<unsigned char*> emptyEndNodes;
|
||||||
init(rootCode, emptyEndNodes);
|
init(rootCode, emptyEndNodes);
|
||||||
//printf("JurisdictionMap DEFAULT CONSTRUCTOR %p\n",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JurisdictionMap::JurisdictionMap(const char* filename) : _rootOctalCode(NULL) {
|
JurisdictionMap::JurisdictionMap(const char* filename) : _rootOctalCode(NULL) {
|
||||||
clear(); // clean up our own memory
|
clear(); // clean up our own memory
|
||||||
readFromFile(filename);
|
readFromFile(filename);
|
||||||
//printf("JurisdictionMap INI FILE CONSTRUCTOR %p\n",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JurisdictionMap::JurisdictionMap(unsigned char* rootOctalCode, const std::vector<unsigned char*>& endNodes)
|
JurisdictionMap::JurisdictionMap(unsigned char* rootOctalCode, const std::vector<unsigned char*>& endNodes)
|
||||||
: _rootOctalCode(NULL) {
|
: _rootOctalCode(NULL) {
|
||||||
init(rootOctalCode, endNodes);
|
init(rootOctalCode, endNodes);
|
||||||
//printf("JurisdictionMap OCTCODE CONSTRUCTOR %p\n",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHexCodes) {
|
JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHexCodes) {
|
||||||
|
@ -128,7 +120,6 @@ JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHe
|
||||||
//printOctalCode(endNodeOctcode);
|
//printOctalCode(endNodeOctcode);
|
||||||
_endNodes.push_back(endNodeOctcode);
|
_endNodes.push_back(endNodeOctcode);
|
||||||
}
|
}
|
||||||
//printf("JurisdictionMap HEX STRING CONSTRUCTOR %p\n",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
JurisdictionMap(const JurisdictionMap& other); // copy constructor
|
JurisdictionMap(const JurisdictionMap& other); // copy constructor
|
||||||
|
|
||||||
// standard assignment
|
// standard assignment
|
||||||
JurisdictionMap& operator= (JurisdictionMap const &other); // copy assignment
|
JurisdictionMap& operator=(const JurisdictionMap& other); // copy assignment
|
||||||
|
|
||||||
#ifdef HAS_MOVE_SEMANTICS
|
#ifdef HAS_MOVE_SEMANTICS
|
||||||
// move constructor and assignment
|
// move constructor and assignment
|
||||||
|
@ -48,7 +48,7 @@ public:
|
||||||
unsigned char* getEndNodeOctalCode(int index) const { return _endNodes[index]; }
|
unsigned char* getEndNodeOctalCode(int index) const { return _endNodes[index]; }
|
||||||
int getEndNodeCount() const { return _endNodes.size(); }
|
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:
|
private:
|
||||||
void copyContents(const JurisdictionMap& other); // use assignment instead
|
void copyContents(const JurisdictionMap& other); // use assignment instead
|
||||||
|
|
Loading…
Reference in a new issue