Skip to content

Commit

Permalink
use reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyu Li committed Mar 8, 2024
1 parent 9a1d5fa commit 90e5381
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions include/ion/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ class Builder;
class Graph {
public:


struct Impl;

Graph();



Graph(Builder & builder , const std::string& name = "");

Graph& operator+=(const Graph& rhs);
Expand Down Expand Up @@ -48,7 +45,6 @@ class Graph {

private:
std::shared_ptr<Impl> impl_;

};

} // namespace ion
Expand Down
5 changes: 1 addition & 4 deletions src/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ Graph operator+(const Graph& lhs, const Graph& rhs)

Node Graph::add(const std::string& name)
{
auto ptr =impl_->builder;
auto n = ptr.add(name,impl_->id);

auto n = impl_->builder.add(name,impl_->id);
impl_->nodes.push_back(n);
return n;
}
Expand Down Expand Up @@ -93,5 +91,4 @@ std::vector<Node>& Graph::nodes() {
}



} // namespace ion

0 comments on commit 90e5381

Please sign in to comment.