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 */
|
||||
operator RangePtr() const;
|
||||
|
||||
/** return YRange containig the ranges of the pack */
|
||||
operator Sptr<YRange>() const;
|
||||
};
|
||||
|
||||
/** create a pack consisting of ranges a and b
|
||||
|
|
|
@ -118,7 +118,12 @@ namespace CNORXZ
|
|||
{
|
||||
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)
|
||||
{
|
||||
CXZ_ASSERT(a != nullptr, "first operand not initialized");
|
||||
|
|
Loading…
Reference in a new issue