[gparted] Fix ISO C++ ambiguity compiler warning



commit 4a8fef98225c513cad9d38f32303c67d1ceed4b8
Author: Curtis Gedak <gedakc gmail com>
Date:   Sat Jul 16 10:54:55 2011 -0600

    Fix ISO C++ ambiguity compiler warning
    
    Enhance code to pass compiler warning.  Prior to this change the
    compiler would complain with the following message:
    
    error: ISO C++ says that these are ambiguous, even though the worst
    conversion for the first is better than the worst conversion for the
    second: /usr/include/c++/4.5/bits/postypes.h:192:7: note: candidate 1:
    std::fpos<_StateT> std::fpos<_StateT>::operator-(std::streamoff) const
    [with _StateT = __mbstate_t, std::fpos<_StateT> =
    std::fpos<__mbstate_t>, std::streamoff = long int] Utils.cc:443:27:
    note: candidate 2: operator-(std::streamoff, long long int) <built-in>

 src/Utils.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Utils.cc b/src/Utils.cc
index 153fabb..befaa48 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -439,7 +439,7 @@ Glib::ustring Utils::cleanup_cursor( const Glib::ustring & text )
 				break;
 			case '\b':
 				if (out.tellp() > startofline)
-					out.seekp(out.tellp()-1ll);
+					out.seekp(out.tellp() - std::streamsize('\b'));
 				break;
 			default:
 				out.put(ch);



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