[geany/geany] c13146: Revert "Microoptimization in merge"

Jiří Techet git-noreply at xxxxx
Tue Dec 30 16:09:18 UTC 2014


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Tue, 30 Dec 2014 16:09:18 UTC
Commit:      c131466a0035b0421e40661d50181db1ca8de3f6
             https://github.com/geany/geany/commit/c131466a0035b0421e40661d50181db1ca8de3f6

Log Message:
-----------
Revert "Microoptimization in merge"

This reverts commit cb9e4bbf7446e45365cad2242087f2a766662f20.


Modified Paths:
--------------
    tagmanager/src/tm_tag.c

Modified: tagmanager/src/tm_tag.c
4 lines changed, 1 insertions(+), 3 deletions(-)
===================================================================
@@ -895,9 +895,7 @@ static GPtrArray *merge(GPtrArray *big_array, GPtrArray *small_array,
 				while (i1 <= j1) 
 				{
 					val1 = big_array->pdata[i1];
-					/* we allocated enough space so we are sure we don't need to reallocate
-					 * the array - copy and increment the size directly so it can be inlined */
-					res_array->pdata[res_array->len++] = val1;
+					g_ptr_array_add(res_array, val1);
 					i1++;
 				}
 			}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list