[vala/staging: 4/6] vala: Avoid superfluous string copying
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 4/6] vala: Avoid superfluous string copying
- Date: Sun, 30 Oct 2016 14:56:26 +0000 (UTC)
commit 6fd1e861f6de40e51cb0a28f2f8119c49183c7f4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Oct 30 14:53:44 2016 +0100
vala: Avoid superfluous string copying
vala/valabinaryexpression.vala | 2 +-
vala/valaunaryexpression.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index b081090..82e6053 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -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 "-";
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index dfc795c..95b0d4f 100644
--- a/vala/valaunaryexpression.vala
+++ b/vala/valaunaryexpression.vala
@@ -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 "-";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]