[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 01/01: Fix enum value namespace problem with older GCC

noreply at xfce.org noreply at xfce.org
Thu Jul 7 15:14:39 CEST 2016


This is an automated email from the git hooks/post-receive script.

omegaphil pushed a commit to branch omegaphil/graph-disk-io
in repository panel-plugins/xfce4-hardware-monitor-plugin.

commit 3218e66cb73168dc70e73d47f0181b4dc8b66c20
Author: OmegaPhil <OmegaPhil at startmail.com>
Date:   Thu Jul 7 14:10:57 2016 +0100

    Fix enum value namespace problem with older GCC
    
    If Glib::FileTest::FILE_TEST_EXISTS is wrong and Glib::FILE_TEST_EXISTS
    is right, why does GCC5 accept the former? Fails with GCC4.7.
---
 src/choose-monitor-window.cpp | 7 +++----
 src/monitor-impls.cpp         | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/choose-monitor-window.cpp b/src/choose-monitor-window.cpp
index e2bf36e..28eea50 100644
--- a/src/choose-monitor-window.cpp
+++ b/src/choose-monitor-window.cpp
@@ -711,7 +711,7 @@ Monitor *ChooseMonitorWindow::run(const Glib::ustring &mon_dir)
         bool show_free = show_free_checkbutton->get_active();
 
         // Making sure that the directory passed is valid
-        if (!Glib::file_test(mount_dir,  Glib::FileTest::FILE_TEST_IS_DIR))
+        if (!Glib::file_test(mount_dir,  Glib::FILE_TEST_IS_DIR))
         {
           /* Making sure the user is OK with specifying a non-existent directory
            * (i.e. it may appear later) */
@@ -750,8 +750,7 @@ Monitor *ChooseMonitorWindow::run(const Glib::ustring &mon_dir)
          * subsequent grab focus calls didn't work in it...
          * Making sure the device exists (since the user can put anything in
          * here) */
-        if (!Glib::file_test("/dev/" + device_name,
-                             Glib::FileTest::FILE_TEST_EXISTS) ||
+        if (!Glib::file_test("/dev/" + device_name, Glib::FILE_TEST_EXISTS) ||
             device_name == "")
         {
           /* Making sure the user is OK with specifying a non-existent device
@@ -846,7 +845,7 @@ Monitor *ChooseMonitorWindow::run(const Glib::ustring &mon_dir)
           dir = GenericMonitor::both;
 
         // Making sure that the path passed is valid
-        if (!Glib::file_test(file_path, Glib::FileTest::FILE_TEST_EXISTS))
+        if (!Glib::file_test(file_path, Glib::FILE_TEST_EXISTS))
         {
           /* Making sure the user is OK with specifying a non-existent file
            * (i.e. it may appear later) */
diff --git a/src/monitor-impls.cpp b/src/monitor-impls.cpp
index 54053b1..2adbd89 100644
--- a/src/monitor-impls.cpp
+++ b/src/monitor-impls.cpp
@@ -777,7 +777,7 @@ DiskStatsMonitor::DiskStatsMonitor(const Glib::ustring &device_name,
 double DiskStatsMonitor::do_measure()
 {
   // Making sure stats file is available
-  if (!Glib::file_test(diskstats_path, Glib::FileTest::FILE_TEST_EXISTS))
+  if (!Glib::file_test(diskstats_path, Glib::FILE_TEST_EXISTS))
   {
     std::cerr << Glib::ustring::compose(_("The file '%1' is not available - "
                                           "unable to obtain %2 for device '%3'!"
@@ -2026,7 +2026,7 @@ GenericMonitor::GenericMonitor(const Glib::ustring &file_path,
 double GenericMonitor::do_measure()
 {
   // Making sure stats file is available
-  if (!Glib::file_test(file_path, Glib::FileTest::FILE_TEST_EXISTS))
+  if (!Glib::file_test(file_path, Glib::FILE_TEST_EXISTS))
   {
     std::cerr << Glib::ustring::compose(_("The file '%1' for the Generic Monitor"
                                           " data source '%2' is not available!\n"),

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list