Fossil SCM
Fixed a C++-ism. Added a note for a potential improvement.
Commit
fd74734bf87ada4dc1ae21298720a589b7adf0f5
Parent
495bf1ea8d1615c…
1 file changed
+6
-1
+6
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1856,12 +1856,17 @@ | ||
| 1856 | 1856 | @ </thead><tbody> |
| 1857 | 1857 | while( SQLITE_ROW == db_step(&query) ){ |
| 1858 | 1858 | char const * zMonth = db_column_text(&query, 0); |
| 1859 | 1859 | int const nCount = db_column_int(&query, 1); |
| 1860 | 1860 | int const nSize = nPixelsPerCommit * nCount; |
| 1861 | - nCommitCount += nCount; | |
| 1862 | 1861 | char rowClass = ++nRowNumber % 2; |
| 1862 | + nCommitCount += nCount; | |
| 1863 | + /** | |
| 1864 | + * Potential improvement: set nCount to exactly the number of | |
| 1865 | + * events for the month. Keep in mind that this query only counts | |
| 1866 | + * 'ci' events but we link to the timeline for all event types. | |
| 1867 | + */ | |
| 1863 | 1868 | @<tr class='row%d(rowClass)'> |
| 1864 | 1869 | @ <td> |
| 1865 | 1870 | @ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a> |
| 1866 | 1871 | @ </td><td>%d(nCount)</td> |
| 1867 | 1872 | @ <td> |
| 1868 | 1873 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1856,12 +1856,17 @@ | |
| 1856 | @ </thead><tbody> |
| 1857 | while( SQLITE_ROW == db_step(&query) ){ |
| 1858 | char const * zMonth = db_column_text(&query, 0); |
| 1859 | int const nCount = db_column_int(&query, 1); |
| 1860 | int const nSize = nPixelsPerCommit * nCount; |
| 1861 | nCommitCount += nCount; |
| 1862 | char rowClass = ++nRowNumber % 2; |
| 1863 | @<tr class='row%d(rowClass)'> |
| 1864 | @ <td> |
| 1865 | @ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a> |
| 1866 | @ </td><td>%d(nCount)</td> |
| 1867 | @ <td> |
| 1868 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1856,12 +1856,17 @@ | |
| 1856 | @ </thead><tbody> |
| 1857 | while( SQLITE_ROW == db_step(&query) ){ |
| 1858 | char const * zMonth = db_column_text(&query, 0); |
| 1859 | int const nCount = db_column_int(&query, 1); |
| 1860 | int const nSize = nPixelsPerCommit * nCount; |
| 1861 | char rowClass = ++nRowNumber % 2; |
| 1862 | nCommitCount += nCount; |
| 1863 | /** |
| 1864 | * Potential improvement: set nCount to exactly the number of |
| 1865 | * events for the month. Keep in mind that this query only counts |
| 1866 | * 'ci' events but we link to the timeline for all event types. |
| 1867 | */ |
| 1868 | @<tr class='row%d(rowClass)'> |
| 1869 | @ <td> |
| 1870 | @ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a> |
| 1871 | @ </td><td>%d(nCount)</td> |
| 1872 | @ <td> |
| 1873 |