(trunk) one of the periodic, banal "remove-trailing-spaces from lines of source code" cleanup commits
This commit is contained in:
parent
465a2e7c90
commit
27a1b2dc33
|
@ -1006,7 +1006,7 @@ printDetails( tr_benc * top )
|
|||
if (tr_bencDictFindInt (t, "bandwidthPriority", &i))
|
||||
printf (" Bandwidth Priority: %s\n",
|
||||
bandwidthPriorityNames[(i + 1) & 3]);
|
||||
|
||||
|
||||
printf( "\n" );
|
||||
}
|
||||
}
|
||||
|
@ -1885,7 +1885,7 @@ processArgs( const char * host, int port, int argc, const char ** argv )
|
|||
fields = tr_bencDictAddList( args, "fields", 0 );
|
||||
|
||||
if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); }
|
||||
|
||||
|
||||
switch( c )
|
||||
{
|
||||
case 'i': tr_bencDictAddInt( top, "tag", TAG_DETAILS );
|
||||
|
@ -2008,7 +2008,7 @@ processArgs( const char * host, int port, int argc, const char ** argv )
|
|||
targs = ensure_tset( &tset );
|
||||
else
|
||||
sargs = ensure_sset( &sset );
|
||||
|
||||
|
||||
switch( c )
|
||||
{
|
||||
case 'd': if( targs ) {
|
||||
|
@ -2077,9 +2077,9 @@ processArgs( const char * host, int port, int argc, const char ** argv )
|
|||
args = tr_bencDictFind( tadd, ARGUMENTS );
|
||||
else
|
||||
args = ensure_tset( &tset );
|
||||
|
||||
|
||||
switch( c )
|
||||
{
|
||||
{
|
||||
case 'g': addFiles( args, "files-wanted", optarg );
|
||||
break;
|
||||
case 'G': addFiles( args, "files-unwanted", optarg );
|
||||
|
|
|
@ -295,7 +295,7 @@ getSelectedFilesForeach( GtkTreeModel * model,
|
|||
if( is_file )
|
||||
{
|
||||
struct ActiveData * data = gdata;
|
||||
|
||||
|
||||
/* active means: if it's selected or any ancestor is selected */
|
||||
|
||||
gboolean is_active = gtk_tree_selection_iter_is_selected( data->sel, iter );
|
||||
|
|
|
@ -303,7 +303,7 @@ updatePiecesLabel( MakeMetaUI * ui )
|
|||
builder->fileCount ),
|
||||
buf, builder->fileCount );
|
||||
g_string_append( gstr, "; " );
|
||||
|
||||
|
||||
tr_formatter_mem_B( buf, builder->pieceSize, sizeof( buf ) );
|
||||
g_string_append_printf( gstr, gtr_ngettext( "%1$'d Piece @ %2$s",
|
||||
"%1$'d Pieces @ %2$s",
|
||||
|
|
|
@ -522,7 +522,7 @@ torrent_cell_renderer_get_size( GtkCellRenderer * cell,
|
|||
|
||||
if( x_offset )
|
||||
*x_offset = cell_area ? cell_area->x : 0;
|
||||
|
||||
|
||||
if( y_offset )
|
||||
*y_offset = cell_area ? (int)((cell_area->height - (cell->ypad*2 +h)) / 2.0) : 0;
|
||||
}
|
||||
|
|
|
@ -1181,7 +1181,7 @@ tr_core_present_window( TrCore * core UNUSED,
|
|||
/* Setting the toggle-main-window GtkCheckMenuItem to
|
||||
make sure its state is correctly set */
|
||||
action_toggle( "toggle-main-window", TRUE);
|
||||
|
||||
|
||||
*success = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -864,7 +864,7 @@ void
|
|||
tr_window_set_busy( TrWindow * w, gboolean isBusy )
|
||||
{
|
||||
if( w && gtr_widget_get_realized( GTK_WIDGET( w ) ) )
|
||||
{
|
||||
{
|
||||
GdkDisplay * display = gtk_widget_get_display( GTK_WIDGET( w ) );
|
||||
GdkCursor * cursor = isBusy ? gdk_cursor_new_for_display( display, GDK_WATCH ) : NULL;
|
||||
|
||||
|
@ -872,6 +872,6 @@ tr_window_set_busy( TrWindow * w, gboolean isBusy )
|
|||
gdk_display_flush( display );
|
||||
|
||||
if( cursor )
|
||||
gdk_cursor_unref( cursor );
|
||||
gdk_cursor_unref( cursor );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ gtr_compare_double( const double a, const double b, int decimal_places )
|
|||
const int64_t ia = (int64_t)(a * pow( 10, decimal_places ) );
|
||||
const int64_t ib = (int64_t)(b * pow( 10, decimal_places ) );
|
||||
if( ia < ib ) return -1;
|
||||
if( ia > ib ) return 1;
|
||||
if( ia > ib ) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* A generic short-term memory object that remembers how many times
|
||||
* something happened over the last N seconds.
|
||||
*
|
||||
*
|
||||
* For example, it could count how many are bytes transferred
|
||||
* to estimate the speed over the last N seconds.
|
||||
*/
|
||||
|
|
|
@ -100,12 +100,12 @@ tr_list* tr_list_find( tr_list * list,
|
|||
const void * b,
|
||||
TrListCompareFunc compare_func );
|
||||
|
||||
/**
|
||||
* @brief Insert in an ordered list
|
||||
* @param list pointer to the list
|
||||
* @param item the item to be inserted
|
||||
* @param compare the comparison function.
|
||||
*/
|
||||
/**
|
||||
* @brief Insert in an ordered list
|
||||
* @param list pointer to the list
|
||||
* @param item the item to be inserted
|
||||
* @param compare the comparison function.
|
||||
*/
|
||||
void tr_list_insert_sorted( tr_list ** list,
|
||||
void * data,
|
||||
TrListCompareFunc compare );
|
||||
|
|
|
@ -39,7 +39,6 @@ enum
|
|||
most bittorrent clients will reject requests
|
||||
larger than this size. */
|
||||
MAX_BLOCK_SIZE = ( 1024 * 16 )
|
||||
|
||||
};
|
||||
|
||||
typedef enum
|
||||
|
|
|
@ -181,7 +181,7 @@ struct tr_session
|
|||
struct tr_bandwidth * bandwidth;
|
||||
|
||||
double desiredRatio;
|
||||
|
||||
|
||||
uint16_t idleLimitMinutes;
|
||||
|
||||
struct tr_bindinfo * public_ipv4;
|
||||
|
@ -226,7 +226,7 @@ const struct tr_address* tr_sessionGetPublicAddress( const tr_session *, int tr
|
|||
|
||||
struct tr_bindsockets * tr_sessionGetBindSockets( tr_session * );
|
||||
|
||||
int tr_sessionCountTorrents( const tr_session * session );
|
||||
int tr_sessionCountTorrents( const tr_session * session );
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -2307,8 +2307,8 @@ tr_torrentPieceNeedsCheck( const tr_torrent * tor, tr_piece_index_t p )
|
|||
uint64_t unused;
|
||||
tr_file_index_t f;
|
||||
const tr_info * inf = tr_torrentInfo( tor );
|
||||
|
||||
/* if we've never checked this piece, then it needs to be checked */
|
||||
|
||||
/* if we've never checked this piece, then it needs to be checked */
|
||||
if( !inf->pieces[p].timeChecked ) {
|
||||
tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because it's never been tested", (size_t)p );
|
||||
return TRUE;
|
||||
|
|
|
@ -185,7 +185,7 @@ struct tr_torrent
|
|||
time_t dhtAnnounce6At;
|
||||
tr_bool dhtAnnounceInProgress;
|
||||
tr_bool dhtAnnounce6InProgress;
|
||||
|
||||
|
||||
time_t lpdAnnounceAt;
|
||||
|
||||
uint64_t downloadedCur;
|
||||
|
@ -417,7 +417,7 @@ tr_bool tr_torrentPieceNeedsCheck( const tr_torrent * tor, tr_piece_index_t piec
|
|||
/**
|
||||
* @brief Test a piece against its info dict checksum
|
||||
* @return true if the piece's passes the checksum test
|
||||
*/
|
||||
*/
|
||||
tr_bool tr_torrentCheckPiece( tr_torrent * tor, tr_piece_index_t pieceIndex );
|
||||
|
||||
uint64_t tr_torrentGetCurrentSizeOnDisk( const tr_torrent * tor );
|
||||
|
|
|
@ -60,7 +60,7 @@ getopts_usage_line( const tr_option * opt,
|
|||
int shortWidth,
|
||||
int argWidth )
|
||||
{
|
||||
int len;
|
||||
int len;
|
||||
const char * longName = opt->longName ? opt->longName : "";
|
||||
const char * shortName = opt->shortName ? opt->shortName : "";
|
||||
const char * arg = getArgName( opt );
|
||||
|
|
|
@ -1855,7 +1855,7 @@ typedef struct tr_stat
|
|||
|
||||
/** The last time we uploaded or downloaded piece data on this torrent. */
|
||||
time_t activityDate;
|
||||
|
||||
|
||||
/** Number of seconds since the last activity (or since started).
|
||||
-1 if activity is not seeding or downloading. */
|
||||
int idleSecs;
|
||||
|
|
|
@ -52,7 +52,7 @@ Favicons :: ensureCacheDirHasBeenScanned( )
|
|||
if( !hasBeenScanned )
|
||||
{
|
||||
hasBeenScanned = true;
|
||||
|
||||
|
||||
QDir cacheDir( getCacheDir( ) );
|
||||
cacheDir.mkpath( cacheDir.absolutePath( ) );
|
||||
|
||||
|
|
|
@ -696,7 +696,7 @@ FileTreeView :: eventFilter( QObject * o, QEvent * event )
|
|||
}
|
||||
|
||||
// handle using the keyboard to toggle the
|
||||
// wanted/unwanted state or the file priority
|
||||
// wanted/unwanted state or the file priority
|
||||
else if( event->type() == QEvent::KeyPress )
|
||||
{
|
||||
switch( dynamic_cast<QKeyEvent*>(event)->key() )
|
||||
|
|
|
@ -265,7 +265,7 @@ FilterBar :: createActivityCombo( )
|
|||
|
||||
/****
|
||||
*****
|
||||
*****
|
||||
*****
|
||||
*****
|
||||
****/
|
||||
|
||||
|
@ -385,7 +385,7 @@ FilterBar :: createTrackerCombo( QStandardItemModel * model )
|
|||
|
||||
/****
|
||||
*****
|
||||
*****
|
||||
*****
|
||||
*****
|
||||
****/
|
||||
|
||||
|
@ -413,7 +413,7 @@ FilterBar :: FilterBar( Prefs& prefs, TorrentModel& torrents, TorrentFilter& fil
|
|||
myTrackerCombo = createTrackerCombo( myTrackerModel );
|
||||
h->addWidget( myTrackerCombo, 1 );
|
||||
h->addSpacing( hmargin*2 );
|
||||
|
||||
|
||||
myLineEdit = new QLineEdit( this );
|
||||
h->addWidget( myLineEdit );
|
||||
connect( myLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString)));
|
||||
|
|
|
@ -216,7 +216,7 @@ TorrentModel :: removeTorrent( int id )
|
|||
|
||||
beginRemoveRows( QModelIndex(), row, row );
|
||||
// make the myIdToRow map consistent with list view/model
|
||||
for( QMap<int,int>::iterator i = myIdToRow.begin(); i != myIdToRow.end(); ++i )
|
||||
for( QMap<int,int>::iterator i = myIdToRow.begin(); i != myIdToRow.end(); ++i )
|
||||
if( i.value() > row )
|
||||
--i.value();
|
||||
myIdToRow.remove( id );
|
||||
|
|
|
@ -53,7 +53,7 @@ TrackerDelegate :: sizeHint( const QStyleOptionViewItem& option, const TrackerIn
|
|||
Q_UNUSED( option );
|
||||
|
||||
QPixmap favicon = info.st.getFavicon( );
|
||||
|
||||
|
||||
const QString text = TrackerDelegate :: getText( info );
|
||||
QTextDocument textDoc;
|
||||
textDoc.setHtml( text );
|
||||
|
|
|
@ -38,7 +38,7 @@ class TrackerDelegate: public QItemDelegate
|
|||
void setShowMore( bool b );
|
||||
|
||||
protected:
|
||||
QString getText( const TrackerInfo& ) const;
|
||||
QString getText( const TrackerInfo& ) const;
|
||||
QSize margin( const QStyle& style ) const;
|
||||
virtual QSize sizeHint( const QStyleOptionViewItem&, const TrackerInfo& ) const;
|
||||
void drawTracker( QPainter*, const QStyleOptionViewItem&, const TrackerInfo& ) const;
|
||||
|
|
|
@ -34,7 +34,7 @@ class Utils: public QObject
|
|||
// meh
|
||||
static void toStderr( const QString& qstr );
|
||||
|
||||
///
|
||||
///
|
||||
/// URLs
|
||||
///
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ removeURL( tr_benc * metainfo, const char * url )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <time.h>
|
||||
|
||||
#define CURL_DISABLE_TYPECHECK /* otherwise -Wunreachable-code goes insane */
|
||||
#include <curl/curl.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <event.h> /* struct evbuffer */
|
||||
|
||||
|
@ -127,7 +127,7 @@ showInfo( const tr_info * inf )
|
|||
**/
|
||||
|
||||
printf( "\nTRACKERS\n" );
|
||||
for( i=0; i<(int)inf->trackerCount; ++i )
|
||||
for( i=0; i<(int)inf->trackerCount; ++i )
|
||||
{
|
||||
if( prevTier != inf->trackers[i].tier )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue