Skip to content

Commit

Permalink
inline mis-redeclaration fixed on two *TagSet.h files.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
LucaBH authored and levy committed Jul 4, 2022
1 parent 8d683bd commit fab1a92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/inet/common/packet/tag/SharingRegionTagSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class INET_API SharingRegionTagSet : public cObject
Ptr<SharedVector<RegionTag<TagBase>>> regionTags;

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

void ensureTagsVectorAllocated();
void prepareTagsVectorForUpdate();
void sortTagsVector();
inline void sortTagsVector();

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

SharingRegionTagSet& operator=(const SharingRegionTagSet& other);
SharingRegionTagSet& operator=(SharingRegionTagSet&& other);
inline SharingRegionTagSet& operator=(const SharingRegionTagSet& other);
inline SharingRegionTagSet& operator=(SharingRegionTagSet&& other);

virtual void parsimPack(cCommBuffer *buffer) const override;
virtual void parsimUnpack(cCommBuffer *buffer) override;
Expand All @@ -160,27 +160,27 @@ class INET_API SharingRegionTagSet : public cObject
/**
* Returns the number of tags.
*/
int getNumTags() const;
inline int getNumTags() const;

/**
* Returns the shared tag at the given index.
*/
const Ptr<const TagBase>& getTag(int index) const;
inline const Ptr<const TagBase>& getTag(int index) const;

/**
* Returns the exclusively owned tag at the given index for update.
*/
const Ptr<TagBase> getTagForUpdate(int index);
inline const Ptr<TagBase> getTagForUpdate(int index);

/**
* Returns the shared region tag at the given index.
*/
const RegionTag<TagBase>& getRegionTag(int index) const;
inline const RegionTag<TagBase>& getRegionTag(int index) const;

/**
* Returns the exclusively owned region tag at the given index.
*/
const RegionTag<TagBase> getRegionTagForUpdate(int index);
inline const RegionTag<TagBase> getRegionTagForUpdate(int index);

/**
* Clears the set of tags in the given region.
Expand Down
6 changes: 3 additions & 3 deletions src/inet/common/packet/tag/SharingTagSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class INET_API SharingTagSet : public cObject
Ptr<SharedVector<Ptr<const TagBase>>> tags;

protected:
void setTag(int index, const Ptr<const TagBase>& tag);
inline void setTag(int index, const Ptr<const TagBase>& tag);
void addTag(const Ptr<const TagBase>& tag);
const Ptr<TagBase> removeTag(int index);

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

SharingTagSet& operator=(const SharingTagSet& other);
SharingTagSet& operator=(SharingTagSet&& other);
inline SharingTagSet& operator=(const SharingTagSet& other);
inline SharingTagSet& operator=(SharingTagSet&& other);

virtual void parsimPack(cCommBuffer *buffer) const override;
virtual void parsimUnpack(cCommBuffer *buffer) override;
Expand Down

0 comments on commit fab1a92

Please sign in to comment.