Changeset 13638


Ignore:
Timestamp:
Dec 9, 2012, 9:28:20 PM (9 years ago)
Author:
jordan
Message:

preallocate a couple of dictionaries to the right size before using them.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/conf.c

    r13625 r13638  
    7878    str = tr_getDefaultDownloadDir ();
    7979
     80  tr_bencDictReserve (d, 29);
     81
    8082  tr_bencDictAddStr (d, PREF_KEY_DIR_WATCH, str);
    8183  tr_bencDictAddBool (d, PREF_KEY_DIR_WATCH_ENABLED, FALSE);
  • trunk/libtransmission/session.c

    r13631 r13638  
    308308    assert (tr_bencIsDict (d));
    309309
    310     tr_bencDictReserve (d, 60);
     310    tr_bencDictReserve (d, 62);
    311311    tr_bencDictAddBool (d, TR_PREFS_KEY_BLOCKLIST_ENABLED,               false);
    312312    tr_bencDictAddStr (d, TR_PREFS_KEY_BLOCKLIST_URL,                   "http://www.example.com/blocklist");
Note: See TracChangeset for help on using the changeset viewer.