Skip to content

Commit fcaae94

Browse files
committed
Provide explicit PackagePath::operator=() to fix gcc warning.
1 parent eca7e4d commit fcaae94

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/sw/support/package_path.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ struct PathBase
6161
{
6262
}
6363

64+
PathBase &operator=(const PathBase &rhs) {
65+
data = rhs.data;
66+
return *this;
67+
}
68+
6469
PathElement toString(const PathElement &delim = ".") const
6570
{
6671
PathElement p;
@@ -184,6 +189,7 @@ struct SecureSplitablePath : PathBase<ThisType>
184189
{
185190
using Base = PathBase<ThisType>;
186191
using Base::Base;
192+
using Base::operator=;
187193

188194
ThisType operator/(const String &e) const
189195
{
@@ -208,12 +214,18 @@ struct SW_SUPPORT_API PackagePath : SecureSplitablePath<PackagePath>
208214
};
209215

210216
using Base::Base;
217+
using Base::operator=;
211218
PackagePath() = default;
212219
PackagePath(const char *s);
213220
PackagePath(String s);
214221
PackagePath(const PackagePath &p);
215222
~PackagePath() = default;
216223

224+
PackagePath &operator=(const PackagePath &rhs) {
225+
((Base&)*this).operator=(rhs);
226+
return *this;
227+
}
228+
217229
String toPath() const;
218230
path toFileSystemPath() const;
219231

0 commit comments

Comments
 (0)