Currently, we check if an object is already present on the line using the __eq__ operator of a dataclass. However, in many cases, the objects are partial and should be merged, which in turn fails the __eq__ check and causes duplication. In such cases, keeping only one copy is also not desirable.
For example, in ZipUtils.h
class ZipSettings {
ZipSettings();
ZipSettings(Core::ZipUtils::ZipCompressionLevel);
~ZipSettings();
Core::ZipUtils::ZipFileRestrictions mRestrictions;
bool mZipDirectoryContents;
bool mSkipInaccessibleFiles;
int mCompressionLevel;
Bedrock::NonOwnerPointer<IFileAccess> mFileAccess;
std::string mPassword;
int mZip64;
};
class ZipSettings {
ZipSettings();
ZipSettings(Core::ZipUtils::ZipCompressionLevel compression);
~ZipSettings();
Core::ZipUtils::ZipFileRestrictions mRestrictions;
bool mZipDirectoryContents;
bool mSkipInaccessibleFiles;
int mCompressionLevel;
Bedrock::NonOwnerPointer<IFileAccess> mFileAccess;
std::string mPassword;
int mZip64;
};
should be merged, and the one with more info (i.e., the one whose constructor has parameter names) should be kept.
Currently, we check if an object is already present on the line using the
__eq__operator of a dataclass. However, in many cases, the objects are partial and should be merged, which in turn fails the__eq__check and causes duplication. In such cases, keeping only one copy is also not desirable.For example, in
ZipUtils.hshould be merged, and the one with more info (i.e., the one whose constructor has parameter names) should be kept.