Skip to content

Commit

Permalink
Code: Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Oct 30, 2014
1 parent b6efc33 commit 80010aa
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions source_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ namespace Sass {

if (generated_line != previous_generated_line) {
previous_generated_column = 0;
while (generated_line != previous_generated_line) {
result += ";";
previous_generated_line += 1;
}
result += std::string(generated_line, ";");
previous_generated_line = generated_line;
}
else {
if (i > 0) result += ",";
else if (i > 0) {
result += ",";
}

// generated column
Expand Down Expand Up @@ -105,7 +103,7 @@ namespace Sass {
{
const ptrdiff_t new_line_count = std::count(str.begin(), str.end(), '\n');
current_position.line += new_line_count;
if (new_line_count >= 1) {
if (new_line_count > 0) {
current_position.column = str.size() - str.find_last_of('\n');
} else {
current_position.column += str.size();
Expand Down

0 comments on commit 80010aa

Please sign in to comment.