diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 14:39:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:54:34 +0000 |
commit | 265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch) | |
tree | 6936185b2f2f46b99646d00e542cdde845ef073d /shell | |
parent | 9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff) |
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/unix/sysshell/recently_used_file_handler.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx index ee9e697e1f7f..cf399b1770b0 100644 --- a/shell/source/unix/sysshell/recently_used_file_handler.cxx +++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx @@ -150,16 +150,16 @@ namespace /* private */ { static OString escape_content(const string_t &text) { OStringBuffer aBuf; - for (size_t i = 0; i < text.length(); i++) + for (auto i : text) { - switch (text[i]) + switch (i) { case '&': aBuf.append("&"); break; case '<': aBuf.append("<"); break; case '>': aBuf.append(">"); break; case '\'': aBuf.append("'"); break; case '"': aBuf.append("""); break; - default: aBuf.append(text[i]); break; + default: aBuf.append(i); break; } } return aBuf.makeStringAndClear(); |