[DEV] remove compilation warning
This commit is contained in:
@@ -20,12 +20,12 @@
|
||||
static void SortElementList(std::vector<appl::dataBufferStruct*>& _list) {
|
||||
std::vector<appl::dataBufferStruct *> tmpList = _list;
|
||||
_list.clear();
|
||||
for(int32_t iii=0; iii<tmpList.size(); iii++) {
|
||||
for(size_t iii=0; iii<tmpList.size(); iii++) {
|
||||
if (NULL == tmpList[iii]) {
|
||||
continue;
|
||||
}
|
||||
int32_t findPos = 0;
|
||||
for(int32_t jjj=0; jjj<_list.size(); jjj++) {
|
||||
size_t findPos = 0;
|
||||
for(size_t jjj=0; jjj<_list.size(); jjj++) {
|
||||
//EWOL_DEBUG("compare : \""<<*tmpList[iii] << "\" and \"" << *m_listDirectory[jjj] << "\"");
|
||||
if (_list[jjj] == NULL) {
|
||||
continue;
|
||||
@@ -68,11 +68,9 @@ BufferView::~BufferView() {
|
||||
}
|
||||
|
||||
void BufferView::removeAllElement() {
|
||||
for(int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (NULL!=m_list[iii]) {
|
||||
delete(m_list[iii]);
|
||||
m_list[iii] = NULL;
|
||||
}
|
||||
for(auto &it : m_list) {
|
||||
delete(it);
|
||||
it = NULL;
|
||||
}
|
||||
m_list.clear();
|
||||
}
|
||||
@@ -140,7 +138,7 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
appl::dataBufferStruct* tmp = m_list[iii];
|
||||
m_list[iii] = NULL;
|
||||
m_list.erase(m_list.begin() + iii);
|
||||
insertAlphabetic(tmp, (iii == m_selectedID));
|
||||
insertAlphabetic(tmp, ((int64_t)iii == m_selectedID));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -164,7 +162,7 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
tmpBuffer = m_bufferManager->getBufferSelected();
|
||||
}
|
||||
if (tmpBuffer != NULL) {
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
for (size_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (m_list[iii] == NULL) {
|
||||
continue;
|
||||
}
|
||||
@@ -182,8 +180,8 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
// clean The list
|
||||
removeAllElement();
|
||||
// get all the buffer name and properties:
|
||||
int32_t nbBufferOpen = 0; // BufferManager::size();
|
||||
for (int32_t iii=0; iii<nbBufferOpen; iii++) {
|
||||
size_t nbBufferOpen = 0; // BufferManager::size();
|
||||
for (size_t iii=0; iii<nbBufferOpen; iii++) {
|
||||
/*
|
||||
if (BufferManager::exist(iii)) {
|
||||
BufferText* tmpBuffer = BufferManager::get(iii);
|
||||
@@ -209,9 +207,9 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
markToRedraw();
|
||||
}else if (_msg.getMessage() == ednMsgBufferState) {
|
||||
// update list of modify section ...
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (NULL!=m_list[iii]) {
|
||||
//m_list[iii]->m_isModify = BufferManager::get(m_list[iii]->m_bufferID)->isModify();
|
||||
for (auto &it : m_list) {
|
||||
if (it != nullptr) {
|
||||
//it->m_isModify = BufferManager::get(it->m_bufferID)->isModify();
|
||||
}
|
||||
}
|
||||
markToRedraw();
|
||||
@@ -256,8 +254,8 @@ uint32_t BufferView::getNuberOfRaw() {
|
||||
|
||||
bool BufferView::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
|
||||
if( _raw >= 0
|
||||
&& _raw<m_list.size()
|
||||
&& NULL != m_list[_raw]) {
|
||||
&& _raw<(int64_t)m_list.size()
|
||||
&& m_list[_raw] != nullptr) {
|
||||
_myTextToWrite = m_list[_raw]->m_bufferName.getNameFile();
|
||||
|
||||
if ( m_list[_raw]->m_buffer != NULL
|
||||
@@ -286,7 +284,7 @@ bool BufferView::onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent
|
||||
if (1 == _IdInput && _typeEvent == ewol::key::statusSingle) {
|
||||
APPL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if( _raw >= 0
|
||||
&& _raw<m_list.size()
|
||||
&& _raw<(int64_t)m_list.size()
|
||||
&& NULL != m_list[_raw]) {
|
||||
if (m_list[_raw]->m_buffer != NULL) {
|
||||
sendMultiCast(appl::MsgSelectNewFile, m_list[_raw]->m_buffer->getFileName());
|
||||
|
@@ -34,11 +34,10 @@ appl::TagFileList::TagFileList() {
|
||||
|
||||
|
||||
appl::TagFileList::~TagFileList() {
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
delete(m_list[iii]);
|
||||
m_list[iii] = NULL;
|
||||
for (auto &it : m_list) {
|
||||
delete(it);
|
||||
it = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
etk::Color<> appl::TagFileList::getBasicBG() {
|
||||
@@ -59,7 +58,7 @@ uint32_t appl::TagFileList::getNuberOfRaw() {
|
||||
}
|
||||
|
||||
bool appl::TagFileList::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
|
||||
if (_raw >= 0 && _raw < m_list.size() && NULL != m_list[_raw]) {
|
||||
if (_raw >= 0 && (size_t)_raw < m_list.size() && NULL != m_list[_raw]) {
|
||||
if (0 == _colomn) {
|
||||
_myTextToWrite = std::to_string(m_list[_raw]->fileLine);
|
||||
} else {
|
||||
@@ -86,7 +85,7 @@ bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::key::status _ty
|
||||
EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if (_IdInput == 1) {
|
||||
int32_t previousRaw = m_selectedLine;
|
||||
if (_raw > m_list.size() ) {
|
||||
if (_raw > (int64_t)m_list.size() ) {
|
||||
m_selectedLine = -1;
|
||||
} else {
|
||||
m_selectedLine = _raw;
|
||||
@@ -96,7 +95,7 @@ bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::key::status _ty
|
||||
event = applEventCtagsListSelect;
|
||||
}
|
||||
if( m_selectedLine >= 0
|
||||
&& m_selectedLine < m_list.size()
|
||||
&& m_selectedLine < (int64_t)m_list.size()
|
||||
&& NULL != m_list[m_selectedLine] ) {
|
||||
generateEventId(event, std::to_string(m_list[_raw]->fileLine)+":"+m_list[m_selectedLine]->filename);
|
||||
} else {
|
||||
|
@@ -28,7 +28,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() :
|
||||
return;
|
||||
}
|
||||
// List all current open file :
|
||||
for (size_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
for (int32_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(iii);
|
||||
if (tmpBuffer == NULL) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user