| 50 | } |
| 51 | |
| 52 | Comment::Ptr Checkable::GetLastComment() const |
| 53 | { |
| 54 | std::unique_lock<std::mutex> lock (m_CommentMutex); |
| 55 | Comment::Ptr lastComment; |
| 56 | |
| 57 | for (auto& comment : m_Comments) { |
| 58 | if (!lastComment || comment->GetEntryTime() > lastComment->GetEntryTime()) { |
| 59 | lastComment = comment; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | return lastComment; |
| 64 | } |
| 65 | |
| 66 | void Checkable::RegisterComment(const Comment::Ptr& comment) |
| 67 | { |