summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-02-23 18:45:42 -0500
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-03-11 14:44:14 -0500
commit9fed4b38871c6e6b3ea78076f23cc78067dfbef3 (patch)
tree90e8798a6100ad531b060bafe57fb11518cf5edd
parentf582d50d627a92e9443f5bd82a9fc05113221097 (diff)
downloadglibmm-9fed4b38871c6e6b3ea78076f23cc78067dfbef3.tar.gz
ValueArray Example: Get values as references in loops.
* tests/glibmm_valuearray/main.cc (main): Get values as references instead of copying them in both for loops.
-rw-r--r--ChangeLog-ValueArrayTest6
-rw-r--r--tests/glibmm_valuearray/main.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog-ValueArrayTest b/ChangeLog-ValueArrayTest
new file mode 100644
index 00000000..60c15e15
--- /dev/null
+++ b/ChangeLog-ValueArrayTest
@@ -0,0 +1,6 @@
+2010-02-23 José Alburquerque <jaalburqu@svn.gnome.org>
+
+ ValueArray Example: Get values as references in loops.
+
+ * tests/glibmm_valuearray/main.cc (main): Get values as references
+ instead of copying them in both for loops.
diff --git a/tests/glibmm_valuearray/main.cc b/tests/glibmm_valuearray/main.cc
index a9054601..2fb3bd83 100644
--- a/tests/glibmm_valuearray/main.cc
+++ b/tests/glibmm_valuearray/main.cc
@@ -46,7 +46,7 @@ int main(int, char**)
break;
}
- Glib::Value<int> int_val = static_cast< Glib::Value<int>& >(value);
+ Glib::Value<int>& int_val = static_cast< Glib::Value<int>& >(value);
std::cout << int_val.get() << " ";
}
std::cout << std::endl; // End of line for list of array elements.
@@ -68,7 +68,7 @@ int main(int, char**)
break;
}
- Glib::Value<int> int_val = static_cast< Glib::Value<int>& >(value);
+ Glib::Value<int>& int_val = static_cast< Glib::Value<int>& >(value);
std::cout << int_val.get() << " ";
}
std::cout << std::endl; // End of line for list of array elements.