Skip to content

Commit

Permalink
OvrIntegration: Avoid std::string in Error struct
Browse files Browse the repository at this point in the history
Signed-off-by: Squareys <Squareys@googlemail.com>
  • Loading branch information
Squareys committed Jun 13, 2016
1 parent 3b68411 commit 5253cd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Magnum/OvrIntegration/Context.cpp
Expand Up @@ -84,7 +84,11 @@ Error Context::error() const {
ovrErrorInfo info;
ovr_GetLastErrorInfo(&info);

return Error{ErrorType(info.Result), info.ErrorString};
Error err;
err.type = ErrorType(info.Result);
strncpy(err.message, info.ErrorString, 512);

return err;
}

}}
4 changes: 2 additions & 2 deletions src/Magnum/OvrIntegration/Context.h
Expand Up @@ -46,8 +46,8 @@ namespace Magnum { namespace OvrIntegration {
@see @ref Context::error()
*/
struct Error {
ErrorType type; /**< @brief Error type */
std::string message; /**< @brief Error message */
ErrorType type; /**< @brief Error type */
char message[512]; /**< @brief Error message */
};

/**
Expand Down

0 comments on commit 5253cd4

Please sign in to comment.