[glibmm] ValueArray Example: Get values as references in loops.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] ValueArray Example: Get values as references in loops.
- Date: Mon, 15 Mar 2010 17:12:05 +0000 (UTC)
commit 9fed4b38871c6e6b3ea78076f23cc78067dfbef3
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Tue Feb 23 18:45:42 2010 -0500
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.
ChangeLog-ValueArrayTest | 6 ++++++
tests/glibmm_valuearray/main.cc | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog-ValueArrayTest b/ChangeLog-ValueArrayTest
new file mode 100644
index 0000000..60c15e1
--- /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 a905460..2fb3bd8 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]