The CS geek in me wants to know why not make split points count from 0. :P

On Wed, Nov 18, 2009 at 9:33 PM, <[email protected]> wrote:

> Reviewers: Lex,
>
> Description:
> Hi Lex,
>
> could you review this patch for me?
>
> As it turns out that we were using 0-based counting for permutations,
> but 1-based counting for split points.  This patch fixes that
> inconsistency.
>
> Thanks,
> kathrin
>
> Please review this at http://gwt-code-reviews.appspot.com/104813
>
> Affected files:
>   dev/core/src/com/google/gwt/soyc/GlobalInformation.java
>   dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
>
>
> Index: dev/core/src/com/google/gwt/soyc/GlobalInformation.java
> ===================================================================
> --- dev/core/src/com/google/gwt/soyc/GlobalInformation.java     (revision
> 6983)
> +++ dev/core/src/com/google/gwt/soyc/GlobalInformation.java     (working
> copy)
> @@ -46,7 +46,8 @@
>        "total");
>
>    public GlobalInformation(String permutationId) {
> -    this.permutationId = permutationId;
> +    int permId = Integer.parseInt(permutationId) + 1;
> +    this.permutationId = Integer.toString(permId);
>    }
>
>    public SizeBreakdown[] allSizeBreakdowns() {
> Index: dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
> ===================================================================
> --- dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
> (revision
> 6983)
> +++ dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
> (working
> copy)
> @@ -121,8 +121,9 @@
>      outFile.println("<ul>");
>      for (String permutationId : allPermsInfo.keySet()) {
>        String permutationInfo = allPermsInfo.get(permutationId);
> -      outFile.print("<li><a href=\"SoycDashboard" + "-" + permutationId
> -          + "-index.html\">Permutation " + permutationId);
> +      int permId = Integer.parseInt(permutationId) + 1;
> +      outFile.print("<li><a href=\"SoycDashboard" + "-" +
> Integer.toString(permId)
> +          + "-index.html\">Permutation " + Integer.toString(permId));
>        if (permutationInfo.length() > 0) {
>          outFile.println(" (" + permutationInfo + ")" + "</a></li>");
>        } else {
>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to