History

fix method names for CR feedback

ZappoMan committed 12 years ago

Commit 29bbead1 parent ca3cf6d11 files · +31 −32Browse files

Unified · Split

11 files
  1. libraries/entities/src/AddEntityOperator.cpp +3 −3
  2. libraries/entities/src/AddEntityOperator.h +3 −3
  3. libraries/entities/src/DeleteEntityOperator.cpp +2 −2
  4. libraries/entities/src/DeleteEntityOperator.h +2 −2
  5. libraries/entities/src/EntityTree.cpp +3 −4
  6. libraries/entities/src/MovingEntitiesOperator.cpp +3 −3
  7. libraries/entities/src/MovingEntitiesOperator.h +3 −3
  8. libraries/entities/src/UpdateEntityOperator.cpp +3 −3
  9. libraries/entities/src/UpdateEntityOperator.h +3 −3
  10. libraries/octree/src/Octree.cpp +3 −3
  11. libraries/octree/src/Octree.h +3 −3
libraries/entities/src/AddEntityOperator.cpp+3−3
@@ -29,7 +29,7 @@ AddEntityOperator::AddEntityOperator(EntityTree* tree, · 28 unmodified lines
29 _newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f);29 _newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f);
30}30}
31 31
32bool AddEntityOperator::PreRecursion(OctreeElement* element) {32bool AddEntityOperator::preRecursion(OctreeElement* element) {
33 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);33 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
34 34
35 // In Pre-recursion, we're generally deciding whether or not we want to recurse this35 // In Pre-recursion, we're generally deciding whether or not we want to recurse this
@@ -59,7 +59,7 @@ bool AddEntityOperator::PreRecursion(OctreeElement* element) { · 23 unmodified lines
59 return keepSearching; // if we haven't yet found it, keep looking59 return keepSearching; // if we haven't yet found it, keep looking
60}60}
61 61
62bool AddEntityOperator::PostRecursion(OctreeElement* element) {62bool AddEntityOperator::postRecursion(OctreeElement* element) {
63 // Post-recursion is the unwinding process. For this operation, while we63 // Post-recursion is the unwinding process. For this operation, while we
64 // unwind we want to mark the path as being dirty if we changed it below.64 // unwind we want to mark the path as being dirty if we changed it below.
65 // We might have two paths, one for the old entity and one for the new entity.65 // We might have two paths, one for the old entity and one for the new entity.
@@ -73,7 +73,7 @@ bool AddEntityOperator::PostRecursion(OctreeElement* element) { · 7 unmodified lines
73 return keepSearching; // if we haven't yet found it, keep looking73 return keepSearching; // if we haven't yet found it, keep looking
74}74}
75 75
76OctreeElement* AddEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) { 76OctreeElement* AddEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
77 // If we're getting called, it's because there was no child element at this index while recursing.77 // If we're getting called, it's because there was no child element at this index while recursing.
78 // We only care if this happens while still searching for the new entity location.78 // We only care if this happens while still searching for the new entity location.
79 // Check to see if 79 // Check to see if
libraries/entities/src/AddEntityOperator.h+3−3
@@ -16,9 +16,9 @@ class AddEntityOperator : public RecurseOctreeOperator { · 15 unmodified lines
16public:16public:
17 AddEntityOperator(EntityTree* tree, EntityItem* newEntity);17 AddEntityOperator(EntityTree* tree, EntityItem* newEntity);
18 18
19 virtual bool PreRecursion(OctreeElement* element);19 virtual bool preRecursion(OctreeElement* element);
20 virtual bool PostRecursion(OctreeElement* element);20 virtual bool postRecursion(OctreeElement* element);
21 virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);21 virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
22private:22private:
23 EntityTree* _tree;23 EntityTree* _tree;
24 EntityItem* _newEntity;24 EntityItem* _newEntity;
libraries/entities/src/DeleteEntityOperator.cpp+2−2
@@ -74,7 +74,7 @@ bool DeleteEntityOperator::subTreeContainsSomeEntitiesToDelete(OctreeElement* el · 73 unmodified lines
74 return containsEntity;74 return containsEntity;
75}75}
76 76
77bool DeleteEntityOperator::PreRecursion(OctreeElement* element) {77bool DeleteEntityOperator::preRecursion(OctreeElement* element) {
78 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);78 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
79 79
80 // In Pre-recursion, we're generally deciding whether or not we want to recurse this80 // In Pre-recursion, we're generally deciding whether or not we want to recurse this
@@ -114,7 +114,7 @@ bool DeleteEntityOperator::PreRecursion(OctreeElement* element) { · 33 unmodified lines
114 return keepSearching; // if we haven't yet found it, keep looking114 return keepSearching; // if we haven't yet found it, keep looking
115}115}
116 116
117bool DeleteEntityOperator::PostRecursion(OctreeElement* element) {117bool DeleteEntityOperator::postRecursion(OctreeElement* element) {
118 // Post-recursion is the unwinding process. For this operation, while we118 // Post-recursion is the unwinding process. For this operation, while we
119 // unwind we want to mark the path as being dirty if we changed it below.119 // unwind we want to mark the path as being dirty if we changed it below.
120 // We might have two paths, one for the old entity and one for the new entity.120 // We might have two paths, one for the old entity and one for the new entity.
libraries/entities/src/DeleteEntityOperator.h+2−2
@@ -34,8 +34,8 @@ public: · 33 unmodified lines
34 ~DeleteEntityOperator();34 ~DeleteEntityOperator();
35 35
36 void addEntityIDToDeleteList(const EntityItemID& searchEntityID);36 void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
37 virtual bool PreRecursion(OctreeElement* element);37 virtual bool preRecursion(OctreeElement* element);
38 virtual bool PostRecursion(OctreeElement* element);38 virtual bool postRecursion(OctreeElement* element);
39private:39private:
40 EntityTree* _tree;40 EntityTree* _tree;
41 QSet<EntityToDeleteDetails> _entitiesToDelete;41 QSet<EntityToDeleteDetails> _entitiesToDelete;
libraries/entities/src/EntityTree.cpp+3−4
@@ -1008,12 +1008,11 @@ void EntityTree::debugDumpMap() { · 1007 unmodified lines
1008 1008
1009class DebugOperator : public RecurseOctreeOperator {1009class DebugOperator : public RecurseOctreeOperator {
1010public:1010public:
1011 virtual bool PreRecursion(OctreeElement* element);1011 virtual bool preRecursion(OctreeElement* element);
1012 virtual bool PostRecursion(OctreeElement* element) { return true; };1012 virtual bool postRecursion(OctreeElement* element) { return true; }
1013 virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
1014};1013};
1015 1014
1016bool DebugOperator::PreRecursion(OctreeElement* element) {1015bool DebugOperator::preRecursion(OctreeElement* element) {
1017 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);1016 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
1018 qDebug() << "EntityTreeElement [" << entityTreeElement << "]";1017 qDebug() << "EntityTreeElement [" << entityTreeElement << "]";
1019 entityTreeElement->debugDump();1018 entityTreeElement->debugDump();
libraries/entities/src/MovingEntitiesOperator.cpp+3−3
@@ -67,7 +67,7 @@ bool MovingEntitiesOperator::shouldRecurseSubTree(OctreeElement* element) { · 66 unmodified lines
67 return containsEntity;67 return containsEntity;
68}68}
69 69
70bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) {70bool MovingEntitiesOperator::preRecursion(OctreeElement* element) {
71 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);71 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
72 72
73 // In Pre-recursion, we're generally deciding whether or not we want to recurse this73 // In Pre-recursion, we're generally deciding whether or not we want to recurse this
@@ -111,7 +111,7 @@ bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) { · 37 unmodified lines
111 return keepSearching; // if we haven't yet found it, keep looking111 return keepSearching; // if we haven't yet found it, keep looking
112}112}
113 113
114bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) {114bool MovingEntitiesOperator::postRecursion(OctreeElement* element) {
115 // Post-recursion is the unwinding process. For this operation, while we115 // Post-recursion is the unwinding process. For this operation, while we
116 // unwind we want to mark the path as being dirty if we changed it below.116 // unwind we want to mark the path as being dirty if we changed it below.
117 // We might have two paths, one for the old entity and one for the new entity.117 // We might have two paths, one for the old entity and one for the new entity.
@@ -129,7 +129,7 @@ bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) { · 11 unmodified lines
129 return keepSearching; // if we haven't yet found it, keep looking129 return keepSearching; // if we haven't yet found it, keep looking
130}130}
131 131
132OctreeElement* MovingEntitiesOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) {132OctreeElement* MovingEntitiesOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
133 // If we're getting called, it's because there was no child element at this index while recursing.133 // If we're getting called, it's because there was no child element at this index while recursing.
134 // We only care if this happens while still searching for the new entity locations.134 // We only care if this happens while still searching for the new entity locations.
135 if (_foundNewCount < _lookingCount) {135 if (_foundNewCount < _lookingCount) {
libraries/entities/src/MovingEntitiesOperator.h+3−3
@@ -37,9 +37,9 @@ public: · 36 unmodified lines
37 ~MovingEntitiesOperator();37 ~MovingEntitiesOperator();
38 38
39 void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube);39 void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube);
40 virtual bool PreRecursion(OctreeElement* element);40 virtual bool preRecursion(OctreeElement* element);
41 virtual bool PostRecursion(OctreeElement* element);41 virtual bool postRecursion(OctreeElement* element);
42 virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);42 virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
43 bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }43 bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
44private:44private:
45 EntityTree* _tree;45 EntityTree* _tree;
libraries/entities/src/UpdateEntityOperator.cpp+3−3
@@ -121,7 +121,7 @@ bool UpdateEntityOperator::subTreeContainsNewEntity(OctreeElement* element) { · 120 unmodified lines
121}121}
122 122
123 123
124bool UpdateEntityOperator::PreRecursion(OctreeElement* element) {124bool UpdateEntityOperator::preRecursion(OctreeElement* element) {
125 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);125 EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
126 126
127 // In Pre-recursion, we're generally deciding whether or not we want to recurse this127 // In Pre-recursion, we're generally deciding whether or not we want to recurse this
@@ -194,7 +194,7 @@ bool UpdateEntityOperator::PreRecursion(OctreeElement* element) { · 66 unmodified lines
194 return keepSearching; // if we haven't yet found it, keep looking194 return keepSearching; // if we haven't yet found it, keep looking
195}195}
196 196
197bool UpdateEntityOperator::PostRecursion(OctreeElement* element) {197bool UpdateEntityOperator::postRecursion(OctreeElement* element) {
198 // Post-recursion is the unwinding process. For this operation, while we198 // Post-recursion is the unwinding process. For this operation, while we
199 // unwind we want to mark the path as being dirty if we changed it below.199 // unwind we want to mark the path as being dirty if we changed it below.
200 // We might have two paths, one for the old entity and one for the new entity.200 // We might have two paths, one for the old entity and one for the new entity.
@@ -226,7 +226,7 @@ bool UpdateEntityOperator::PostRecursion(OctreeElement* element) { · 25 unmodified lines
226 return keepSearching; // if we haven't yet found it, keep looking226 return keepSearching; // if we haven't yet found it, keep looking
227}227}
228 228
229OctreeElement* UpdateEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) { 229OctreeElement* UpdateEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
230 // If we're getting called, it's because there was no child element at this index while recursing.230 // If we're getting called, it's because there was no child element at this index while recursing.
231 // We only care if this happens while still searching for the new entity location.231 // We only care if this happens while still searching for the new entity location.
232 // Check to see if 232 // Check to see if
libraries/entities/src/UpdateEntityOperator.h+3−3
@@ -18,9 +18,9 @@ public: · 17 unmodified lines
18 EntityItem* existingEntity, const EntityItemProperties& properties);18 EntityItem* existingEntity, const EntityItemProperties& properties);
19 ~UpdateEntityOperator();19 ~UpdateEntityOperator();
20 20
21 virtual bool PreRecursion(OctreeElement* element);21 virtual bool preRecursion(OctreeElement* element);
22 virtual bool PostRecursion(OctreeElement* element);22 virtual bool postRecursion(OctreeElement* element);
23 virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);23 virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
24private:24private:
25 EntityTree* _tree;25 EntityTree* _tree;
26 EntityItem* _existingEntity;26 EntityItem* _existingEntity;
libraries/octree/src/Octree.cpp+3−3
@@ -155,14 +155,14 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe · 154 unmodified lines
155 return false;155 return false;
156 }156 }
157 157
158 if (operatorObject->PreRecursion(element)) {158 if (operatorObject->preRecursion(element)) {
159 for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {159 for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
160 OctreeElement* child = element->getChildAtIndex(i);160 OctreeElement* child = element->getChildAtIndex(i);
161 161
162 // If there is no child at that location, the Operator may want to create a child at that location.162 // If there is no child at that location, the Operator may want to create a child at that location.
163 // So give the operator a chance to do so....163 // So give the operator a chance to do so....
164 if (!child) {164 if (!child) {
165 child = operatorObject->PossiblyCreateChildAt(element, i);165 child = operatorObject->possiblyCreateChildAt(element, i);
166 }166 }
167 167
168 if (child) {168 if (child) {
@@ -173,7 +173,7 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe · 4 unmodified lines
173 }173 }
174 }174 }
175 175
176 return operatorObject->PostRecursion(element);176 return operatorObject->postRecursion(element);
177}177}
178 178
179 179
libraries/octree/src/Octree.h+3−3
@@ -39,9 +39,9 @@ class Shape; · 38 unmodified lines
39/// derive from this class to use the Octree::recurseTreeWithOperator() method39/// derive from this class to use the Octree::recurseTreeWithOperator() method
40class RecurseOctreeOperator {40class RecurseOctreeOperator {
41public:41public:
42 virtual bool PreRecursion(OctreeElement* element) = 0;42 virtual bool preRecursion(OctreeElement* element) = 0;
43 virtual bool PostRecursion(OctreeElement* element) = 0;43 virtual bool postRecursion(OctreeElement* element) = 0;
44 virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }44 virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
45};45};
46 46
47// Callback function, for recuseTreeWithOperation47// Callback function, for recuseTreeWithOperation

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t