summaryrefslogtreecommitdiff
path: root/src/RequestGroupEntry.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-26 23:56:43 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-26 23:56:43 +0900
commitda7400ef5c62ee144fc14ba7ca4745349f0b0c72 (patch)
treeb0d023eecfcfcca2a88eb3466baf878bdff9f4c1 /src/RequestGroupEntry.h
parent47402c5f29cb806f73aae2ed18aa2dde21956700 (diff)
Return std::unique_ptr member as const ref
Returning raw pointer has a risk that it may be stolen by std::shared_ptr in accident.
Diffstat (limited to 'src/RequestGroupEntry.h')
-rw-r--r--src/RequestGroupEntry.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/RequestGroupEntry.h b/src/RequestGroupEntry.h
index eb151461..13fabca8 100644
--- a/src/RequestGroupEntry.h
+++ b/src/RequestGroupEntry.h
@@ -60,10 +60,7 @@ public:
return requestGroup_;
}
- Command* getNextCommand() const
- {
- return nextCommand_.get();
- }
+ const std::unique_ptr<Command>& getNextCommand() const;
std::unique_ptr<Command> popNextCommand();