diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-10 17:00:23 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-11 00:15:19 +0100 |
commit | 5a341e126709e3c9ef01680e116d5ce0d55d9f8c (patch) | |
tree | 85b5614a2e120e8a35b6bee861c4cf29dd8f5fcc /dtrans | |
parent | e9171066136868fe89947dda5095e9479d5e50e7 (diff) |
Use for-range loops in drawinglayer and dtrans
Change-Id: I4d3368e2ffa4d98c04d69b8f5ef485558d812fda
Reviewed-on: https://gerrit.libreoffice.org/51047
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/generic/clipboardmanager.cxx | 7 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.cxx | 13 |
2 files changed, 7 insertions, 13 deletions
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index c916bd5e0b60..0106cccd372a 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -157,12 +157,9 @@ void SAL_CALL ClipboardManager::dispose() aGuard2.clear(); // dispose all clipboards still in list - ClipboardMap::iterator iter = aCopy.begin(); - ClipboardMap::iterator imax = aCopy.end(); - - for (; iter != imax; ++iter) + for (auto const& elem : aCopy) { - Reference< XComponent > xComponent(iter->second, UNO_QUERY); + Reference< XComponent > xComponent(elem.second, UNO_QUERY); if (xComponent.is()) { try diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index c4580337a9bf..f8d04091a368 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -347,10 +347,9 @@ size_t CalcSizeForStringListBuffer(const FileList_t& fileList) return 0; size_t size = 1; // one for the very final '\0' - FileList_t::const_iterator iter_end = fileList.end(); - for (FileList_t::const_iterator iter = fileList.begin(); iter != iter_end; ++iter) + for (auto const& elem : fileList) { - size += iter->length() + 1; // length including terminating '\0' + size += elem.length() + 1; // length including terminating '\0' } return (size * sizeof(FileList_t::value_type::value_type)); } @@ -366,12 +365,10 @@ ByteSequence_t FileListToByteSequence(const FileList_t& fileList) wchar_t* p = reinterpret_cast<wchar_t*>(bseq.getArray()); ZeroMemory(p, size); - FileList_t::const_iterator iter; - FileList_t::const_iterator iter_end = fileList.end(); - for (iter = fileList.begin(); iter != iter_end; ++iter) + for (auto const& elem : fileList) { - wcsncpy(p, iter->c_str(), iter->length()); - p += (iter->length() + 1); + wcsncpy(p, elem.c_str(), elem.length()); + p += (elem.length() + 1); } } return bseq; |