[glibmm] Use a const instead of a #define in the value array example.



commit c6f48fa2a57916f06a0f8a6626d973fc96f99e0c
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Tue Jun 23 23:34:11 2009 -0400

    Use a const instead of a #define in the value array example.

 ChangeLog                       |    4 ++++
 tests/glibmm_valuearray/main.cc |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f9d03e9..6f47850 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-23  José Alburquerque  <jaalburqu svn gnome org>
+
+	* tests/glibmm_valuearray/main.cc: Use a const instead of a #define.
+
 2009-06-23  Hubert Figuiere  <hub figuiere net>
 
 	* tools/pm/WrapParser.pm (on_defs): Make sure we trim
diff --git a/tests/glibmm_valuearray/main.cc b/tests/glibmm_valuearray/main.cc
index 78bf33d..13357d4 100644
--- a/tests/glibmm_valuearray/main.cc
+++ b/tests/glibmm_valuearray/main.cc
@@ -1,8 +1,6 @@
 #include <glibmm.h>
 #include <iostream>
 
-#define VALUES 10
-
 int on_compare(const Glib::ValueBase& v1, const Glib::ValueBase& v2)
 {
   const Glib::Value<int> intVal1 = static_cast< const Glib::Value<int>& >(v1);
@@ -21,6 +19,8 @@ int on_compare(const Glib::ValueBase& v1, const Glib::ValueBase& v2)
 
 int main(int, char**)
 {
+  const int VALUES = 10;
+
   Glib::init();
 
   Glib::Value<int> value[VALUES];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]