~unity-team/unity/4.0

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/JSONParser.cpp

  • Committer: smspillaz
  • Date: 2012-01-19 08:50:41 UTC
  • mfrom: (1732.3.3 unity.oneiric)
  • Revision ID: sam.spilsbury@canonical.com-20120119085041-ou6f0nbjvp52ot3q
MergeĀ lp:unity/4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
    values[i] = json_array_get_double_element(array, i);
146
146
}
147
147
 
148
 
void Parser::ReadString(std::string const& node_name,
149
 
                        std::string const& member_name,
150
 
                        std::string& value) const
151
 
{
152
 
  JsonObject* object = GetNodeObject(node_name);
153
 
 
154
 
  if (!object)
155
 
    return;
156
 
 
157
 
  if (json_object_has_member(object, member_name.c_str()))
158
 
    value = json_object_get_string_member(object, member_name.c_str());
159
 
}
160
 
 
161
148
void Parser::ReadColor(std::string const& node_name,
162
149
                       std::string const& member_name,
163
150
                       std::string const& opacity_name,