Skip to content

Commit e5c7019

Browse files
Some more code refactoring. Remove ungliness caused by references
1 parent a96813b commit e5c7019

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

blobstamper/galley.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ GalleyVectorBin::ExtractBinVector(std::shared_ptr<Blob> blob)
7070

7171
for(int i = 0; i<blobs.size(); i++)
7272
{
73-
res[i] = b_stamp->ExtractBin(blobs[i]);
73+
res[i] = std::dynamic_pointer_cast<StampBaseBin>(stamp)->ExtractBin(blobs[i]);
7474
}
7575
return res;
7676
}

blobstamper/galley.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,16 @@ template<class T> class GalleyVectorStrStampBase: public GalleyVectorStr, publi
6969

7070
class GalleyVectorBin: public GalleyVectorBase
7171
{
72-
std::shared_ptr<StampBaseBin> b_stamp;
7372
public:
74-
GalleyVectorBin(std::shared_ptr<StampBaseBin> stamp_arg): GalleyVectorBase(stamp_arg), b_stamp(stamp_arg) {};
73+
GalleyVectorBin(std::shared_ptr<StampBaseBin> stamp_arg): GalleyVectorBase(stamp_arg) {};
7574
std::vector<std::vector<char>> ExtractBinVector(std::shared_ptr<Blob> blob);
7675
};
7776

7877

7978
template<class T> class GalleyVectorV: public GalleyVectorBase
8079
{
81-
std::shared_ptr<StampBaseV<T>> v_stamp;
8280
public:
83-
GalleyVectorV(std::shared_ptr<StampBaseV<T>> stamp_arg): GalleyVectorBase(stamp_arg), v_stamp(stamp_arg) {};
81+
GalleyVectorV(std::shared_ptr<StampBaseV<T>> stamp_arg): GalleyVectorBase(stamp_arg) {};
8482
std::vector<T> ExtractValuesVector(std::shared_ptr<Blob> blob);
8583
};
8684

@@ -93,7 +91,7 @@ GalleyVectorV<T>::ExtractValuesVector(std::shared_ptr<Blob> blob)
9391

9492
for(int i=0; i<blobs.size(); i++)
9593
{
96-
res[i] = v_stamp->ExtractValue(blobs[i]);
94+
res[i] = std::dynamic_pointer_cast<StampBaseV<T>>(stamp)->ExtractValue(blobs[i]);
9795
}
9896
return res;
9997
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy