From 8f5cd6cdc81a90b5f83c647238b5e762512618fe Mon Sep 17 00:00:00 2001 From: yangxiao Date: Thu, 10 Sep 2015 09:28:01 +0800 Subject: [PATCH] remove setParent --- cocos/renderer/CCMaterial.cpp | 4 ++-- cocos/renderer/CCRenderState.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index 9ff10ac6b4..2bd87a6a36 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -442,9 +442,9 @@ Material* Material::clone() const for (const auto& technique: _techniques) { auto t = technique->clone(); - t->setParent(material); + t->_parent = material; for (ssize_t i = 0; i < t->getPassCount(); i++) { - t->getPassByIndex(i)->setParent(t); + t->getPassByIndex(i)->_parent = t; } material->_techniques.pushBack(t); } diff --git a/cocos/renderer/CCRenderState.h b/cocos/renderer/CCRenderState.h index c30b3710ab..c26cd3bc48 100644 --- a/cocos/renderer/CCRenderState.h +++ b/cocos/renderer/CCRenderState.h @@ -84,12 +84,6 @@ public: * Returns the topmost RenderState in the hierarchy below the given RenderState. */ RenderState* getTopmost(RenderState* below); - - /** - * Set parent RenderState - * @param parent Parent RenderState - */ - void setParent(RenderState* parent) { _parent = parent; } enum Blend {