[glom] Field: Remove an unnecessary null check.



commit eaa533221be2e8b7eb63aed636e468ebd59c44e5
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Dec 3 09:37:05 2014 +0100

    Field: Remove an unnecessary null check.

 glom/libglom/data_structure/field.cc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 215e48a..aee78bb 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -324,8 +324,7 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
     if(!str)
       return Glib::ustring();
 
-    Glib::ustring result = (str) ? 
-      Glib::ustring(Glib::ScopedPtr<char>(str).get()) : Glib::ustring();
+    Glib::ustring result = Glib::ustring(Glib::ScopedPtr<char>(str).get());
 
     //Correction for text representations of image (binary) data:
     //Avoid arbitrary newlines in this text.


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