mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(trunk gtk) gtr_compare_double() is only used in one place, so make it a private function there instead of leaving it public in utils.h
This commit is contained in:
15
gtk/util.c
15
gtk/util.c
@@ -12,7 +12,6 @@
|
||||
|
||||
#include <ctype.h> /* isxdigit() */
|
||||
#include <errno.h>
|
||||
#include <math.h> /* pow() */
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h> /* free() */
|
||||
#include <string.h> /* strcmp() */
|
||||
@@ -115,20 +114,6 @@ gtr_lockfile( const char * filename )
|
||||
****
|
||||
***/
|
||||
|
||||
int
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
||||
const char*
|
||||
gtr_get_unicode_string( int i )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user