Fossil SCM

Fixed a C++-ism. Added a note for a potential improvement.

stephan 2013-05-04 20:45 trunk
Commit fd74734bf87ada4dc1ae21298720a589b7adf0f5
1 file changed +6 -1
+6 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1856,12 +1856,17 @@
18561856
@ </thead><tbody>
18571857
while( SQLITE_ROW == db_step(&query) ){
18581858
char const * zMonth = db_column_text(&query, 0);
18591859
int const nCount = db_column_int(&query, 1);
18601860
int const nSize = nPixelsPerCommit * nCount;
1861
- nCommitCount += nCount;
18621861
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
+ */
18631868
@<tr class='row%d(rowClass)'>
18641869
@ <td>
18651870
@ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a>
18661871
@ </td><td>%d(nCount)</td>
18671872
@ <td>
18681873
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button