Skip to content

Commit

Permalink
modify getStage() method to be slightly more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Aug 27, 2018
1 parent b037c32 commit 228a539
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pdal/PipelineManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ class PDAL_DLL PipelineManager
// return the pipeline reader endpoint (or nullptr, if not a reader
// pipeline)
Stage* getStage() const
{ return leaves().size() ? leaves()[0] : nullptr; }
{
const auto& llist = leaves();
return llist.size() ? llist[0] : nullptr; }

// Set the log to be available to stages.
void setLog(LogPtr& log)
Expand Down

0 comments on commit 228a539

Please sign in to comment.