[gparted] Clean up code for old bug #157871



commit 20f5c6f83b94c42d1a7b49727c0477a1235d4477
Author: Curtis Gedak <gedakc gmail com>
Date:   Sat Jan 2 15:04:30 2010 -0700

    Clean up code for old bug #157871
    
    Remove commented code and boolean use-C-lang parameter for
    Utils::num_to_str() method because this bug was fixed in
    gcc-4.0.3.  The GNU gcc compiler versions 4 and up are now
    commonly in use.  Also due to previous partial commenting and
    removal of the code, the code was non-functional
    
    Thanks goes to Jan Claeys for pointing out this clean up
    opportunity.

 include/Utils.h |    4 ++--
 src/Utils.cc    |    6 ++----
 src/ext2.cc     |    4 ++--
 src/ext3.cc     |    4 ++--
 src/ext4.cc     |    4 ++--
 src/ntfs.cc     |    4 ++--
 src/reiserfs.cc |    4 ++--
 7 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/include/Utils.h b/include/Utils.h
index 2714c6f..b4b94eb 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart
- * Copyright (C) 2008, 2009 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -130,7 +130,7 @@ public:
 				      bool wrap = false,
 				      bool selectable = false,
 				      const Glib::ustring & text_color = "black" ) ;
-	static Glib::ustring num_to_str( Sector number, bool use_C_locale = false ) ;
+	static Glib::ustring num_to_str( Sector number ) ;
 	static Glib::ustring get_color( FILESYSTEM filesystem ) ;
 	static Glib::RefPtr<Gdk::Pixbuf> get_color_as_pixbuf( FILESYSTEM filesystem, int width, int height ) ;
 	static Glib::ustring get_filesystem_string( FILESYSTEM filesystem ) ;
diff --git a/src/Utils.cc b/src/Utils.cc
index d04d083..6c5d0f5 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart 'plors' Hakvoort
- * Copyright (C) 2008, 2009 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -56,10 +56,9 @@ Gtk::Label * Utils::mk_label( const Glib::ustring & text,
 	return label ;
 }
 
-Glib::ustring Utils::num_to_str( Sector number, bool use_C_locale )
+Glib::ustring Utils::num_to_str( Sector number )
 {
 	std::stringstream ss ;
-	//ss.imbue( std::locale( use_C_locale ? "C" : "" ) ) ; see #157871
 	ss << number ;
 	return ss .str() ;
 }
@@ -171,7 +170,6 @@ Glib::ustring Utils::get_filesystem_software( FILESYSTEM filesystem )
 Glib::ustring Utils::format_size( Sector size )
 {
 	std::stringstream ss ;
-	//ss .imbue( std::locale( "" ) ) ;  see #157871
 	ss << std::setiosflags( std::ios::fixed ) << std::setprecision( 2 ) ;
 
 	if ( size < KIBIBYTE )
diff --git a/src/ext2.cc b/src/ext2.cc
index f3a9bb2..5299f06 100644
--- a/src/ext2.cc
+++ b/src/ext2.cc
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart
- * Copyright (C) 2008 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -116,7 +116,7 @@ bool ext2::resize( const Partition & partition_new, OperationDetail & operationd
 	
 	if ( ! fill_partition )
 		str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( 
-					partition_new .get_length(), UNIT_KIB ) ) -1, true ) + "K" ; 
+					partition_new .get_length(), UNIT_KIB ) ) -1 ) + "K" ; 
 		
 	return ! execute_command( str_temp, operationdetail ) ;
 }
diff --git a/src/ext3.cc b/src/ext3.cc
index e22889d..1c67fb1 100644
--- a/src/ext3.cc
+++ b/src/ext3.cc
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart
- * Copyright (C) 2008 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -117,7 +117,7 @@ bool ext3::resize( const Partition & partition_new, OperationDetail & operationd
 	
 	if ( ! fill_partition )
 		str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( 
-					partition_new .get_length(), GParted::UNIT_KIB ) ) -1, true ) + "K" ; 
+					partition_new .get_length(), GParted::UNIT_KIB ) ) -1 ) + "K" ; 
 		
 	return ! execute_command( str_temp, operationdetail ) ;
 }
diff --git a/src/ext4.cc b/src/ext4.cc
index b798e5d..eba681e 100644
--- a/src/ext4.cc
+++ b/src/ext4.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Curtis Gedak
+/* Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -120,7 +120,7 @@ bool ext4::resize( const Partition & partition_new, OperationDetail & operationd
 	
 	if ( ! fill_partition )
 		str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( 
-					partition_new .get_length(), GParted::UNIT_KIB ) ) -1, true ) + "K" ; 
+					partition_new .get_length(), GParted::UNIT_KIB ) ) -1 ) + "K" ; 
 		
 	return ! execute_command( str_temp, operationdetail ) ;
 }
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 7525d2a..0e2fef5 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart
- * Copyright (C) 2008, 2009 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -118,7 +118,7 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd
 	{
 		str_temp += " -s " ;
 		str_temp += Utils::num_to_str( Utils::round( Utils::sector_to_unit(
-				partition_new .get_length(), GParted::UNIT_BYTE ) ) -1, true ) ;
+				partition_new .get_length(), GParted::UNIT_BYTE ) ) -1 ) ;
 	}
 	
 	//simulation..
diff --git a/src/reiserfs.cc b/src/reiserfs.cc
index 63d66ef..0fc42d3 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -1,5 +1,5 @@
 /* Copyright (C) 2004 Bart
- * Copyright (C) 2008 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -124,7 +124,7 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat
 	{
 		str_temp += " -s " ;
 		str_temp += Utils::num_to_str( Utils::round( Utils::sector_to_unit(
-				partition_new .get_length(), GParted::UNIT_BYTE ) ) -1, true ) ;
+				partition_new .get_length(), GParted::UNIT_BYTE ) ) -1 ) ;
 	}
 
 	exit_status = execute_command( str_temp, operationdetail ) ;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]