summaryrefslogtreecommitdiff
path: root/gio/src/memoryinputstream.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-07-15 12:45:22 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-07-15 12:45:22 +0200
commit40f91e93e079a59d6e39bf0f7f2012357d3ee763 (patch)
tree8fcaf53512a26f6440362b87d3139d634eb76dd6 /gio/src/memoryinputstream.ccg
parent254f5b93e08e45cd32ccdbb0f4a31c433ece9d08 (diff)
downloadglibmm-40f91e93e079a59d6e39bf0f7f2012357d3ee763.tar.gz
C++11: Some use of the auto keyword.
Diffstat (limited to 'gio/src/memoryinputstream.ccg')
-rw-r--r--gio/src/memoryinputstream.ccg6
1 files changed, 3 insertions, 3 deletions
diff --git a/gio/src/memoryinputstream.ccg b/gio/src/memoryinputstream.ccg
index 0dfd768d..344506d6 100644
--- a/gio/src/memoryinputstream.ccg
+++ b/gio/src/memoryinputstream.ccg
@@ -41,7 +41,7 @@ private:
void destroy_data_callback(void* user_data)
{
- SlotWithData* slot_with_data = static_cast<SlotWithData*>(user_data);
+ auto slot_with_data = static_cast<SlotWithData*>(user_data);
g_return_if_fail(slot_with_data != 0);
try
@@ -84,8 +84,8 @@ _DEPRECATE_IFDEF_END
void MemoryInputStream::add_data(const void* data, gssize len, const SlotDestroyData& destroy_slot)
{
- SlotWithData* slot_with_data = new SlotWithData(destroy_slot, const_cast<void*>(data));
- GBytes* bytes = g_bytes_new_with_free_func(data, len, &destroy_data_callback, slot_with_data);
+ auto slot_with_data = new SlotWithData(destroy_slot, const_cast<void*>(data));
+ auto bytes = g_bytes_new_with_free_func(data, len, &destroy_data_callback, slot_with_data);
g_memory_input_stream_add_bytes(gobj(), bytes);
g_bytes_unref(bytes); // g_memory_input_stream_add_bytes() takes a reference
}