[gxml] SerializableDouble constructor requires property name
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] SerializableDouble constructor requires property name
- Date: Tue, 6 Oct 2015 20:17:17 +0000 (UTC)
commit 90c5fd793d6b199c57c8496f6cb4c74b386f781f
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Oct 6 15:14:22 2015 -0500
SerializableDouble constructor requires property name
gxml/SerializableDouble.vala | 2 +-
gxml/SerializableFloat.vala | 2 +-
gxml/SerializableInt.vala | 2 +-
test/SerializablePropertyDoubleTest.vala | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gxml/SerializableDouble.vala b/gxml/SerializableDouble.vala
index bf324e2..50b3168 100644
--- a/gxml/SerializableDouble.vala
+++ b/gxml/SerializableDouble.vala
@@ -30,7 +30,7 @@ public class GXml.SerializableDouble : SerializableObjectModel, SerializableProp
protected string _val = null;
protected string _name = null;
protected int _fraction = -1;
- public SerializableDouble.with_name (string name) { _name = name; }
+ public SerializableDouble (string name) { _name = name; }
public int get_fraction () { return _fraction; }
public void set_fraction (int fraction) {
int v = fraction;
diff --git a/gxml/SerializableFloat.vala b/gxml/SerializableFloat.vala
index e807fda..48153de 100644
--- a/gxml/SerializableFloat.vala
+++ b/gxml/SerializableFloat.vala
@@ -22,7 +22,7 @@
public class GXml.SerializableFloat : GXml.SerializableDouble
{
- public SerializableFloat (string name) { _name = name; }
+ public SerializableFloat (string name) { base (name); }
public new float get_value () { return (float) double.parse (_val); }
public new void set_value (float val) { _val = val.to_string (); }
}
\ No newline at end of file
diff --git a/gxml/SerializableInt.vala b/gxml/SerializableInt.vala
index 9b352a0..e81bbe4 100644
--- a/gxml/SerializableInt.vala
+++ b/gxml/SerializableInt.vala
@@ -27,7 +27,7 @@ using Gee;
*/
public class GXml.SerializableInt : GXml.SerializableDouble
{
- public SerializableInt (string name) { _name = name; }
+ public SerializableInt (string name) { base (name); }
public new int get_value () { return (int) double.parse (_val); }
public new void set_value (int val) { _val = val.to_string (); }
public override string to_string () {
diff --git a/test/SerializablePropertyDoubleTest.vala b/test/SerializablePropertyDoubleTest.vala
index f5bb5c4..4ba5638 100644
--- a/test/SerializablePropertyDoubleTest.vala
+++ b/test/SerializablePropertyDoubleTest.vala
@@ -28,7 +28,7 @@ class SerializablePropertyDoubleTest : GXmlTest {
public class DoubleNode : SerializableObjectModel
{
[Description (nick="DoubleValue")]
- public SerializableDouble double_value { get; set; default = new SerializableDouble.with_name
("DoubleValue"); }
+ public SerializableDouble double_value { get; set; default = new SerializableDouble ("DoubleValue"); }
public string name { get; set; }
public override string node_name () { return "DoubleNode"; }
public override string to_string () { return get_type ().name (); }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]