mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
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:
2
Makefile
2
Makefile
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user