summaryrefslogtreecommitdiffstats
path: root/src/Node.cpp
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-28 18:31:34 +0100
committerGravatar Jonathan Beck2009-10-28 18:31:34 +0100
commit6710f4bfb980dd0fe6e75e4d6cba75532cde30e8 (patch)
tree6429eb306d3d464ebbcc0de558559b636d8058c2 /src/Node.cpp
parentfed2573566c2da1c5489260069a99ae9d2abf255 (diff)
downloadlibplist-6710f4bfb980dd0fe6e75e4d6cba75532cde30e8.tar.gz
libplist-6710f4bfb980dd0fe6e75e4d6cba75532cde30e8.tar.bz2
Format sources to ANSI style using AStyle (astyle --style=ansi).
Diffstat (limited to 'src/Node.cpp')
-rw-r--r--src/Node.cpp69
1 files changed, 35 insertions, 34 deletions
diff --git a/src/Node.cpp b/src/Node.cpp
index c6a5b51..8ed3c6a 100644
--- a/src/Node.cpp
+++ b/src/Node.cpp
@@ -7,15 +7,15 @@
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details. 14 * Lesser General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Lesser General Public 16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software 17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <stdlib.h> 21#include <stdlib.h>
@@ -36,36 +36,37 @@ Node::Node(plist_t node, Node* parent) : _node(node), _parent(parent)
36Node::Node(plist_type type, Node* parent) : _parent(parent) 36Node::Node(plist_type type, Node* parent) : _parent(parent)
37{ 37{
38 _node = NULL; 38 _node = NULL;
39 39
40 switch(type) { 40 switch (type)
41 case PLIST_BOOLEAN: 41 {
42 _node = plist_new_bool(0); 42 case PLIST_BOOLEAN:
43 break; 43 _node = plist_new_bool(0);
44 case PLIST_UINT: 44 break;
45 _node = plist_new_uint(0); 45 case PLIST_UINT:
46 break; 46 _node = plist_new_uint(0);
47 case PLIST_REAL: 47 break;
48 _node = plist_new_real(0.); 48 case PLIST_REAL:
49 break; 49 _node = plist_new_real(0.);
50 case PLIST_STRING: 50 break;
51 _node = plist_new_string(""); 51 case PLIST_STRING:
52 break; 52 _node = plist_new_string("");
53 case PLIST_DATA: 53 break;
54 _node = plist_new_data(NULL,0); 54 case PLIST_DATA:
55 break; 55 _node = plist_new_data(NULL,0);
56 case PLIST_DATE: 56 break;
57 _node = plist_new_date(0,0); 57 case PLIST_DATE:
58 break; 58 _node = plist_new_date(0,0);
59 case PLIST_ARRAY: 59 break;
60 _node = plist_new_array(); 60 case PLIST_ARRAY:
61 break; 61 _node = plist_new_array();
62 case PLIST_DICT: 62 break;
63 _node = plist_new_dict(); 63 case PLIST_DICT:
64 break; 64 _node = plist_new_dict();
65 case PLIST_KEY: 65 break;
66 case PLIST_NONE: 66 case PLIST_KEY:
67 default: 67 case PLIST_NONE:
68 break; 68 default:
69 break;
69 } 70 }
70} 71}
71 72
@@ -80,7 +81,7 @@ plist_type Node::GetType()
80{ 81{
81 if (_node) 82 if (_node)
82 { 83 {
83 return plist_get_node_type(_node); 84 return plist_get_node_type(_node);
84 } 85 }
85 return PLIST_NONE; 86 return PLIST_NONE;
86} 87}