Skip to content

Commit fab1a92

Browse files
LucaBHlevy
authored andcommitted
inline mis-redeclaration fixed on two *TagSet.h files.
Some methods in these two files were declared as inline, but in a way that the compiler complained. Typically this leaded just to some warnings. However, third-party projects linking might fail because of that (as linker found duplicate symbols).
1 parent 8d683bd commit fab1a92

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/inet/common/packet/tag/SharingRegionTagSet.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class INET_API SharingRegionTagSet : public cObject
123123
Ptr<SharedVector<RegionTag<TagBase>>> regionTags;
124124

125125
protected:
126-
void setTag(int index, const Ptr<const TagBase>& tag);
126+
inline void setTag(int index, const Ptr<const TagBase>& tag);
127127
void addTag(b offset, b length, const Ptr<const TagBase>& tag);
128128
std::vector<SharingRegionTagSet::RegionTag<TagBase>> addTagsWhereAbsent(const std::type_info& typeInfo, b offset, b length, const Ptr<const TagBase>& tag);
129129
const Ptr<TagBase> removeTag(int index);
@@ -139,7 +139,7 @@ class INET_API SharingRegionTagSet : public cObject
139139

140140
void ensureTagsVectorAllocated();
141141
void prepareTagsVectorForUpdate();
142-
void sortTagsVector();
142+
inline void sortTagsVector();
143143

144144
public:
145145
/** @name Constructors and operators */
@@ -148,8 +148,8 @@ class INET_API SharingRegionTagSet : public cObject
148148
SharingRegionTagSet(const SharingRegionTagSet& other) : regionTags(other.regionTags) {}
149149
SharingRegionTagSet(SharingRegionTagSet&& other) : regionTags(other.regionTags) { other.regionTags = nullptr; }
150150

151-
SharingRegionTagSet& operator=(const SharingRegionTagSet& other);
152-
SharingRegionTagSet& operator=(SharingRegionTagSet&& other);
151+
inline SharingRegionTagSet& operator=(const SharingRegionTagSet& other);
152+
inline SharingRegionTagSet& operator=(SharingRegionTagSet&& other);
153153

154154
virtual void parsimPack(cCommBuffer *buffer) const override;
155155
virtual void parsimUnpack(cCommBuffer *buffer) override;
@@ -160,27 +160,27 @@ class INET_API SharingRegionTagSet : public cObject
160160
/**
161161
* Returns the number of tags.
162162
*/
163-
int getNumTags() const;
163+
inline int getNumTags() const;
164164

165165
/**
166166
* Returns the shared tag at the given index.
167167
*/
168-
const Ptr<const TagBase>& getTag(int index) const;
168+
inline const Ptr<const TagBase>& getTag(int index) const;
169169

170170
/**
171171
* Returns the exclusively owned tag at the given index for update.
172172
*/
173-
const Ptr<TagBase> getTagForUpdate(int index);
173+
inline const Ptr<TagBase> getTagForUpdate(int index);
174174

175175
/**
176176
* Returns the shared region tag at the given index.
177177
*/
178-
const RegionTag<TagBase>& getRegionTag(int index) const;
178+
inline const RegionTag<TagBase>& getRegionTag(int index) const;
179179

180180
/**
181181
* Returns the exclusively owned region tag at the given index.
182182
*/
183-
const RegionTag<TagBase> getRegionTagForUpdate(int index);
183+
inline const RegionTag<TagBase> getRegionTagForUpdate(int index);
184184

185185
/**
186186
* Clears the set of tags in the given region.

src/inet/common/packet/tag/SharingTagSet.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class INET_API SharingTagSet : public cObject
4040
Ptr<SharedVector<Ptr<const TagBase>>> tags;
4141

4242
protected:
43-
void setTag(int index, const Ptr<const TagBase>& tag);
43+
inline void setTag(int index, const Ptr<const TagBase>& tag);
4444
void addTag(const Ptr<const TagBase>& tag);
4545
const Ptr<TagBase> removeTag(int index);
4646

@@ -57,8 +57,8 @@ class INET_API SharingTagSet : public cObject
5757
SharingTagSet(const SharingTagSet& other) : tags(other.tags) {}
5858
SharingTagSet(SharingTagSet&& other) : tags(other.tags) { other.tags = nullptr; }
5959

60-
SharingTagSet& operator=(const SharingTagSet& other);
61-
SharingTagSet& operator=(SharingTagSet&& other);
60+
inline SharingTagSet& operator=(const SharingTagSet& other);
61+
inline SharingTagSet& operator=(SharingTagSet&& other);
6262

6363
virtual void parsimPack(cCommBuffer *buffer) const override;
6464
virtual void parsimUnpack(cCommBuffer *buffer) override;

0 commit comments

Comments
 (0)