]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Avoid superfluous string copying
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 30 Oct 2016 13:53:44 +0000 (14:53 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 30 Oct 2016 14:12:17 +0000 (15:12 +0100)
vala/valabinaryexpression.vala
vala/valaunaryexpression.vala

index b081090d0305a841f39e0ac6a078862eb9e4304c..82e605398d8fd6333f6dbaf205dd72afdc015a67 100644 (file)
@@ -99,7 +99,7 @@ public class Vala.BinaryExpression : Expression {
                }
        }
 
-       public string get_operator_string () {
+       private unowned string get_operator_string () {
                switch (_operator) {
                case BinaryOperator.PLUS: return "+";
                case BinaryOperator.MINUS: return "-";
index dfc795cebedf90bd3f070bbb4e230b4ede699407..95b0d4fc48c27f689ba142aaf165dbdf85842dda 100644 (file)
@@ -77,7 +77,7 @@ public class Vala.UnaryExpression : Expression {
                }
        }
 
-       private string get_operator_string () {
+       private unowned string get_operator_string () {
                switch (_operator) {
                case UnaryOperator.PLUS: return "+";
                case UnaryOperator.MINUS: return "-";