Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite5c7019

Browse files
Some more code refactoring. Remove ungliness caused by references
1 parenta96813b commite5c7019

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
classGalleyVectorBin:publicGalleyVectorBase
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<classT>classGalleyVectorV:publicGalleyVectorBase
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)

[8]ページ先頭

©2009-2025 Movatter.jp