diff options
author | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:12 +0200 |
---|---|---|
committer | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:59 +0200 |
commit | 0d5f63b18f5766760cf39e82ee11482984e0a938 (patch) | |
tree | e3f74b9b37e7618c92840024077dff43e6d08f0d /gio/src/datainputstream.ccg | |
parent | dce7a844e48a582e42eb2b60eef5c1f2527540ac (diff) | |
parent | d94115843f38967b5e883f5f7d8057882ae364cb (diff) | |
download | glibmm-0d5f63b18f5766760cf39e82ee11482984e0a938.tar.gz |
Merge branch 'master' into glibmm-gir-gmmprocglibmm-gir-gmmproc
Diffstat (limited to 'gio/src/datainputstream.ccg')
-rw-r--r-- | gio/src/datainputstream.ccg | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg index 485c7b1e..8dd8b317 100644 --- a/gio/src/datainputstream.ccg +++ b/gio/src/datainputstream.ccg @@ -26,7 +26,7 @@ namespace Gio bool DataInputStream::read_line(std::string& line, const Glib::RefPtr<Cancellable>& cancellable) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_line = g_data_input_stream_read_line(gobj(), 0, // pass NULL since we can easily determine the length from the returned std::string Glib::unwrap(cancellable), @@ -44,7 +44,7 @@ bool DataInputStream::read_line(std::string& line, const Glib::RefPtr<Cancellabl bool DataInputStream::read_line(std::string& line) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_line = g_data_input_stream_read_line(gobj(), 0, // pass NULL since we can easily determine the length from the returned std::string 0, @@ -65,7 +65,7 @@ void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::Re // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_line_async(gobj(), io_priority, @@ -76,7 +76,7 @@ void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::Re bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data) { - GError* gerror = 0; + GError* gerror = nullptr; gsize size = 0; gchar* buffer = g_data_input_stream_read_line_finish(gobj(), Glib::unwrap(result), &size, &(gerror)); if(gerror) @@ -85,7 +85,7 @@ bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, bool retval = false; if(buffer && size) { - retval = (buffer != 0); + retval = (buffer != nullptr); data = std::string(buffer, size); g_free (buffer); } @@ -95,7 +95,7 @@ bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, bool DataInputStream::read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_str = g_data_input_stream_read_until(gobj(), stop_chars.c_str(), 0, // pass NULL since we can easily determine the length from the returned std::string @@ -116,7 +116,7 @@ bool DataInputStream::read_until(std::string& data, const std::string& stop_char */ bool DataInputStream::read_until(std::string& data, const std::string& stop_chars) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_str = g_data_input_stream_read_until(gobj(), stop_chars.c_str(), 0, // pass NULL since we can easily determine the length from the returned std::string @@ -138,7 +138,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(), io_priority, @@ -149,7 +149,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data) { - GError* gerror = 0; + GError* gerror = nullptr; gsize size = 0; gchar* buffer = g_data_input_stream_read_until_finish(gobj(), Glib::unwrap(result), &size, &(gerror)); if(gerror) @@ -158,7 +158,7 @@ bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, bool retval = false; if(buffer && size) { - retval = (buffer != 0); + retval = (buffer != nullptr); data = std::string(buffer, size); g_free (buffer); } @@ -169,7 +169,7 @@ bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_str = g_data_input_stream_read_upto(gobj(), stop_chars.c_str(), -1, /* null-terminated */ 0, // pass NULL since we can easily determine the length from the returned std::string @@ -190,7 +190,7 @@ bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars */ bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars) { - GError* gerror = 0; + GError* gerror = nullptr; char* c_str = g_data_input_stream_read_upto(gobj(), stop_chars.c_str(), -1, /* null-terminated */ 0, // pass NULL since we can easily determine the length from the returned std::string @@ -215,7 +215,7 @@ void DataInputStream::read_upto_async(const std::string& stop_chars, const SlotA // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_upto_async(gobj(), stop_chars.c_str(), -1, /* null-terminated */ io_priority, @@ -226,7 +226,7 @@ void DataInputStream::read_upto_async(const std::string& stop_chars, const SlotA bool DataInputStream::read_upto_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data) { - GError* gerror = 0; + GError* gerror = nullptr; gsize size = 0; gchar* buffer = g_data_input_stream_read_upto_finish(gobj(), Glib::unwrap(result), &size, &(gerror)); if(gerror) @@ -235,7 +235,7 @@ bool DataInputStream::read_upto_finish(const Glib::RefPtr<AsyncResult>& result, bool retval = false; if(buffer && size) { - retval = (buffer != 0); + retval = (buffer != nullptr); data = std::string(buffer, size); g_free (buffer); } |