From 6aa85b154196d4e1c5dbbfc3198ddcc6b20e7a0d Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 22 Nov 2017 10:38:43 +0100 Subject: [PATCH] simplify for loop --- src/c-wrapper/api/c-chat-room.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index 9ea256016..f2a0da4b5 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -301,8 +301,8 @@ void linphone_chat_room_set_subject (LinphoneChatRoom *cr, const char *subject) bctbx_list_t * linphone_chat_room_get_composing_addresses(LinphoneChatRoom *cr) { LinphonePrivate::ChatRoomPrivate *room = L_GET_PRIVATE_FROM_C_OBJECT(cr); bctbx_list_t *result = NULL; - for (auto i = room->remoteIsComposing.begin(); i != room->remoteIsComposing.end(); ++i) { - result = bctbx_list_append(result, linphone_address_new((*i).c_str())); + for (const auto &uri : room->remoteIsComposing) { + result = bctbx_list_append(result, linphone_address_new(uri.c_str())); } return result; }