Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 5816001: Minor changes to simplify IsValidLocaleSyntax logic. (Closed)

Created:
10 years ago by dmazzoni
Modified:
9 years, 7 months ago
Reviewers:
Nebojša Ćirić
CC:
chromium-reviews, jshin+watch_chromium.org
Visibility:
Public.

Description

Minor changes to simplify IsValidLocaleSyntax logic. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69130

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -16 lines) Patch
M app/l10n_util.cc View 1 2 3 4 chunks +17 lines, -16 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
dmazzoni
10 years ago (2010-12-13 18:50:07 UTC) #1
Nebojša Ćirić
http://codereview.chromium.org/5816001/diff/4001/app/l10n_util.cc File app/l10n_util.cc (right): http://codereview.chromium.org/5816001/diff/4001/app/l10n_util.cc#newcode552 app/l10n_util.cc:552: if (ch == '_') { You don't use ch ...
10 years ago (2010-12-13 19:43:48 UTC) #2
Nebojša Ćirić
10 years ago (2010-12-13 20:06:42 UTC) #3
LGTM (looking at the patch set 3) as long as try bots pass.

Thanks for doing this.

On 2010/12/13 19:43:48, Nebojša Ćirić wrote:
> http://codereview.chromium.org/5816001/diff/4001/app/l10n_util.cc
> File app/l10n_util.cc (right):
> 
> http://codereview.chromium.org/5816001/diff/4001/app/l10n_util.cc#newcode552
> app/l10n_util.cc:552: if (ch == '_') {
> You don't use ch anywhere else. Remove it and use prefix[i] directly.
> 
> You can also remove nested if (you can skip this):
> for () {
>   if (prefix[i] != '_') {
>     token_len++;
>     continue;
>   }
>   if (token_index == 0 && (token_len < 1)...) {
>     return false;
>   }
> 
>   token_index++;
>   token_len = 0;
> }

Powered by Google App Engine
This is Rietveld 408576698