aboutsummaryrefslogtreecommitdiffhomepage
path: root/highlight.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-04 15:11:43 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-04 15:11:43 -0700
commitc67702a4989c450acd2c9f02fb65aa757f74880f (patch)
treef1def9222481625273521642d68db72c46b866b1 /highlight.cpp
parent5880cd88c8e378efb3c76e0cfdff99dce0edf810 (diff)
Cleaned up lots of typecasts, simplified some string handling
Diffstat (limited to 'highlight.cpp')
-rw-r--r--highlight.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/highlight.cpp b/highlight.cpp
index b594434c..d8b7e7ea 100644
--- a/highlight.cpp
+++ b/highlight.cpp
@@ -1313,7 +1313,7 @@ void highlight_shell( const wcstring &buff, std::vector<int> &color, size_t pos,
// highlight the end of the subcommand
assert(end >= subbuff);
- if ((size_t)(end - subbuff) < length) {
+ if ((end - subbuff) < length) {
color.at(end-subbuff)=HIGHLIGHT_OPERATOR;
}
@@ -1418,7 +1418,7 @@ static void highlight_universal_internal( const wcstring &buffstr, std::vector<i
if( level == 0 )
{
level++;
- lst.push_back((long)(str-buff));
+ lst.push_back(str-buff);
prev_q = *str;
}
else
@@ -1442,7 +1442,7 @@ static void highlight_universal_internal( const wcstring &buffstr, std::vector<i
else
{
level++;
- lst.push_back((long)(str-buff));
+ lst.push_back(str-buff);
prev_q = *str;
}
}