------------------------------------------------------------- Description: Assigns a parent to the variable store. Arguments: variableStore - New parent of the variable store -------------------------------------------------------------
| 47 | // variableStore - New parent of the variable store |
| 48 | // ------------------------------------------------------------- |
| 49 | void Tr2VariableStore::SetParentVariableStore( Tr2VariableStore* variableStore ) |
| 50 | { |
| 51 | if( this == &GlobalStore() ) |
| 52 | { |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | #if TRINITYDEV |
| 57 | // Check if we don't assign a child as a parent |
| 58 | Tr2VariableStore* store = variableStore; |
| 59 | while( store ) |
| 60 | { |
| 61 | CCP_ASSERT( store != this ); |
| 62 | store = store->GetParentVariableStore(); |
| 63 | } |
| 64 | #endif |
| 65 | m_parentVariableStore = variableStore; |
| 66 | } |
| 67 | |
| 68 | // ------------------------------------------------------------- |
| 69 | // Description: |
no test coverage detected