[gparted] Strip unnecessary scope from GParted::STAT_* (!20)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Strip unnecessary scope from GParted::STAT_* (!20)
- Date: Mon, 26 Nov 2018 20:01:02 +0000 (UTC)
commit c421bcbff62dfcfd2cea658d7f7207367477b130
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Oct 14 13:39:40 2018 +0100
Strip unnecessary scope from GParted::STAT_* (!20)
The code inconsistently uses GParted:: scope in front of STAT_*.
$ fgrep 'GParted::STAT_' src/*.cc | wc -l
3
$ egrep '[^:]STAT_' src/*.cc | wc -l
41
GParted:: scope resolution is unnecessary as all the code is inside the
GParted scope, except for main(). So remove it.
Closes !20 - Minor namespace and scope operator tidy-ups
src/Dialog_Partition_Info.cc | 2 +-
src/Partition.cc | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index dd81efda..b6cc78d1 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -610,7 +610,7 @@ void Dialog_Partition_Info::Display_Info()
top++, bottom++,
Gtk::FILL );
- if ( partition.filesystem != FS_UNALLOCATED && partition .status != GParted::STAT_NEW )
+ if (partition.filesystem != FS_UNALLOCATED && partition.status != STAT_NEW)
{
// name
table->attach( * Utils::mk_label( "<b>" + Glib::ustring( _("Name:") ) + "</b>"),
diff --git a/src/Partition.cc b/src/Partition.cc
index 788d4eb8..02a2f9d3 100644
--- a/src/Partition.cc
+++ b/src/Partition.cc
@@ -38,7 +38,7 @@ void Partition::Reset()
{
path.clear();
messages .clear() ;
- status = GParted::STAT_REAL ;
+ status = STAT_REAL;
type = TYPE_UNALLOCATED;
alignment = ALIGN_STRICT ;
filesystem = FS_UNALLOCATED;
@@ -193,8 +193,8 @@ void Partition::Set_Unallocated( const Glib::ustring & device_path,
sector_size,
inside_extended,
false );
-
- status = GParted::STAT_REAL ;
+
+ status = STAT_REAL;
}
void Partition::set_unpartitioned( const Glib::ustring & device_path,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]