mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Silence compiler warning
Silence compiler warnings about methods with return value and potentially not returning anything. This happens with gcc8 and the `-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -std=c++11` flags passed to it by default on openSUSE.
This commit is contained in:
@@ -608,6 +608,7 @@ HashFunction *HashFunction::getHashFunction(Function function)
|
||||
return nullptr;
|
||||
// No default for compiler warnings
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool HashFunction::getConstant(const char *in, Function &out)
|
||||
|
||||
@@ -64,6 +64,7 @@ size_t getFormatStride(CommonFormat format)
|
||||
case CommonFormat::XYf_STPf_RGBAub:
|
||||
return sizeof(XYf_STPf_RGBAub);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 getFormatFlags(CommonFormat format)
|
||||
@@ -88,6 +89,7 @@ uint32 getFormatFlags(CommonFormat format)
|
||||
case CommonFormat::XYf_STPf_RGBAub:
|
||||
return ATTRIBFLAG_POS | ATTRIBFLAG_TEXCOORD | ATTRIBFLAG_COLOR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getFormatPositionComponents(CommonFormat format)
|
||||
@@ -109,6 +111,7 @@ int getFormatPositionComponents(CommonFormat format)
|
||||
case CommonFormat::XYZf:
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t getIndexDataSize(IndexDataType type)
|
||||
@@ -157,6 +160,7 @@ int getIndexCount(TriangleIndexMode mode, int vertexCount)
|
||||
case TriangleIndexMode::QUADS:
|
||||
return vertexCount * 6 / 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user