コード例 #1
0
ファイル: Polygon.cpp プロジェクト: wenqing/ogs
bool Polygon::isPolylineInPolygon(const Polyline& ply) const
{
    for (auto segment : ply) {
        if (!containsSegment(segment)) {
            return false;
        }
    }
    return true;
}
コード例 #2
0
// virtual
bool LLHeapBuffer::reclaimSegment(const LLSegment& segment)
{
	if(containsSegment(segment))
	{
		mReclaimedBytes += segment.size();
		if(mReclaimedBytes == mSize)
		{
			// We have reclaimed all of the memory from this
			// buffer. Therefore, we can reset the mNextFree to the
			// start of the buffer, and reset the reclaimed bytes.
			mReclaimedBytes = 0;
			mNextFree = mBuffer;
		}
		else if(mReclaimedBytes > mSize)
		{
			LL_WARNS() << "LLHeapBuffer reclaimed more memory than allocated."
				<< " This is probably programmer error." << LL_ENDL;
		}
		return true;
	}
	return false;
}