mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't cache the empty string
Avoid unnecessary reference counting for uses of the empty string.
This commit is contained in:
parent
320df7e409
commit
4a5b5f3bf2
@ -84,7 +84,7 @@ qof_string_cache_destroy (void)
|
||||
void
|
||||
qof_string_cache_remove(const char * key)
|
||||
{
|
||||
if (key)
|
||||
if (key && key[0] != 0)
|
||||
{
|
||||
GHashTable* cache = qof_get_string_cache();
|
||||
gpointer value;
|
||||
@ -111,6 +111,11 @@ qof_string_cache_insert(const char * key)
|
||||
{
|
||||
if (key)
|
||||
{
|
||||
if (key[0] == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
GHashTable* cache = qof_get_string_cache();
|
||||
gpointer value;
|
||||
gpointer cache_key;
|
||||
|
Loading…
Reference in New Issue
Block a user