From 2c44164418368a684437d2374ef1e9f0931f7a66 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 8 Oct 2015 08:47:46 +0000 Subject: Gem a4d9bc89797fec9b1b4f0278431e3d30315b414c osx/i386 built 'master:a4d9bc89797fec9b1b4f0278431e3d30315b414c' for osx/i386 --- Gem/develop/include/Gem/Gem/ContextData.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Gem/develop') diff --git a/Gem/develop/include/Gem/Gem/ContextData.h b/Gem/develop/include/Gem/Gem/ContextData.h index 74804da..94f51b3 100644 --- a/Gem/develop/include/Gem/Gem/ContextData.h +++ b/Gem/develop/include/Gem/Gem/ContextData.h @@ -53,6 +53,7 @@ template ////////// // Constructor + /* coverity[uninit_member] we track the un-initialization ourselves */ ContextData(void) : m_haveDefaultValue(false) {;} ContextData(ContextDataType v) : m_haveDefaultValue(true), m_defaultValue(v) {;} @@ -66,9 +67,9 @@ template * * @usage ContextDatam_fun; m_fun=GL_FUNC_ADD; * - * @pre We are in a draw process. + * @pre We have a valid context. * @note Should only be called from the draw function. - * Results are un-defined for other functions. + * Results are un-defined if there is no valid context */ virtual operator ContextDataType() { @@ -78,17 +79,19 @@ template /** * assigns a value to the correct context * - * @pre We are in a draw process. + * @pre We have a valid context. * @note Should only be called from the draw function. - * Results are un-defined for other functions. + * Results are un-defined if there is no valid context */ virtual ContextDataType&operator = (ContextDataType value) { /* simplistic approach to handle out-of-context assignments: * assign the value to all context instances + * and use it as default value for future contexts */ if(INVALID_CONTEXT==getCurContext()) { doSetAll(value); + m_defaultValue=value; m_haveDefaultValue=true; } return (*getPtrToCur()=value); @@ -120,7 +123,7 @@ template /** * Returns a pointer to the correct data element in the current context. * - * @pre We are in the draw function. + * @pre We have a valid context. * @post Synchronized. * @note ASSERT: Same context is rendered by same thread each time. */ -- cgit v1.2.1