Fix compiling with Clang

Force version.c to be compiled as C++ (bodge, will need a proper fix for `version.c`)
Remove user-defined `ProtoPalette` assignment operator (same as default, anyway)
This commit is contained in:
ISSOtm
2022-03-05 01:27:05 +01:00
committed by Eldred Habert
parent 638d024040
commit 9262fefd07
3 changed files with 1 additions and 8 deletions

View File

@@ -124,7 +124,7 @@ rgbfix: ${rgbfix_obj}
$Q${CC} ${REALLDFLAGS} -o $@ ${rgbfix_obj} ${REALCFLAGS} src/version.c $Q${CC} ${REALLDFLAGS} -o $@ ${rgbfix_obj} ${REALCFLAGS} src/version.c
rgbgfx: ${rgbgfx_obj} rgbgfx: ${rgbgfx_obj}
$Q${CXX} ${REALLDFLAGS} ${PNGLDFLAGS} -o $@ ${rgbgfx_obj} ${REALCXXFLAGS} src/version.c ${PNGLDLIBS} $Q${CXX} ${REALLDFLAGS} ${PNGLDFLAGS} -o $@ ${rgbgfx_obj} ${REALCXXFLAGS} -x c++ src/version.c ${PNGLDLIBS}
# Rules to process files # Rules to process files

View File

@@ -33,8 +33,6 @@ public:
}; };
ComparisonResult compare(ProtoPalette const &other) const; ComparisonResult compare(ProtoPalette const &other) const;
ProtoPalette &operator=(ProtoPalette const &other);
size_t size() const; size_t size() const;
decltype(_colorIndices)::const_iterator begin() const; decltype(_colorIndices)::const_iterator begin() const;

View File

@@ -62,11 +62,6 @@ ProtoPalette::ComparisonResult ProtoPalette::compare(ProtoPalette const &other)
return theyBigger ? THEY_BIGGER : (weBigger ? WE_BIGGER : NEITHER); return theyBigger ? THEY_BIGGER : (weBigger ? WE_BIGGER : NEITHER);
} }
ProtoPalette &ProtoPalette::operator=(ProtoPalette const &other) {
_colorIndices = other._colorIndices;
return *this;
}
size_t ProtoPalette::size() const { size_t ProtoPalette::size() const {
return std::distance(begin(), end()); return std::distance(begin(), end());
} }