Remove unused _json_object_node_ensure_field

It is now implemented in Matrix.Event.Base
This commit is contained in:
Gergely Polonkai 2016-03-09 15:47:53 +01:00 committed by Gergely Polonkai
parent e317df6f01
commit 4a86522b72

View File

@ -857,40 +857,6 @@ namespace Matrix {
}
}
private Json.Node?
_json_object_node_ensure_field(Json.Node node,
string field_name,
Json.NodeType field_type)
requires(node.get_node_type() == Json.NodeType.OBJECT)
{
var root = node.get_object();
Json.Node? new_node;
if ((new_node = root.get_member(field_name)) == null) {
new_node = new Json.Node(field_type);
switch (field_type) {
case Json.NodeType.OBJECT:
new_node.set_object(new Json.Object());
break;
case Json.NodeType.ARRAY:
new_node.set_array(new Json.Array());
break;
// Other node types dont need special treatment
default:
break;
}
root.set_member(field_name, new_node);
}
return new_node;
}
public Json.Node?
_json_node_deep_copy(Json.Node? node)
{