Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variable #438

Open
wants to merge 2 commits into
base: minor_issues
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/overpass_api/statements/id_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Id_Query_Statement : public Output_Statement
static Generic_Statement_Maker< Id_Query_Statement > statement_maker;

virtual Query_Constraint* get_query_constraint();

const std::vector< uint64 >& get_refs() { return refs; }
int get_type() const { return type; }

Expand All @@ -58,14 +58,12 @@ class Id_Query_Statement : public Output_Statement

virtual std::string dump_xml(const std::string& indent) const
{
std::vector< uint64 >::const_iterator it = refs.begin();

std::string result = indent + "<id-query" + std::string(" type=\"") + to_string(type) + "\"";
if (!refs.empty())
result += " ref=\"" + ::to_string(refs[0]) + "\"";
for (uint i = 1; i < refs.size(); ++i)
result += " ref_" + ::to_string(i) + "=\"" + ::to_string(refs[i]) + "\"";

return result + dump_xml_result_name() + "/>\n";
}

Expand All @@ -77,14 +75,14 @@ class Id_Query_Statement : public Output_Statement
virtual std::string dump_ql_in_query(const std::string& indent) const
{
std::vector< uint64 >::const_iterator it = refs.begin();
std::string result = "(";

std::string result = (refs.size() > 1) ? "(id:" : "(";
if (it != refs.end())
result += ::to_string(*it++);
while (it != refs.end())
result += "," + ::to_string(*it++);
result += ")";

return result;
}

Expand Down