diff options
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r-- | chrome/browser/translate/translate_infobar_delegate2.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/translate/translate_infobar_delegate2.cc b/chrome/browser/translate/translate_infobar_delegate2.cc index 5598178..bc11024 100644 --- a/chrome/browser/translate/translate_infobar_delegate2.cc +++ b/chrome/browser/translate/translate_infobar_delegate2.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <algorithm> + #include "chrome/browser/translate/translate_infobar_delegate2.h" #include "app/l10n_util.h" @@ -287,9 +289,7 @@ void TranslateInfoBarDelegate2::GetAfterTranslateStrings( if (offsets[0] > offsets[1]) { // Target language comes before source. - int tmp = offsets[0]; - offsets[0] = offsets[0]; - offsets[1] = tmp; + std::swap(offsets[0], offsets[1]); *swap_languages = true; } else { *swap_languages = false; |