summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 23:37:15 +0000
committerrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 23:37:15 +0000
commit206ca337182eaec4287042654d8d1253484ae15c (patch)
tree04846e463835d118ab067c7fb7d143f0cd1cec83 /third_party
parent8ab01cb74e4f9e92b8eda04475c69ad8752d9dbe (diff)
downloadchromium_src-206ca337182eaec4287042654d8d1253484ae15c.zip
chromium_src-206ca337182eaec4287042654d8d1253484ae15c.tar.gz
chromium_src-206ca337182eaec4287042654d8d1253484ae15c.tar.bz2
Avoid coercing integers to doubles when swapping for bubble sort.
score_ is partially initialized, and while ultimately the uninit elements are not used, coercing them to floating point generates uninit reports when run under drmemory. It's also unecessary, so I'm removing it. BUG=115326 R=jshin@chromium.org,timurrrr@chromium.org TEST=comact_lang_det_unittest_small.cc under drmemory Review URL: http://codereview.chromium.org/9465026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/cld/encodings/compact_lang_det/tote.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/cld/encodings/compact_lang_det/tote.cc b/third_party/cld/encodings/compact_lang_det/tote.cc
index 21087a8..75e5051 100644
--- a/third_party/cld/encodings/compact_lang_det/tote.cc
+++ b/third_party/cld/encodings/compact_lang_det/tote.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -275,7 +275,7 @@ void ToteWithReliability::Sort(int n) {
value_[sub] = value_[sub2];
value_[sub2] = tmpv;
- double tmps = score_[sub];
+ int tmps = score_[sub];
score_[sub] = score_[sub2];
score_[sub2] = tmps;