[nemiver: 3/5] Fix string cleanup per Dodji's review
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver: 3/5] Fix string cleanup per Dodji's review
- Date: Sun, 19 Apr 2009 22:56:23 -0400 (EDT)
commit 578379a96356347f845ed66e93fb7d961ec8a0c5
Author: Jonathon Jongsma <jonathon jongsma collabora co uk>
Date: Tue Apr 14 22:17:48 2009 -0500
Fix string cleanup per Dodji's review
* src/common/nmv-ustring.h: There's not really any reason to make the
std::string constructor explicit anymore since it doesn't do locale
conversion anymore.
* src/dbgengine/nmv-gdb-engine.cc: use implicit conversion
* src/persp/dbgperspective/nmv-dbg-perspective.cc: remove TODO, style fix
---
src/common/nmv-ustring.h | 2 +-
src/dbgengine/nmv-gdb-engine.cc | 3 +--
src/persp/dbgperspective/nmv-dbg-perspective.cc | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/common/nmv-ustring.h b/src/common/nmv-ustring.h
index eca1a6f..bb98e87 100644
--- a/src/common/nmv-ustring.h
+++ b/src/common/nmv-ustring.h
@@ -50,7 +50,7 @@ public:
UString (const char *a_cstr, long a_len=-1) ;
UString (const unsigned char *a_cstr, long a_len=-1) ;
UString (const Glib::ustring &an_other_string) ;
- explicit UString (const string &an_other_string) ;
+ UString (const string &an_other_string) ;
UString (UString const &an_other_string) ;
virtual ~UString () ;
UString& set (const gchar* a_buf, gulong a_len) ;
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index 4de2b4f..4390bbb 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -3488,8 +3488,7 @@ fetch_variable:
}
LOG_DD ("globals: got variable name: " << var_name );
- // TODO: What encoding is var_name?
- var.reset (new IDebugger::Variable (UString (var_name)));
+ var.reset (new IDebugger::Variable (var_name));
var_list.push_back (var);
skip_oobr:
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 5fc2c35..864fbe9 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -980,7 +980,7 @@ struct DBGPerspective::Priv {
UString buf_content;
if (is_buffer_valid_utf8 (a_input.c_str (), a_input.size ())) {
- a_output = UString(a_input);
+ a_output = a_input;
return true;
}
UString utf8_content;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]