[glom] Fixes for krazy2 warnings: true/false instead of TRUE/FALSE.



commit d2f2b737bf1c4958054b9cc582a273a01557cfe6
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Dec 14 16:01:14 2009 +0100

    Fixes for krazy2 warnings: true/false instead of TRUE/FALSE.

 glom/libglom/connectionpool.cc          |    8 ++++----
 glom/libglom/spawn_with_feedback.cc     |    4 ++--
 glom/main.cc                            |   14 +++++++-------
 glom/mode_find/box_data_details_find.cc |    2 +-
 glom/utility_widgets/flowtable.cc       |    2 +-
 5 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 0f2f2ea..4a8f5db 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -750,18 +750,18 @@ EpcContents* ConnectionPool::on_publisher_document_requested(EpcPublisher* /* pu
 //static
 gboolean ConnectionPool::on_publisher_document_authentication(EpcAuthContext* context, const gchar* user_name, gpointer user_data)
 {
-  g_return_val_if_fail(context, FALSE);
+  g_return_val_if_fail(context, false);
 
   ConnectionPool* connection_pool = (ConnectionPool*)(user_data);
-  g_return_val_if_fail(connection_pool, FALSE);
+  g_return_val_if_fail(connection_pool, false);
 
   // Check if the username/password are correct:
   const gchar* password = epc_auth_context_get_password(context);
-  g_return_val_if_fail(password, FALSE); //TODO: This seems to happen once before this callback is called again properly.
+  g_return_val_if_fail(password, false); //TODO: This seems to happen once before this callback is called again properly.
 
   //std::cout << "ConnectionPool::on_publisher_document_authentication(): username=" << user_name << ", password=" << password << std::endl;
 
-  g_return_val_if_fail(connection_pool->m_backend.get(), FALSE);
+  g_return_val_if_fail(connection_pool->m_backend.get(), false);
  
   //Attempt a connection with this username/password:
   std::auto_ptr<ExceptionConnection> error;
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index 85c3acd..6186ba2 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -108,7 +108,7 @@ private:
     SECURITY_ATTRIBUTES security_attr;
     security_attr.nLength = sizeof(security_attr);
     security_attr.lpSecurityDescriptor = 0;
-    security_attr.bInheritHandle = TRUE;
+    security_attr.bInheritHandle = true;
 
     HANDLE result = CreateFile(filename.c_str(), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE, &security_attr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -215,7 +215,7 @@ public:
     std::copy(command_line.data(), command_line.data() + command_line.length(), command.begin());
     command[command_line.length()] = '\0';
 
-    if(!CreateProcess(0, &command[0], 0, 0, TRUE, CREATE_NO_WINDOW, 0, 0, &startup_info, &process_info))
+    if(!CreateProcess(0, &command[0], 0, 0, true, CREATE_NO_WINDOW, 0, 0, &startup_info, &process_info))
     {
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
       throw SpawnError(win32_error_message());
diff --git a/glom/main.cc b/glom/main.cc
index d8cfd7d..c64ec8b 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -77,14 +77,14 @@ pgwin32_get_dynamic_tokeninfo(HANDLE token, TOKEN_INFORMATION_CLASS class_,
   if(GetTokenInformation(token, class_, 0, 0, &InfoBufferSize))
   {
     snprintf(errbuf, errsize, "could not get token information: got zero size\n");
-    return FALSE;
+    return false;
   }
 
   if(GetLastError() != ERROR_INSUFFICIENT_BUFFER)
   {
     snprintf(errbuf, errsize, "could not get token information: error code %d\n",
          (int) GetLastError());
-    return FALSE;
+    return false;
   }
 
   *InfoBuffer = static_cast<char*>(malloc(InfoBufferSize));
@@ -92,7 +92,7 @@ pgwin32_get_dynamic_tokeninfo(HANDLE token, TOKEN_INFORMATION_CLASS class_,
   {
     snprintf(errbuf, errsize, "could not allocate %d bytes for token information\n",
          (int) InfoBufferSize);
-    return FALSE;
+    return false;
   }
 
   if(!GetTokenInformation(token, class_, *InfoBuffer,
@@ -100,10 +100,10 @@ pgwin32_get_dynamic_tokeninfo(HANDLE token, TOKEN_INFORMATION_CLASS class_,
   {
     snprintf(errbuf, errsize, "could not get token information: error code %d\n",
          (int) GetLastError());
-    return FALSE;
+    return false;
   }
 
-  return TRUE;
+  return true;
 }
 
 int
@@ -152,14 +152,14 @@ pgwin32_is_admin(void)
     throw std::runtime_error(Glib::ustring::compose("could not get SID for PowerUsers group: error code %1", (int) GetLastError()));
   }
 
-  success = FALSE;
+  success = false;
 
   for (x = 0; x < Groups->GroupCount; x++)
   {
     if((EqualSid(AdministratorsSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)) ||
       (EqualSid(PowerUsersSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)))
     {
-      success = TRUE;
+      success = true;
       break;
     }
   }
diff --git a/glom/mode_find/box_data_details_find.cc b/glom/mode_find/box_data_details_find.cc
index 53954cc..033942e 100644
--- a/glom/mode_find/box_data_details_find.cc
+++ b/glom/mode_find/box_data_details_find.cc
@@ -34,7 +34,7 @@ Box_Data_Details_Find::Box_Data_Details_Find()
   m_hbox_buttons.pack_end(m_Button_Find, Gtk::PACK_SHRINK);
   #endif
 
-  g_object_set(m_Button_Find.gobj(), "can-default", TRUE, (gpointer)0); //TODO: Make this a real method in gtkmm?
+  g_object_set(m_Button_Find.gobj(), "can-default", tr, (gpointer)0); //TODO: Make this a real method in gtkmm?
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Hide this because it is useless for Find mode:
diff --git a/glom/utility_widgets/flowtable.cc b/glom/utility_widgets/flowtable.cc
index 9724ed1..60d7ec5 100644
--- a/glom/utility_widgets/flowtable.cc
+++ b/glom/utility_widgets/flowtable.cc
@@ -143,7 +143,7 @@ gboolean FlowTable::glom_expose_event_impl(GtkWidget* widget, GdkEventExpose* ev
   else if(GTK_WIDGET_CLASS(parent_class)->expose_event)
     return GTK_WIDGET_CLASS(parent_class)->expose_event(widget, event);
   else
-    return FALSE;
+    return false;
 }
 #endif // !GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 } //namespace Glom



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