![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
#include "common.h"
Include dependency graph for SerialSumTree.cpp:Go to the source code of this file.
Functions | |
| Value | SerialSumTree (TreeNode *root) |
Definition at line 31 of file SerialSumTree.cpp.
References TreeNode::left, TreeNode::right, SerialSumTree(), and TreeNode::value.
Referenced by main(), and SerialSumTree().
{
Value result = root->value;
if( root->left )
result += SerialSumTree(root->left);
if( root->right )
result += SerialSumTree(root->right);
return result;
}
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.