summaryrefslogtreecommitdiff
path: root/libvaladoc
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-12-22 09:16:52 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-12-22 09:16:52 +0100
commitb2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c (patch)
treec6e10da018379be6b67f6118c5e6f15189f77a3b /libvaladoc
parent73cd47c7c474d4601766a10e413e4e7512b810f2 (diff)
downloadvala-b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c.tar.gz
Make more use of native GLib.Regex syntax
Diffstat (limited to 'libvaladoc')
-rw-r--r--libvaladoc/errorreporter.vala7
1 files changed, 1 insertions, 6 deletions
diff --git a/libvaladoc/errorreporter.vala b/libvaladoc/errorreporter.vala
index 68b09a8ef..b6035e0fe 100644
--- a/libvaladoc/errorreporter.vala
+++ b/libvaladoc/errorreporter.vala
@@ -137,12 +137,7 @@ public class Valadoc.ErrorReporter : Object {
* }}}
*/
public bool set_colors (string str) {
- Regex val_regex;
- try {
- val_regex = new Regex ("^\\s*[0-9]+(;[0-9]*)*\\s*$");
- } catch (RegexError e) {
- assert_not_reached ();
- }
+ unowned Regex val_regex = /^\\s*[0-9]+(;[0-9]*)*\\s*$/;
string error_color = null;
string warning_color = null;