aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-10-08 08:25:03 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-10-08 08:25:03 +0000
commit3f65baf58b152bd3c592387c590e49c2e986d517 (patch)
tree4c5554d2e2643c267a1559ca9a95ffc22c0df844 /Gem/develop
parentc2454cce12f95075980cf74f03be44a82a8d46a6 (diff)
Gem a4d9bc89797fec9b1b4f0278431e3d30315b414c osx/x86_64
built 'master:a4d9bc89797fec9b1b4f0278431e3d30315b414c' for osx/x86_64
Diffstat (limited to 'Gem/develop')
-rw-r--r--Gem/develop/include/Gem/Gem/ContextData.h13
1 files changed, 8 insertions, 5 deletions
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<class ContextDataType = int>
//////////
// 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<class ContextDataType = int>
*
* @usage ContextData<GLenum>m_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<class ContextDataType = int>
/**
* 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<class ContextDataType = int>
/**
* 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.
*/