range pack: add explicit cast to YRange Ptr
This commit is contained in:
parent
a886cd0636
commit
70358e4233
2 changed files with 9 additions and 1 deletions
|
@ -247,6 +247,9 @@ namespace CNORXZ
|
||||||
|
|
||||||
/** return YRange containig the ranges of the pack */
|
/** return YRange containig the ranges of the pack */
|
||||||
operator RangePtr() const;
|
operator RangePtr() const;
|
||||||
|
|
||||||
|
/** return YRange containig the ranges of the pack */
|
||||||
|
operator Sptr<YRange>() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** create a pack consisting of ranges a and b
|
/** create a pack consisting of ranges a and b
|
||||||
|
|
|
@ -119,6 +119,11 @@ namespace CNORXZ
|
||||||
return YRangeFactory(mRs).create();
|
return YRangeFactory(mRs).create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RangePack::operator Sptr<YRange>() const
|
||||||
|
{
|
||||||
|
return std::dynamic_pointer_cast<YRange>( YRangeFactory(mRs).create() );
|
||||||
|
}
|
||||||
|
|
||||||
RangePack operator*(const RangePtr& a, const RangePtr& b)
|
RangePack operator*(const RangePtr& a, const RangePtr& b)
|
||||||
{
|
{
|
||||||
CXZ_ASSERT(a != nullptr, "first operand not initialized");
|
CXZ_ASSERT(a != nullptr, "first operand not initialized");
|
||||||
|
|
Loading…
Reference in a new issue