[Scummvm-git-logs] scummvm master -> 40fb0c793c406294590d013600fee5bdc8de302b
bluegr
noreply at scummvm.org
Sun May 21 17:37:55 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
40fb0c793c WATCHMAKER: Improve error handling and fix some compiler warnings
Commit: 40fb0c793c406294590d013600fee5bdc8de302b
https://github.com/scummvm/scummvm/commit/40fb0c793c406294590d013600fee5bdc8de302b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2023-05-21T20:37:31+03:00
Commit Message:
WATCHMAKER: Improve error handling and fix some compiler warnings
asserts aren't enabled in release builds, so solely relying on them for
error handling is not recommended
Changed paths:
engines/watchmaker/3d/render/opengl_renderer.cpp
engines/watchmaker/3d/t3d_face.cpp
diff --git a/engines/watchmaker/3d/render/opengl_renderer.cpp b/engines/watchmaker/3d/render/opengl_renderer.cpp
index fc8819f8e74..ac54fd0ab06 100644
--- a/engines/watchmaker/3d/render/opengl_renderer.cpp
+++ b/engines/watchmaker/3d/render/opengl_renderer.cpp
@@ -208,7 +208,7 @@ GLenum translateBlendFactorToGL(BlendFactor factor) {
case BlendFactor::INVDESTCOLOR:
return GL_ONE_MINUS_DST_COLOR;
default:
- assert(false);
+ return GL_INVALID_VALUE;
}
}
diff --git a/engines/watchmaker/3d/t3d_face.cpp b/engines/watchmaker/3d/t3d_face.cpp
index 9154f27e28d..6e131e49774 100644
--- a/engines/watchmaker/3d/t3d_face.cpp
+++ b/engines/watchmaker/3d/t3d_face.cpp
@@ -58,7 +58,7 @@ const gMaterial *t3dFACE::getMaterial() const {
if (_mat) {
return _mat.get();
} else {
- assert(0);
+ error("t3dFACE::getMaterial(): No material loaded");
}
}
More information about the Scummvm-git-logs
mailing list