don't use shared_ptr::get() for null test

unnecesarily verbose
This commit is contained in:
Michael Davidsaver
2018-02-12 14:25:43 -08:00
parent f2ad6292f5
commit 7e8c49f0a0
5 changed files with 14 additions and 14 deletions

View File

@@ -76,14 +76,14 @@ void PVStructureArray::compress() {
size_t newLength = 0;
for(size_t i=0; i<length; i++) {
if(vec[i].get()!=NULL) {
if(vec[i]) {
newLength++;
continue;
}
// find first non 0
size_t notNull = 0;
for(size_t j=i+1;j<length;j++) {
if(vec[j].get()!=NULL) {
if(vec[j]) {
notNull = j;
break;
}