diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-12-22 09:16:52 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-12-22 09:16:52 +0100 |
commit | b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c (patch) | |
tree | c6e10da018379be6b67f6118c5e6f15189f77a3b /ccode | |
parent | 73cd47c7c474d4601766a10e413e4e7512b810f2 (diff) | |
download | vala-b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c.tar.gz |
Make more use of native GLib.Regex syntax
Diffstat (limited to 'ccode')
-rw-r--r-- | ccode/valaccodewriter.vala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ccode/valaccodewriter.vala b/ccode/valaccodewriter.vala index 21cc41720..11a3b0e31 100644 --- a/ccode/valaccodewriter.vala +++ b/ccode/valaccodewriter.vala @@ -48,8 +48,6 @@ public class Vala.CCodeWriter { get { return _bol; } } - static GLib.Regex fix_indent_regex; - private string temp_filename; private bool file_exists; @@ -246,8 +244,7 @@ public class Vala.CCodeWriter { bool first = true; // discard tabs at beginning of line - if (fix_indent_regex == null) - fix_indent_regex = new GLib.Regex ("^\t+");; + unowned Regex fix_indent_regex = /^\t+/; foreach (unowned string line in text.split ("\n")) { if (!first) { |