diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-09-05 09:16:53 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-09-05 09:16:53 +0200 |
commit | 13bfbc440c6f2009dc0fb2afe3443b1965e18552 (patch) | |
tree | 83c460d046d6b2e8c1586ef71cd9acb39eacd24e | |
parent | e2c440fd9c30995598492e1eaa576adad854b2f0 (diff) | |
download | zeitgeist-13bfbc440c6f2009dc0fb2afe3443b1965e18552.tar.gz |
datahub: Drop obsolete VALA_0_14 conditional
-rw-r--r-- | datahub/utils.vala | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/datahub/utils.vala b/datahub/utils.vala index b9146360..471ca676 100644 --- a/datahub/utils.vala +++ b/datahub/utils.vala @@ -34,9 +34,8 @@ public class Utils : Object // it makes segfaults :( public static string? get_file_contents (GLib.File file) { - string contents; -#if VALA_0_14 - uint8[] contents_array; + uint8[]? contents_array = null; + try { if (!file.load_contents (null, out contents_array, null)) @@ -46,12 +45,8 @@ public class Utils : Object { debug ("Couldn't get file contents %s: %s", file.get_path (), err.message); } - contents = (string) contents_array; -#else - if (!file.load_contents (null, out contents, null, null)) - return null; -#endif - return contents; + + return (string?) (owned) contents_array; } /* |