fix: rename func args to avoid -Wshadow in GCC 4.x

This commit is contained in:
ToruNiina
2021-05-10 22:56:16 +09:00
parent cd60045014
commit b8291af42b
2 changed files with 66 additions and 66 deletions

View File

@@ -73,13 +73,13 @@ struct location final : public region_base
using difference_type = typename const_iterator::difference_type;
using source_ptr = std::shared_ptr<const std::vector<char>>;
location(std::string name, std::vector<char> cont)
location(std::string source_name, std::vector<char> cont)
: source_(std::make_shared<std::vector<char>>(std::move(cont))),
line_number_(1), source_name_(std::move(name)), iter_(source_->cbegin())
line_number_(1), source_name_(std::move(source_name)), iter_(source_->cbegin())
{}
location(std::string name, const std::string& cont)
location(std::string source_name, const std::string& cont)
: source_(std::make_shared<std::vector<char>>(cont.begin(), cont.end())),
line_number_(1), source_name_(std::move(name)), iter_(source_->cbegin())
line_number_(1), source_name_(std::move(source_name)), iter_(source_->cbegin())
{}
location(const location&) = default;
@@ -343,9 +343,9 @@ struct region final : public region_base
}))
{
// unwrap the first '#' by std::next.
auto str = make_string(std::next(comment_found), iter);
if(!str.empty() && str.back() == '\r') {str.pop_back();}
com.push_back(std::move(str));
auto s = make_string(std::next(comment_found), iter);
if(!s.empty() && s.back() == '\r') {s.pop_back();}
com.push_back(std::move(s));
}
else
{
@@ -396,9 +396,9 @@ struct region final : public region_base
}))
{
// unwrap the first '#' by std::next.
auto str = make_string(std::next(comment_found), this->line_end());
if(!str.empty() && str.back() == '\r') {str.pop_back();}
com.push_back(std::move(str));
auto s = make_string(std::next(comment_found), this->line_end());
if(!s.empty() && s.back() == '\r') {s.pop_back();}
com.push_back(std::move(s));
}
}
}