[gtksourceviewmm] operator const void*(): Use GINT_TO_POINTER().



commit f9bec44dc1f915670f289fe334e7ed02f512728a
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Apr 5 14:05:33 2011 +0200

    operator const void*(): Use GINT_TO_POINTER().
    
    * gtksourceview/gtksourceviewmm/markup.cc:
    Use GINT_TO_POINTER() instead of a (const void*) cast,
    to avoid problems on unusual platforms.
    Daniel Elstner suggested this.

 gtksourceview/gtksourceviewmm/markup.cc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourceviewmm/markup.cc b/gtksourceview/gtksourceviewmm/markup.cc
index 6864fda..d853a4f 100644
--- a/gtksourceview/gtksourceviewmm/markup.cc
+++ b/gtksourceview/gtksourceviewmm/markup.cc
@@ -54,7 +54,7 @@ Markup& Markup::operator=(const Markup& other)
 
 Markup::operator const void*() const
 {
-  return (const void*)!(markup_.empty());
+  return !(markup_.empty()) ? GINT_TO_POINTER(1) : 0;
 }
 
 bool Markup::equal(const Markup& rhs) const
@@ -73,4 +73,3 @@ const char* Markup::get_c_str() const
 }
 
 } // namespace Gsv
-



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