Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'drape/attribute_provider.cpp')
-rw-r--r--drape/attribute_provider.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/drape/attribute_provider.cpp b/drape/attribute_provider.cpp
index cdb2256e3c..3c0af9f2f4 100644
--- a/drape/attribute_provider.cpp
+++ b/drape/attribute_provider.cpp
@@ -39,28 +39,28 @@ uint8_t AttributeProvider::GetStreamCount() const
const void * AttributeProvider::GetRawPointer(uint8_t streamIndex)
{
- ASSERT(streamIndex < GetStreamCount(), ("Stream index = ", streamIndex, " out of range [0 : ", GetStreamCount(), ")"));
+ ASSERT_LESS(streamIndex, GetStreamCount(), ());
CHECK_STREAMS;
return m_streams[streamIndex].m_data.GetRaw();
}
const BindingInfo & AttributeProvider::GetBindingInfo(uint8_t streamIndex) const
{
- ASSERT(streamIndex < GetStreamCount(), ("Stream index = ", streamIndex, " out of range [0 : ", GetStreamCount(), ")"));
+ ASSERT_LESS(streamIndex, GetStreamCount(), ());
CHECK_STREAMS;
return m_streams[streamIndex].m_binding;
}
void AttributeProvider::Advance(uint16_t vertexCount)
{
- assert(m_vertexCount >= vertexCount);
+ ASSERT_LESS_OR_EQUAL(vertexCount, m_vertexCount, ());
CHECK_STREAMS;
for (size_t i = 0; i < GetStreamCount(); ++i)
{
const BindingInfo & info = m_streams[i].m_binding;
uint32_t offset = vertexCount * info.GetElementSize();
void * rawPointer = m_streams[i].m_data.GetRaw();
- m_streams[i].m_data = WeakPointer<void>((void *)(((uint8_t *)rawPointer) + offset));
+ m_streams[i].m_data = ReferencePoiner<void>((void *)(((uint8_t *)rawPointer) + offset));
}
m_vertexCount -= vertexCount;
@@ -68,9 +68,9 @@ void AttributeProvider::Advance(uint16_t vertexCount)
void AttributeProvider::InitStream(uint8_t streamIndex,
const BindingInfo &bindingInfo,
- WeakPointer<void> data)
+ ReferencePoiner<void> data)
{
- ASSERT(streamIndex < GetStreamCount(), ("Stream index = ", streamIndex, " out of range [0 : ", GetStreamCount(), ")"));
+ ASSERT_LESS(streamIndex, GetStreamCount(), ());
AttributeStream s;
s.m_binding = bindingInfo;
s.m_data = data;