2
// Copyright 2014 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
6
// Error.inc: Inline definitions of egl::Error and gl::Error classes which encapsulate API errors
7
// and optional error messages.
9
#include "common/angleutils.h"
16
Error::Error(EGLint errorCode)
22
Error::Error(const Error &other)
28
createMessageString();
29
*mMessage = *(other.mMessage);
33
Error::Error(Error &&other)
36
mMessage(std::move(other.mMessage))
40
Error &Error::operator=(const Error &other)
47
createMessageString();
48
*mMessage = *(other.mMessage);
58
Error &Error::operator=(Error &&other)
64
mMessage = std::move(other.mMessage);
70
EGLint Error::getCode() const
75
EGLint Error::getID() const
80
bool Error::isError() const
82
return (mCode != EGL_SUCCESS);
86
Error Error::NoError()
88
return Error(EGL_SUCCESS);