Skip to content

Commit

Permalink
remove remaining references to shared pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Aug 28, 2024
1 parent 56b74d7 commit 2e6d8d4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/libsrc++/BaseStructure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace evio {

if (dataType.isStructure()) {
children.clear();
for (auto const & kid : structure->children) {
for (auto const kid : structure->children) {
children.push_back(kid);
}
}
Expand Down Expand Up @@ -1436,7 +1436,7 @@ namespace evio {
}

if (!(structure->isLeaf())) {
for (auto const & child : structure->getChildren()) {
for (auto const child : structure->getChildren()) {
visitAllDescendants(child, listener, filter);
}
}
Expand Down Expand Up @@ -2657,7 +2657,7 @@ namespace evio {
else {
datalen = 0;

for (auto const & child : children) {
for (auto const child : children) {
len = child->setAllHeaderLengths();
//std::cout << " setAllHeaderLengths: child len = " << len << "\n";
// Add this check to make sure structure is not being overfilled
Expand Down Expand Up @@ -2885,7 +2885,7 @@ namespace evio {
}
} // isLeaf
else if (!children.empty()) {
for (auto const & child : children) {
for (auto const child : children) {
curPos += child->write(curPos, order);
}
} // not leaf
Expand Down Expand Up @@ -3376,7 +3376,7 @@ namespace evio {
rawBytes.clear();
// Get a rough idea of the size
size_t sz = 0;
for (auto const & cd : compositeData) {
for (auto const cd : compositeData) {
size_t cdSz = cd->getRawBytes().size();
//std::cout << "updateCompositeData: ADDing cd item of size = " << cdSz << "\n";
if (cdSz < 20) {
Expand Down
4 changes: 2 additions & 2 deletions src/libsrc++/CompositeData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ namespace evio {

// Get a total length (# bytes)
size_t totalLen = 0, len;
for (auto const & cd : data) {
for (auto const cd : data) {
len = cd->getRawBytes().size();
totalLen += len;
}
Expand All @@ -447,7 +447,7 @@ namespace evio {

// Copy everything in
int offset = 0;
for (auto const & cd : data) {
for (auto const cd : data) {
len = cd->getRawBytes().size();
if (cd->byteOrder != order) {
//std::cout << "CompositeData::generateRawBytes call swapAll()" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion src/libsrc++/EventParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ namespace evio {
}

if (!(structure->isLeaf())) {
for (auto const & child : structure->children) {
for (auto const child : structure->children) {
visitAllDescendants(topLevelStruct, child, listener, filter);
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/libsrc++/EvioCompactReaderV4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ namespace evio {
//" for tag/num = " << tag << "/" << num << std::endl;

// Now look for matches in this event
for (auto const & enode: list) {
for (auto const enode: list) {
// std::cout << "searchEvent: desired tag = " << tag << " found " << enode->getTag() << std::endl;
// std::cout << " : desired num = " << num << " found " << enode->getNum() << std::endl;
if (enode->getTag() == tag && enode->getNum() == num) {
Expand Down Expand Up @@ -695,7 +695,7 @@ namespace evio {
uint32_t removeNodePlace = 0;

// Locate the node to be removed ...
for (auto const & ev : eventNodes) {
for (auto const ev : eventNodes) {
removeNodePlace = 0;

// See if it's an event ...
Expand All @@ -706,7 +706,7 @@ namespace evio {
break;
}

for (auto const & n : ev->getAllNodes()) {
for (auto const n : ev->getAllNodes()) {
// The first node in allNodes is the event node,
// so do not increment removeNodePlace now.

Expand Down Expand Up @@ -747,8 +747,8 @@ namespace evio {
byteBuffer = newBuffer;

// All nodes need to use this new buffer
for (auto const & ev : eventNodes) {
for (auto const & n : ev->getAllNodes()) {
for (auto const ev : eventNodes) {
for (auto const n : ev->getAllNodes()) {
n->setBuffer(byteBuffer);
}
}
Expand Down Expand Up @@ -988,7 +988,7 @@ namespace evio {
uint32_t place = eventNode->place;

for (int i=0; i < eventCount; i++) {
for (auto const & n : eventNodes[i]->getAllNodes()) {
for (auto const n : eventNodes[i]->getAllNodes()) {
// Make sure nodes are using the new buffer
n->setBuffer(newBuffer);

Expand Down
2 changes: 1 addition & 1 deletion src/libsrc++/EvioCompactReaderV6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ namespace evio {
// " for tag/num = " << tag << "/" << +num << std::endl;

// Now look for matches in this event
for (auto & enode: list) {
for (auto enode: list) {
//std::cout << "searchEvent: desired tag = " << tag << " found " << enode->tag << std::endl;
//std::cout << " : desired num = " << +num << " found " << +(enode->num) << std::endl;
if (enode->tag == tag && enode->num == num) {
Expand Down

0 comments on commit 2e6d8d4

Please sign in to comment.