[DEV] update to the new ETK allocator wrapper
This commit is contained in:
parent
eaa443d484
commit
bf9d5a126a
@ -200,7 +200,7 @@ etk::Pair<float, enum esvg::distance> esvg::Base::parseLength2(const etk::String
|
||||
ESVG_VERBOSE(" lenght : '" << _dataInput << "'");
|
||||
float n = _dataInput.to<float>();
|
||||
etk::String unit;
|
||||
for (int32_t iii=0; iii<_dataInput.size(); ++iii) {
|
||||
for (size_t iii=0; iii<_dataInput.size(); ++iii) {
|
||||
if( (_dataInput[iii]>='0' && _dataInput[iii]<='9')
|
||||
|| _dataInput[iii]=='+'
|
||||
|| _dataInput[iii]=='-'
|
||||
|
@ -64,7 +64,7 @@ void esvg::Polygon::display(int32_t _spacing) {
|
||||
esvg::render::Path esvg::Polygon::createPath() {
|
||||
esvg::render::Path out;
|
||||
out.moveTo(false, m_listPoint[0]);
|
||||
for( int32_t iii=1; iii< m_listPoint.size(); iii++) {
|
||||
for(size_t iii=1; iii< m_listPoint.size(); iii++) {
|
||||
out.lineTo(false, m_listPoint[iii]);
|
||||
}
|
||||
out.close();
|
||||
|
@ -61,7 +61,7 @@ esvg::render::Path esvg::Polyline::createPath() {
|
||||
esvg::render::Path out;
|
||||
out.clear();
|
||||
out.moveTo(false, m_listPoint[0]);
|
||||
for( int32_t iii=1; iii< m_listPoint.size(); iii++) {
|
||||
for(size_t iii=1; iii< m_listPoint.size(); iii++) {
|
||||
out.lineTo(false, m_listPoint[iii]);
|
||||
}
|
||||
out.stop();
|
||||
|
@ -39,7 +39,7 @@ void esvg::render::PointList::display() {
|
||||
ESVG_VERBOSE(" Display list of points : size=" << m_data.size());
|
||||
for (auto &it : m_data) {
|
||||
ESVG_VERBOSE(" Find List " << it.size() << " members");
|
||||
for (int32_t iii=0;
|
||||
for (size_t iii=0;
|
||||
iii < it.size();
|
||||
++iii) {
|
||||
switch (it[iii].m_type) {
|
||||
|
@ -8,8 +8,7 @@
|
||||
#include <esvg/debug.hpp>
|
||||
|
||||
esvg::render::Scanline::Scanline(size_t _size) {
|
||||
float tmp(0);
|
||||
m_data.resize(_size, tmp);
|
||||
m_data.resize(_size, 0.0f);
|
||||
}
|
||||
|
||||
size_t esvg::render::Scanline::size() const {
|
||||
@ -23,16 +22,16 @@ void esvg::render::Scanline::clear(float _fill) {
|
||||
}
|
||||
|
||||
float esvg::render::Scanline::get(int32_t _pos) const {
|
||||
if( _pos>=0
|
||||
&& _pos<m_data.size()) {
|
||||
if( _pos >= 0
|
||||
&& size_t(_pos) < m_data.size()) {
|
||||
return m_data[_pos];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void esvg::render::Scanline::set(int32_t _pos, float _newColor) {
|
||||
if( _pos>=0
|
||||
&& _pos<m_data.size()) {
|
||||
if( _pos >= 0
|
||||
&& size_t(_pos) < m_data.size()) {
|
||||
m_data[_pos] = _newColor;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ etk::Pair<vec2, vec2> esvg::render::SegmentList::getViewPort() {
|
||||
void esvg::render::SegmentList::createSegmentList(const esvg::render::PointList& _listPoint) {
|
||||
for (auto &it : _listPoint.m_data) {
|
||||
// Build Segments
|
||||
for (int32_t iii=0, jjj=it.size()-1;
|
||||
for (size_t iii=0, jjj=it.size()-1;
|
||||
iii < it.size();
|
||||
jjj = iii++) {
|
||||
addSegment(it[jjj], it[iii]);
|
||||
@ -137,10 +137,10 @@ void esvg::render::SegmentList::createSegmentListStroke(esvg::render::PointList&
|
||||
// . * * . * * * * * * * * * * * * *
|
||||
// * *
|
||||
// * *
|
||||
for (int32_t idPevious=itListPoint.size()-1, idCurrent=0, idNext=1;
|
||||
idCurrent < itListPoint.size();
|
||||
for (int64_t idPevious=itListPoint.size()-1, idCurrent=0, idNext=1;
|
||||
idCurrent < int64_t(itListPoint.size());
|
||||
idPevious = idCurrent++, idNext++) {
|
||||
if (idNext == itListPoint.size()) {
|
||||
if (idNext == int64_t(itListPoint.size())) {
|
||||
idNext = 0;
|
||||
}
|
||||
if ( itListPoint[idCurrent].m_type == esvg::render::Point::type::join
|
||||
@ -149,7 +149,7 @@ void esvg::render::SegmentList::createSegmentListStroke(esvg::render::PointList&
|
||||
ESVG_ERROR("an error occure a previous ID is < 0.... ");
|
||||
continue;
|
||||
}
|
||||
if (idNext >= itListPoint.size()) {
|
||||
if (idNext >= int64_t(itListPoint.size())) {
|
||||
ESVG_ERROR("an error occure a next ID is >= nbPoint len .... ");
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user