[gnome-builder] bufmgr: style cleanup



commit e5cccd63254300502fa1bfcc037941e0d9167d4c
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 3 19:14:01 2018 -0800

    bufmgr: style cleanup

 src/libide/buffers/ide-buffer-manager.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/libide/buffers/ide-buffer-manager.c b/src/libide/buffers/ide-buffer-manager.c
index 817eaa3..857a7ca 100644
--- a/src/libide/buffers/ide-buffer-manager.c
+++ b/src/libide/buffers/ide-buffer-manager.c
@@ -511,17 +511,13 @@ static IdeBuffer *
 ide_buffer_manager_get_buffer (IdeBufferManager *self,
                                IdeFile          *file)
 {
-  gsize i;
-
   g_return_val_if_fail (IDE_IS_BUFFER_MANAGER (self), NULL);
+  g_return_val_if_fail (IDE_IS_FILE (file), NULL);
 
-  for (i = 0; i < self->buffers->len; i++)
+  for (guint i = 0; i < self->buffers->len; i++)
     {
-      IdeBuffer *buffer;
-      IdeFile *cur_file;
-
-      buffer = g_ptr_array_index (self->buffers, i);
-      cur_file = ide_buffer_get_file (buffer);
+      IdeBuffer *buffer = g_ptr_array_index (self->buffers, i);
+      IdeFile *cur_file = ide_buffer_get_file (buffer);
 
       if (ide_file_equal (cur_file, file))
         return buffer;


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