Skip to content
Snippets Groups Projects
Commit 4952257f authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[App/IO] Gocad; Don't use extra ns qualifiers.

Code is already in the FileIO::Gocad namespace.
parent c678f126
No related branches found
No related tags found
No related merge requests found
...@@ -22,12 +22,11 @@ namespace Gocad ...@@ -22,12 +22,11 @@ namespace Gocad
std::ostream& operator<<(std::ostream& os, Layer const& l) std::ostream& operator<<(std::ostream& os, Layer const& l)
{ {
std::copy(l.regions.begin(), l.regions.end(), std::copy(l.regions.begin(), l.regions.end(),
std::ostream_iterator<Gocad::Region>(os, " ")); std::ostream_iterator<Region>(os, " "));
return os; return os;
} }
Layer parseLayer(std::string const& line, Layer parseLayer(std::string const& line, std::vector<Region> const& regions)
std::vector<Gocad::Region> const& regions)
{ {
std::istringstream iss(line); std::istringstream iss(line);
std::istream_iterator<std::string> it(iss); std::istream_iterator<std::string> it(iss);
...@@ -45,7 +44,7 @@ Layer parseLayer(std::string const& line, ...@@ -45,7 +44,7 @@ Layer parseLayer(std::string const& line,
{ {
auto const& region_it = auto const& region_it =
std::find_if(regions.begin(), regions.end(), std::find_if(regions.begin(), regions.end(),
[&](Gocad::Region const& r) { return r.name == *it; }); [&](Region const& r) { return r.name == *it; });
if (region_it != regions.end()) if (region_it != regions.end())
{ {
l.regions.push_back(*region_it); l.regions.push_back(*region_it);
......
...@@ -32,8 +32,7 @@ struct Layer final ...@@ -32,8 +32,7 @@ struct Layer final
std::ostream& operator<<(std::ostream& os, Layer const& l); std::ostream& operator<<(std::ostream& os, Layer const& l);
Layer parseLayer(std::string const& line, Layer parseLayer(std::string const& line, std::vector<Region> const& regions);
std::vector<Gocad::Region> const& regions);
} // end namespace Gocad } // end namespace Gocad
} // end namespace FileIO } // end namespace FileIO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment