From 20c4a9ce69e73a182d60718e9b52510d66c8f20e Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Tue, 26 Jun 2018 00:37:36 +0300 Subject: tdf#96099 Remove some trivial container iterator typedefs Change-Id: Ifec98748d55ff6aca64c425c50c2cf2650f61591 Reviewed-on: https://gerrit.libreoffice.org/56422 Tested-by: Jenkins Reviewed-by: Noel Grandin --- jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index dfa4653054cc..99feb5f157bc 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -891,9 +891,7 @@ rtl::Reference getJREInfoByPath( static vector vecBadPaths; static map > mapJREs; - typedef map >::const_iterator MapIt; OUString sFilePath; - typedef vector::const_iterator cit_path; vector > props; OUString sResolvedDir = resolveDirPath(path); @@ -908,7 +906,7 @@ rtl::Reference getJREInfoByPath( //For example, a sun JDK contains /bin/java and /jre/bin/java. //When /bin/java has been found then we need not find /jre/bin/java. //Otherwise we would execute java two times for every JDK found. - MapIt entry2 = find_if(mapJREs.begin(), mapJREs.end(), + auto entry2 = find_if(mapJREs.cbegin(), mapJREs.cend(), SameOrSubDirJREMap(sResolvedDir)); if (entry2 != mapJREs.end()) { @@ -945,21 +943,21 @@ rtl::Reference getJREInfoByPath( if (sFilePath.isEmpty()) { //The file path (to java exe) is not valid - cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath); - if (ifull == vecBadPaths.end()) + auto ifull = find(vecBadPaths.cbegin(), vecBadPaths.cend(), sFullPath); + if (ifull == vecBadPaths.cend()) { vecBadPaths.push_back(sFullPath); } continue; } - cit_path ifile = find(vecBadPaths.begin(), vecBadPaths.end(), sFilePath); - if (ifile != vecBadPaths.end()) + auto ifile = find(vecBadPaths.cbegin(), vecBadPaths.cend(), sFilePath); + if (ifile != vecBadPaths.cend()) { continue; } - MapIt entry = mapJREs.find(sFilePath); + auto entry = mapJREs.find(sFilePath); if (entry != mapJREs.end()) { JFW_TRACE2("JRE found again (detected before): " << sFilePath); -- cgit