diff options
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/Error.inl')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/Error.inl | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/Error.inl b/src/3rdparty/angle/src/libANGLE/Error.inl index 900fc5fd03..4632830ce0 100644 --- a/src/3rdparty/angle/src/libANGLE/Error.inl +++ b/src/3rdparty/angle/src/libANGLE/Error.inl @@ -37,6 +37,21 @@ Error::Error(Error &&other) { } +// automatic error type conversion +Error::Error(egl::Error &&eglErr) + : mCode(GL_INVALID_OPERATION), + mID(0), + mMessage(std::move(eglErr.mMessage)) +{ +} + +Error::Error(egl::Error eglErr) + : mCode(GL_INVALID_OPERATION), + mID(0), + mMessage(std::move(eglErr.mMessage)) +{ +} + Error &Error::operator=(const Error &other) { mCode = other.mCode; @@ -82,7 +97,7 @@ bool Error::isError() const return (mCode != GL_NO_ERROR); } -} +} // namespace gl namespace egl { @@ -111,6 +126,21 @@ Error::Error(Error &&other) { } +// automatic error type conversion +Error::Error(gl::Error &&glErr) + : mCode(EGL_BAD_ACCESS), + mID(0), + mMessage(std::move(glErr.mMessage)) +{ +} + +Error::Error(gl::Error glErr) + : mCode(EGL_BAD_ACCESS), + mID(0), + mMessage(std::move(glErr.mMessage)) +{ +} + Error &Error::operator=(const Error &other) { mCode = other.mCode; |