[gitg/wip/techlivezh/bug/720886: 2/7] Remove unnecessary var assignment
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/bug/720886: 2/7] Remove unnecessary var assignment
- Date: Mon, 13 Jan 2014 10:33:34 +0000 (UTC)
commit 75bd9e4bf5b30147fd238c6bece2c7f68d59e39e
Author: Techlive Zheng <techlivezheng gmail com>
Date: Thu Dec 19 19:31:49 2013 +0800
Remove unnecessary var assignment
The expression is only used and calculated once in every loop, no need
to use a dedicated variable holding it.
libgitg/resources/diff-view-html-builder.js | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index 228d32b..3f552a0 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -30,11 +30,10 @@ function diff_file(file, lnstate, data)
for (var j = 0; j < h.lines.length; ++j)
{
var l = h.lines[j];
- var o = String.fromCharCode(l.type);
var row = '<tr class="';
- switch (o)
+ switch (String.fromCharCode(l.type))
{
case ' ':
row += 'context"> \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]