[glom] Replace deprecated Glib::ScopedPtr.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Replace deprecated Glib::ScopedPtr.
- Date: Tue, 26 Jan 2016 12:51:35 +0000 (UTC)
commit d16e4b75c9ec1c363af8d0bc3b8e1d5d63421657
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jan 26 13:51:24 2016 +0100
Replace deprecated Glib::ScopedPtr.
glom/libglom/data_structure/field.cc | 2 +-
glom/libglom/data_structure/glomconversions.cc | 2 +-
glom/libglom/utils.cc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 472cb54..516f9da 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -321,7 +321,7 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
if(!str)
return Glib::ustring();
- auto result = Glib::ustring(Glib::ScopedPtr<char>(str).get());
+ auto result = Glib::ustring(Glib::make_unique_ptr_gfree(str).get());
//Correction for text representations of image (binary) data:
//Avoid arbitrary newlines in this text.
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index e8835ae..b0026b5 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -304,7 +304,7 @@ Glib::ustring Conversions::format_tm(const tm& tm_data, const std::locale& local
do
{
- const Glib::ScopedPtr<char> buf (static_cast<char*>(g_malloc(bufsize)));
+ const auto buf = Glib::make_unique_ptr_gfree(static_cast<char*>(g_malloc(bufsize)));
// Set the first byte to something other than '\0', to be able to
// recognize whether strftime actually failed or just returned "".
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index 1102c1e..d472f8e 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -1064,7 +1064,7 @@ std::string Utils::sqlbuilder_get_full_query(
}
//Convert to something that std::cout should be able to handle.
- const Glib::ScopedPtr<char> buf(g_convert_with_fallback(
+ const auto buf = Glib::make_unique_ptr_gfree(g_convert_with_fallback(
result.raw().data(), result.raw().size(),
"ISO-8859-1", "UTF-8",
(char*)"?",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]