mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Run clang-format
This commit is contained in:
@@ -835,7 +835,8 @@ int main(int argc, char *argv[]) {
|
||||
} else {
|
||||
process();
|
||||
}
|
||||
} else if (!options.palettes.empty() && options.palSpecType == Options::EXPLICIT && !options.reverse()) {
|
||||
} else if (!options.palettes.empty() && options.palSpecType == Options::EXPLICIT
|
||||
&& !options.reverse()) {
|
||||
processPalettes();
|
||||
} else {
|
||||
fputs("FATAL: No input image specified\n", stderr);
|
||||
|
||||
@@ -177,7 +177,8 @@ void parseInlinePalSpec(char const * const rawArg) {
|
||||
*/
|
||||
template<size_t n>
|
||||
[[gnu::warn_unused_result]] // Ignoring failure to match is a bad idea.
|
||||
static bool readMagic(std::filebuf &file, char const *magic) {
|
||||
static bool
|
||||
readMagic(std::filebuf &file, char const *magic) {
|
||||
assume(strlen(magic) == n);
|
||||
|
||||
char magicBuf[n];
|
||||
@@ -208,7 +209,8 @@ static T readLE(U const *bytes) {
|
||||
* @return true if a line was read.
|
||||
*/
|
||||
[[gnu::warn_unused_result]] // Ignoring EOF is a bad idea.
|
||||
static bool readLine(std::filebuf &file, std::string &buffer) {
|
||||
static bool
|
||||
readLine(std::filebuf &file, std::string &buffer) {
|
||||
// TODO: maybe this can be optimized to bulk reads?
|
||||
for (;;) {
|
||||
auto c = file.sbumpc();
|
||||
@@ -227,7 +229,8 @@ static bool readLine(std::filebuf &file, std::string &buffer) {
|
||||
}
|
||||
}
|
||||
|
||||
#define requireLine(kind, file, buffer) do { \
|
||||
#define requireLine(kind, file, buffer) \
|
||||
do { \
|
||||
if (!readLine(file, buffer)) { \
|
||||
error(kind " palette file is shorter than expected"); \
|
||||
return; \
|
||||
@@ -375,7 +378,8 @@ static void parseGPLFile(std::filebuf &file) {
|
||||
return;
|
||||
}
|
||||
// Ignore anything following the three components
|
||||
// (sometimes it's a comment, sometimes it's the color in CSS hex format, sometimes there's nothing...).
|
||||
// (sometimes it's a comment, sometimes it's the color in CSS hex format, sometimes there's
|
||||
// nothing...).
|
||||
|
||||
if (nbColors < maxNbColors) {
|
||||
if (nbColors % options.nbColorsPerPal == 0) {
|
||||
|
||||
Reference in New Issue
Block a user