diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-02-23 18:45:42 -0500 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-03-11 14:44:14 -0500 |
commit | 9fed4b38871c6e6b3ea78076f23cc78067dfbef3 (patch) | |
tree | 90e8798a6100ad531b060bafe57fb11518cf5edd /tests | |
parent | f582d50d627a92e9443f5bd82a9fc05113221097 (diff) | |
download | glibmm-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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/glibmm_valuearray/main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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. |