Skip to content

Commit

Permalink
Merge pull request #929 from leapmotion/ref-ctxtenumoverload
Browse files Browse the repository at this point in the history
Add overload to ContextEnumerator to allow it to work from a reference
  • Loading branch information
Veronica Zheng committed May 6, 2016
2 parents a23189d + 04660cf commit d5742f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/autowiring/ContextEnumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ ContextEnumerator::ContextEnumerator(void) :
m_root(CoreContext::CurrentContext())
{}

ContextEnumerator::ContextEnumerator(CoreContext& root) :
m_root(root.shared_from_this())
{}

ContextEnumerator::ContextEnumerator(const std::shared_ptr<CoreContext>& root) :
m_root(root)
{}
Expand Down
5 changes: 5 additions & 0 deletions src/autowiring/ContextEnumerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ class ContextEnumerator
/// </summary>
ContextEnumerator(void);

/// <summary>
/// Constructs a context enumerator for the current context
/// </summary>
ContextEnumerator(CoreContext& root);

/// <summary>
/// Constructs an enumerator which may enumerate all of the contexts rooted at the specified root
/// </summary>
Expand Down

0 comments on commit d5742f3

Please sign in to comment.