From ae8783d6e910094c0c25ff47405cf61474629b9e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 24 Jun 2009 04:36:18 +0000 Subject: [PATCH] (trunk libT) this is so minor I hesitate to commit it, but... save 16 bytes per torrent by more efficient alignment of tr_info's fields :) --- libtransmission/transmission.h | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h index 45551e12b..2a388cb2a 100644 --- a/libtransmission/transmission.h +++ b/libtransmission/transmission.h @@ -1284,41 +1284,41 @@ tr_piece; /** @brief information about a torrent that comes from its metainfo file */ struct tr_info { - /* Flags */ - tr_bool isPrivate; - tr_bool isMultifile; + /* total size of the torrent, in bytes */ + uint64_t totalSize; + + /* the torrent's name */ + char * name; + + /* Path to torrent Transmission's internal copy of the .torrent file. */ + char * torrent; + + char ** webseeds; + + char * comment; + char * creator; + tr_file * files; + tr_piece * pieces; + + /* these trackers are sorted by tier */ + tr_tracker_info * trackers; + + /* Torrent info */ + time_t dateCreated; + + int trackerCount; + int webseedCount; + tr_file_index_t fileCount; + uint32_t pieceSize; + tr_piece_index_t pieceCount; /* General info */ uint8_t hash[SHA_DIGEST_LENGTH]; char hashString[2 * SHA_DIGEST_LENGTH + 1]; - char * name; - /* Path to torrent Transmission's internal copy of the .torrent file. - This field exists for compatability reasons in the Mac OS X client - and should not be used in new code. */ - char * torrent; - - /* these trackers are sorted by tier */ - tr_tracker_info * trackers; - int trackerCount; - - char ** webseeds; - int webseedCount; - - /* Torrent info */ - char * comment; - char * creator; - time_t dateCreated; - - /* Pieces info */ - uint32_t pieceSize; - tr_piece_index_t pieceCount; - uint64_t totalSize; - tr_piece * pieces; - - /* Files info */ - tr_file_index_t fileCount; - tr_file * files; + /* Flags */ + tr_bool isPrivate; + tr_bool isMultifile; }; /**