Commit 687db106 authored by Daniel Winzen's avatar Daniel Winzen Committed by Francois Cartegnie

Prefer prefix operators for non-primitive types

Signed-off-by: default avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent eceac9eb
...@@ -98,7 +98,7 @@ void OMXCodecObserver::onMessage(const omx_message &msg) ...@@ -98,7 +98,7 @@ void OMXCodecObserver::onMessage(const omx_message &msg)
node->callbacks.EventHandler(node->handle, node->app_data, msg.u.event_data.event, msg.u.event_data.data1, msg.u.event_data.data2, NULL); node->callbacks.EventHandler(node->handle, node->app_data, msg.u.event_data.event, msg.u.event_data.data1, msg.u.event_data.data2, NULL);
break; break;
case omx_message::EMPTY_BUFFER_DONE: case omx_message::EMPTY_BUFFER_DONE:
for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) { for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); ++it ) {
OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate; OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate;
if (msg.u.buffer_data.buffer == info->id) { if (msg.u.buffer_data.buffer == info->id) {
node->callbacks.EmptyBufferDone(node->handle, node->app_data, *it); node->callbacks.EmptyBufferDone(node->handle, node->app_data, *it);
...@@ -107,7 +107,7 @@ void OMXCodecObserver::onMessage(const omx_message &msg) ...@@ -107,7 +107,7 @@ void OMXCodecObserver::onMessage(const omx_message &msg)
} }
break; break;
case omx_message::FILL_BUFFER_DONE: case omx_message::FILL_BUFFER_DONE:
for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) { for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); ++it ) {
OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate; OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate;
if (msg.u.extended_buffer_data.buffer == info->id) { if (msg.u.extended_buffer_data.buffer == info->id) {
OMX_BUFFERHEADERTYPE *buffer = *it; OMX_BUFFERHEADERTYPE *buffer = *it;
...@@ -217,7 +217,7 @@ static OMX_ERRORTYPE iomx_free_buffer(OMX_HANDLETYPE component, OMX_U32 port, OM ...@@ -217,7 +217,7 @@ static OMX_ERRORTYPE iomx_free_buffer(OMX_HANDLETYPE component, OMX_U32 port, OM
OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate; OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
OMXBuffer* info = (OMXBuffer*) buffer->pPlatformPrivate; OMXBuffer* info = (OMXBuffer*) buffer->pPlatformPrivate;
status_t ret = ctx->iomx->freeBuffer(node->node, port, info->id); status_t ret = ctx->iomx->freeBuffer(node->node, port, info->id);
for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) { for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); ++it ) {
if (buffer == *it) { if (buffer == *it) {
node->buffers.erase(it); node->buffers.erase(it);
break; break;
...@@ -245,12 +245,12 @@ static OMX_ERRORTYPE iomx_fill_this_buffer(OMX_HANDLETYPE component, OMX_BUFFERH ...@@ -245,12 +245,12 @@ static OMX_ERRORTYPE iomx_fill_this_buffer(OMX_HANDLETYPE component, OMX_BUFFERH
static OMX_ERRORTYPE iomx_component_role_enum(OMX_HANDLETYPE component, OMX_U8 *role, OMX_U32 index) static OMX_ERRORTYPE iomx_component_role_enum(OMX_HANDLETYPE component, OMX_U8 *role, OMX_U32 index)
{ {
OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate; OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) { for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); ++it ) {
if (node->component_name == it->mName) { if (node->component_name == it->mName) {
if (index >= it->mRoles.size()) if (index >= it->mRoles.size())
return OMX_ErrorNoMore; return OMX_ErrorNoMore;
List<String8>::iterator it2 = it->mRoles.begin(); List<String8>::iterator it2 = it->mRoles.begin();
for( OMX_U32 i = 0; it2 != it->mRoles.end() && i < index; i++, it2++ ) ; for( OMX_U32 i = 0; it2 != it->mRoles.end() && i < index; i++, ++it2 ) ;
strncpy((char*)role, it2->string(), OMX_MAX_STRINGNAME_SIZE); strncpy((char*)role, it2->string(), OMX_MAX_STRINGNAME_SIZE);
if (it2->length() >= OMX_MAX_STRINGNAME_SIZE) if (it2->length() >= OMX_MAX_STRINGNAME_SIZE)
role[OMX_MAX_STRINGNAME_SIZE - 1] = '\0'; role[OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
...@@ -360,7 +360,7 @@ OMX_ERRORTYPE PREFIX(OMX_ComponentNameEnum)(OMX_STRING component_name, OMX_U32 n ...@@ -360,7 +360,7 @@ OMX_ERRORTYPE PREFIX(OMX_ComponentNameEnum)(OMX_STRING component_name, OMX_U32 n
return OMX_ErrorNoMore; return OMX_ErrorNoMore;
List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); List<IOMX::ComponentInfo>::iterator it = ctx->components.begin();
for( OMX_U32 i = 0; i < index; i++ ) for( OMX_U32 i = 0; i < index; i++ )
it++; ++it;
strncpy(component_name, it->mName.string(), name_length); strncpy(component_name, it->mName.string(), name_length);
component_name[name_length - 1] = '\0'; component_name[name_length - 1] = '\0';
return OMX_ErrorNone; return OMX_ErrorNone;
...@@ -368,7 +368,7 @@ OMX_ERRORTYPE PREFIX(OMX_ComponentNameEnum)(OMX_STRING component_name, OMX_U32 n ...@@ -368,7 +368,7 @@ OMX_ERRORTYPE PREFIX(OMX_ComponentNameEnum)(OMX_STRING component_name, OMX_U32 n
OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32 *num_roles, OMX_U8 **roles) OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32 *num_roles, OMX_U8 **roles)
{ {
for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) { for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); ++it ) {
if (!strcmp(component_name, it->mName.string())) { if (!strcmp(component_name, it->mName.string())) {
if (!roles) { if (!roles) {
*num_roles = it->mRoles.size(); *num_roles = it->mRoles.size();
...@@ -378,7 +378,7 @@ OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32 ...@@ -378,7 +378,7 @@ OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32
return OMX_ErrorInsufficientResources; return OMX_ErrorInsufficientResources;
*num_roles = it->mRoles.size(); *num_roles = it->mRoles.size();
OMX_U32 i = 0; OMX_U32 i = 0;
for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); i++, it2++ ) { for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); i++, ++it2 ) {
strncpy((char*)roles[i], it2->string(), OMX_MAX_STRINGNAME_SIZE); strncpy((char*)roles[i], it2->string(), OMX_MAX_STRINGNAME_SIZE);
roles[i][OMX_MAX_STRINGNAME_SIZE - 1] = '\0'; roles[i][OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
} }
...@@ -391,8 +391,8 @@ OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32 ...@@ -391,8 +391,8 @@ OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32
OMX_ERRORTYPE PREFIX(OMX_GetComponentsOfRole)(OMX_STRING role, OMX_U32 *num_comps, OMX_U8 **comp_names) OMX_ERRORTYPE PREFIX(OMX_GetComponentsOfRole)(OMX_STRING role, OMX_U32 *num_comps, OMX_U8 **comp_names)
{ {
OMX_U32 i = 0; OMX_U32 i = 0;
for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) { for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); ++it ) {
for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); it2++ ) { for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); ++it2 ) {
if (!strcmp(it2->string(), role)) { if (!strcmp(it2->string(), role)) {
if (comp_names) { if (comp_names) {
if (*num_comps < i) if (*num_comps < i)
......
...@@ -53,14 +53,14 @@ void HTTPConnectionManager::closeAllConnections () ...@@ -53,14 +53,14 @@ void HTTPConnectionManager::closeAllConnections ()
void HTTPConnectionManager::releaseAllConnections() void HTTPConnectionManager::releaseAllConnections()
{ {
std::vector<PersistentConnection *>::iterator it; std::vector<PersistentConnection *>::iterator it;
for(it = connectionPool.begin(); it != connectionPool.end(); it++) for(it = connectionPool.begin(); it != connectionPool.end(); ++it)
(*it)->releaseChunk(); (*it)->releaseChunk();
} }
PersistentConnection * HTTPConnectionManager::getConnectionForHost(const std::string &hostname) PersistentConnection * HTTPConnectionManager::getConnectionForHost(const std::string &hostname)
{ {
std::vector<PersistentConnection *>::const_iterator it; std::vector<PersistentConnection *>::const_iterator it;
for(it = connectionPool.begin(); it != connectionPool.end(); it++) for(it = connectionPool.begin(); it != connectionPool.end(); ++it)
{ {
if(!(*it)->getHostname().compare(hostname) && (*it)->isAvailable()) if(!(*it)->getHostname().compare(hostname) && (*it)->isAvailable())
return *it; return *it;
......
...@@ -42,7 +42,7 @@ BaseRepresentation * RepresentationSelector::select(BasePeriod *period, Streams: ...@@ -42,7 +42,7 @@ BaseRepresentation * RepresentationSelector::select(BasePeriod *period, Streams:
BaseRepresentation *best = NULL; BaseRepresentation *best = NULL;
std::vector<BaseAdaptationSet *>::const_iterator adaptIt; std::vector<BaseAdaptationSet *>::const_iterator adaptIt;
for(adaptIt=adaptSets.begin(); adaptIt!=adaptSets.end(); adaptIt++) for(adaptIt=adaptSets.begin(); adaptIt!=adaptSets.end(); ++adaptIt)
{ {
std::vector<BaseRepresentation *> reps = (*adaptIt)->getRepresentations(); std::vector<BaseRepresentation *> reps = (*adaptIt)->getRepresentations();
BaseRepresentation *candidate = select(reps, (best)?best->getBandwidth():0, bitrate); BaseRepresentation *candidate = select(reps, (best)?best->getBandwidth():0, bitrate);
...@@ -67,11 +67,11 @@ BaseRepresentation * RepresentationSelector::select(BasePeriod *period, Streams: ...@@ -67,11 +67,11 @@ BaseRepresentation * RepresentationSelector::select(BasePeriod *period, Streams:
/* subset matching WxH */ /* subset matching WxH */
std::vector<BaseAdaptationSet *> adaptSets = period->getAdaptationSets(type); std::vector<BaseAdaptationSet *> adaptSets = period->getAdaptationSets(type);
std::vector<BaseAdaptationSet *>::const_iterator adaptIt; std::vector<BaseAdaptationSet *>::const_iterator adaptIt;
for(adaptIt=adaptSets.begin(); adaptIt!=adaptSets.end(); adaptIt++) for(adaptIt=adaptSets.begin(); adaptIt!=adaptSets.end(); ++adaptIt)
{ {
std::vector<BaseRepresentation *> reps = (*adaptIt)->getRepresentations(); std::vector<BaseRepresentation *> reps = (*adaptIt)->getRepresentations();
std::vector<BaseRepresentation *>::const_iterator repIt; std::vector<BaseRepresentation *>::const_iterator repIt;
for(repIt=reps.begin(); repIt!=reps.end(); repIt++) for(repIt=reps.begin(); repIt!=reps.end(); ++repIt)
{ {
if((*repIt)->getWidth() == width && (*repIt)->getHeight() == height) if((*repIt)->getWidth() == width && (*repIt)->getHeight() == height)
resMatchReps.push_back(*repIt); resMatchReps.push_back(*repIt);
...@@ -89,7 +89,7 @@ BaseRepresentation * RepresentationSelector::select(std::vector<BaseRepresentati ...@@ -89,7 +89,7 @@ BaseRepresentation * RepresentationSelector::select(std::vector<BaseRepresentati
{ {
BaseRepresentation *candidate = NULL, *lowest = NULL; BaseRepresentation *candidate = NULL, *lowest = NULL;
std::vector<BaseRepresentation *>::const_iterator repIt; std::vector<BaseRepresentation *>::const_iterator repIt;
for(repIt=reps.begin(); repIt!=reps.end(); repIt++) for(repIt=reps.begin(); repIt!=reps.end(); ++repIt)
{ {
if ( !lowest || (*repIt)->getBandwidth() < lowest->getBandwidth()) if ( !lowest || (*repIt)->getBandwidth() < lowest->getBandwidth())
lowest = *repIt; lowest = *repIt;
......
...@@ -86,7 +86,7 @@ std::vector<std::string> BaseAdaptationSet::toString(int indent) const ...@@ -86,7 +86,7 @@ std::vector<std::string> BaseAdaptationSet::toString(int indent) const
text.append("BaseAdaptationSet"); text.append("BaseAdaptationSet");
ret.push_back(text); ret.push_back(text);
std::vector<BaseRepresentation *>::const_iterator k; std::vector<BaseRepresentation *>::const_iterator k;
for(k = representations.begin(); k != representations.end(); k++) for(k = representations.begin(); k != representations.end(); ++k)
{ {
std::vector<std::string> debug = (*k)->toString(indent + 1); std::vector<std::string> debug = (*k)->toString(indent + 1);
ret.insert(ret.end(), debug.begin(), debug.end()); ret.insert(ret.end(), debug.begin(), debug.end());
......
...@@ -59,7 +59,7 @@ const std::vector<BaseAdaptationSet*> BasePeriod::getAdaptationSets(Streams::T ...@@ -59,7 +59,7 @@ const std::vector<BaseAdaptationSet*> BasePeriod::getAdaptationSets(Streams::T
{ {
std::vector<BaseAdaptationSet*> list; std::vector<BaseAdaptationSet*> list;
std::vector<BaseAdaptationSet*>::const_iterator it; std::vector<BaseAdaptationSet*>::const_iterator it;
for(it = adaptationSets.begin(); it!= adaptationSets.end(); it++) for(it = adaptationSets.begin(); it!= adaptationSets.end(); ++it)
{ {
if( Streams::Stream::mimeToType((*it)->getMimeType()) == type ) if( Streams::Stream::mimeToType((*it)->getMimeType()) == type )
list.push_back(*it); list.push_back(*it);
...@@ -79,7 +79,7 @@ void BasePeriod::addAdaptationSet(BaseAdaptationSet *adaptationSet) ...@@ -79,7 +79,7 @@ void BasePeriod::addAdaptationSet(BaseAdaptationSet *adaptationSet)
BaseAdaptationSet * BasePeriod::getAdaptationSet(Streams::Type type) const BaseAdaptationSet * BasePeriod::getAdaptationSet(Streams::Type type) const
{ {
std::vector<BaseAdaptationSet *>::const_iterator it; std::vector<BaseAdaptationSet *>::const_iterator it;
for(it = adaptationSets.begin(); it != adaptationSets.end(); it++) for(it = adaptationSets.begin(); it != adaptationSets.end(); ++it)
{ {
if ( Streams::Stream::mimeToType((*it)->getMimeType()) == type ) if ( Streams::Stream::mimeToType((*it)->getMimeType()) == type )
return *it; return *it;
...@@ -94,7 +94,7 @@ std::vector<std::string> BasePeriod::toString(int indent) const ...@@ -94,7 +94,7 @@ std::vector<std::string> BasePeriod::toString(int indent) const
text.append("Period"); text.append("Period");
ret.push_back(text); ret.push_back(text);
std::vector<BaseAdaptationSet *>::const_iterator k; std::vector<BaseAdaptationSet *>::const_iterator k;
for(k = adaptationSets.begin(); k != adaptationSets.end(); k++) for(k = adaptationSets.begin(); k != adaptationSets.end(); ++k)
{ {
std::vector<std::string> debug = (*k)->toString(indent + 1); std::vector<std::string> debug = (*k)->toString(indent + 1);
ret.insert(ret.end(), debug.begin(), debug.end()); ret.insert(ret.end(), debug.begin(), debug.end());
......
...@@ -141,7 +141,7 @@ void Segment::addSubSegment(SubSegment *subsegment) ...@@ -141,7 +141,7 @@ void Segment::addSubSegment(SubSegment *subsegment)
Segment::~Segment() Segment::~Segment()
{ {
std::vector<SubSegment*>::iterator it; std::vector<SubSegment*>::iterator it;
for(it=subsegments.begin();it!=subsegments.end();it++) for(it=subsegments.begin();it!=subsegments.end();++it)
delete *it; delete *it;
} }
...@@ -161,7 +161,7 @@ std::string Segment::toString(int indent) const ...@@ -161,7 +161,7 @@ std::string Segment::toString(int indent) const
{ {
std::string ret; std::string ret;
std::vector<SubSegment *>::const_iterator l; std::vector<SubSegment *>::const_iterator l;
for(l = subsegments.begin(); l != subsegments.end(); l++) for(l = subsegments.begin(); l != subsegments.end(); ++l)
{ {
ret.append( (*l)->toString(indent + 1) ); ret.append( (*l)->toString(indent + 1) );
} }
...@@ -191,7 +191,7 @@ std::vector<ISegment*> Segment::subSegments() ...@@ -191,7 +191,7 @@ std::vector<ISegment*> Segment::subSegments()
if(!subsegments.empty()) if(!subsegments.empty())
{ {
std::vector<SubSegment*>::iterator it; std::vector<SubSegment*>::iterator it;
for(it=subsegments.begin();it!=subsegments.end();it++) for(it=subsegments.begin();it!=subsegments.end();++it)
list.push_back(*it); list.push_back(*it);
} }
else else
......
...@@ -94,7 +94,7 @@ vector<ISegment *> SegmentInformation::getSegments(SegmentInfoType type) const ...@@ -94,7 +94,7 @@ vector<ISegment *> SegmentInformation::getSegments(SegmentInfoType type) const
{ {
std::vector<Segment *>::const_iterator it; std::vector<Segment *>::const_iterator it;
for(it=segmentList->getSegments().begin(); for(it=segmentList->getSegments().begin();
it!=segmentList->getSegments().end(); it++) it!=segmentList->getSegments().end(); ++it)
{ {
std::vector<ISegment *> list = (*it)->subSegments(); std::vector<ISegment *> list = (*it)->subSegments();
retSegments.insert( retSegments.end(), list.begin(), list.end() ); retSegments.insert( retSegments.end(), list.begin(), list.end() );
...@@ -227,7 +227,7 @@ void SegmentInformation::collectTimelines(std::vector<SegmentTimeline *> *timeli ...@@ -227,7 +227,7 @@ void SegmentInformation::collectTimelines(std::vector<SegmentTimeline *> *timeli
timelines->push_back(mediaSegmentTemplate->segmentTimeline.Get()); timelines->push_back(mediaSegmentTemplate->segmentTimeline.Get());
std::vector<SegmentInformation *>::const_iterator it; std::vector<SegmentInformation *>::const_iterator it;
for(it = childs.begin(); it != childs.end(); it++) for(it = childs.begin(); it != childs.end(); ++it)
(*it)->collectTimelines(timelines); (*it)->collectTimelines(timelines);
} }
...@@ -266,7 +266,7 @@ static void insertIntoSegment(std::vector<Segment *> &seglist, size_t start, ...@@ -266,7 +266,7 @@ static void insertIntoSegment(std::vector<Segment *> &seglist, size_t start,
size_t end, mtime_t time) size_t end, mtime_t time)
{ {
std::vector<Segment *>::iterator segIt; std::vector<Segment *>::iterator segIt;
for(segIt = seglist.begin(); segIt < seglist.end(); segIt++) for(segIt = seglist.begin(); segIt < seglist.end(); ++segIt)
{ {
Segment *segment = *segIt; Segment *segment = *segIt;
if(segment->getClassId() == Segment::CLASSID_SEGMENT && if(segment->getClassId() == Segment::CLASSID_SEGMENT &&
...@@ -289,7 +289,7 @@ void SegmentInformation::SplitUsingIndex(std::vector<SplitPoint> &splitlist) ...@@ -289,7 +289,7 @@ void SegmentInformation::SplitUsingIndex(std::vector<SplitPoint> &splitlist)
size_t start = 0, end = 0; size_t start = 0, end = 0;
mtime_t time = 0; mtime_t time = 0;
for(splitIt = splitlist.begin(); splitIt < splitlist.end(); splitIt++) for(splitIt = splitlist.begin(); splitIt < splitlist.end(); ++splitIt)
{ {
start = end; start = end;
SplitPoint split = *splitIt; SplitPoint split = *splitIt;
......
...@@ -35,7 +35,7 @@ SegmentList::SegmentList( SegmentInformation *parent ): ...@@ -35,7 +35,7 @@ SegmentList::SegmentList( SegmentInformation *parent ):
SegmentList::~SegmentList() SegmentList::~SegmentList()
{ {
std::vector<Segment *>::iterator it; std::vector<Segment *>::iterator it;
for(it = segments.begin(); it != segments.end(); it++) for(it = segments.begin(); it != segments.end(); ++it)
delete(*it); delete(*it);
} }
......
...@@ -37,7 +37,7 @@ SegmentTimeline::SegmentTimeline(TimescaleAble *parent) ...@@ -37,7 +37,7 @@ SegmentTimeline::SegmentTimeline(TimescaleAble *parent)
SegmentTimeline::~SegmentTimeline() SegmentTimeline::~SegmentTimeline()
{ {
std::list<Element *>::iterator it; std::list<Element *>::iterator it;
for(it = elements.begin(); it != elements.end(); it++) for(it = elements.begin(); it != elements.end(); ++it)
delete *it; delete *it;
} }
...@@ -59,7 +59,7 @@ uint64_t SegmentTimeline::getElementNumberByScaledPlaybackTime(time_t scaled) co ...@@ -59,7 +59,7 @@ uint64_t SegmentTimeline::getElementNumberByScaledPlaybackTime(time_t scaled) co
{ {
uint64_t count = 0; uint64_t count = 0;
std::list<Element *>::const_iterator it; std::list<Element *>::const_iterator it;
for(it = elements.begin(); it != elements.end(); it++) for(it = elements.begin(); it != elements.end(); ++it)
{ {
const Element *el = *it; const Element *el = *it;
for(uint64_t repeat = 1 + el->r; repeat; repeat--) for(uint64_t repeat = 1 + el->r; repeat; repeat--)
...@@ -85,7 +85,7 @@ mtime_t SegmentTimeline::getScaledPlaybackTimeByElementNumber(uint64_t number) c ...@@ -85,7 +85,7 @@ mtime_t SegmentTimeline::getScaledPlaybackTimeByElementNumber(uint64_t number) c
number -= pruned; number -= pruned;
std::list<Element *>::const_iterator it; std::list<Element *>::const_iterator it;
for(it = elements.begin(); it != elements.end(); it++) for(it = elements.begin(); it != elements.end(); ++it)
{ {
const Element *el = *it; const Element *el = *it;
...@@ -113,7 +113,7 @@ size_t SegmentTimeline::maxElementNumber() const ...@@ -113,7 +113,7 @@ size_t SegmentTimeline::maxElementNumber() const
size_t count = 0; size_t count = 0;
std::list<Element *>::const_iterator it; std::list<Element *>::const_iterator it;
for(it = elements.begin(); it != elements.end(); it++) for(it = elements.begin(); it != elements.end(); ++it)
count += (*it)->r + 1; count += (*it)->r + 1;
return pruned + count - 1; return pruned + count - 1;
......
...@@ -83,7 +83,7 @@ std::string Url::toString(size_t index, const BaseRepresentation *rep) const ...@@ -83,7 +83,7 @@ std::string Url::toString(size_t index, const BaseRepresentation *rep) const
{ {
std::string ret; std::string ret;
std::vector<Component>::const_iterator it; std::vector<Component>::const_iterator it;
for(it = components.begin(); it != components.end(); it++) for(it = components.begin(); it != components.end(); ++it)
{ {
const Component *comp = & (*it); const Component *comp = & (*it);
if(rep) if(rep)
......
...@@ -125,7 +125,7 @@ void IsoffMainParser::parsePeriods(Node *root) ...@@ -125,7 +125,7 @@ void IsoffMainParser::parsePeriods(Node *root)
std::vector<Node *> periods = DOMHelper::getElementByTagName(root, "Period", false); std::vector<Node *> periods = DOMHelper::getElementByTagName(root, "Period", false);
std::vector<Node *>::const_iterator it; std::vector<Node *>::const_iterator it;
for(it = periods.begin(); it != periods.end(); it++) for(it = periods.begin(); it != periods.end(); ++it)
{ {
Period *period = new (std::nothrow) Period(mpd); Period *period = new (std::nothrow) Period(mpd);
if (!period) if (!period)
...@@ -204,7 +204,7 @@ void IsoffMainParser::setAdaptationSets (Node *periodNode, Period *period) ...@@ -204,7 +204,7 @@ void IsoffMainParser::setAdaptationSets (Node *periodNode, Period *period)
std::vector<Node *> adaptationSets = DOMHelper::getElementByTagName(periodNode, "AdaptationSet", false); std::vector<Node *> adaptationSets = DOMHelper::getElementByTagName(periodNode, "AdaptationSet", false);
std::vector<Node *>::const_iterator it; std::vector<Node *>::const_iterator it;
for(it = adaptationSets.begin(); it != adaptationSets.end(); it++) for(it = adaptationSets.begin(); it != adaptationSets.end(); ++it)
{ {
AdaptationSet *adaptationSet = new AdaptationSet(period); AdaptationSet *adaptationSet = new AdaptationSet(period);
if(!adaptationSet) if(!adaptationSet)
...@@ -323,7 +323,7 @@ size_t IsoffMainParser::parseSegmentList(Node * segListNode, SegmentInformation ...@@ -323,7 +323,7 @@ size_t IsoffMainParser::parseSegmentList(Node * segListNode, SegmentInformation
list->timescale.Set(Integer<uint64_t>(segListNode->getAttributeValue("timescale"))); list->timescale.Set(Integer<uint64_t>(segListNode->getAttributeValue("timescale")));
std::vector<Node *>::const_iterator it; std::vector<Node *>::const_iterator it;
for(it = segments.begin(); it != segments.end(); it++) for(it = segments.begin(); it != segments.end(); ++it)
{ {
Node *segmentURL = *it; Node *segmentURL = *it;
std::string mediaUrl = segmentURL->getAttributeValue("media"); std::string mediaUrl = segmentURL->getAttributeValue("media");
...@@ -387,7 +387,7 @@ void IsoffMainParser::parseTimeline(Node *node, MediaSegmentTemplate *templ) ...@@ -387,7 +387,7 @@ void IsoffMainParser::parseTimeline(Node *node, MediaSegmentTemplate *templ)
{ {
std::vector<Node *> elements = DOMHelper::getElementByTagName(node, "S", false); std::vector<Node *> elements = DOMHelper::getElementByTagName(node, "S", false);
std::vector<Node *>::const_iterator it; std::vector<Node *>::const_iterator it;
for(it = elements.begin(); it != elements.end(); it++) for(it = elements.begin(); it != elements.end(); ++it)
{ {
const Node *s = *it; const Node *s = *it;
if(!s->hasAttribute("d")) /* Mandatory */ if(!s->hasAttribute("d")) /* Mandatory */
......
...@@ -71,11 +71,11 @@ void MPD::debug() ...@@ -71,11 +71,11 @@ void MPD::debug()
msg_Dbg(stream, "BaseUrl=%s", getUrlSegment().toString().c_str()); msg_Dbg(stream, "BaseUrl=%s", getUrlSegment().toString().c_str());
std::vector<BasePeriod *>::const_iterator i; std::vector<BasePeriod *>::const_iterator i;
for(i = getPeriods().begin(); i != getPeriods().end(); i++) for(i = getPeriods().begin(); i != getPeriods().end(); ++i)
{ {
std::vector<std::string> debug = (*i)->toString(); std::vector<std::string> debug = (*i)->toString();
std::vector<std::string>::const_iterator l; std::vector<std::string>::const_iterator l;
for(l = debug.begin(); l < debug.end(); l++) for(l = debug.begin(); l < debug.end(); ++l)
{ {
msg_Dbg(stream, "%s", (*l).c_str()); msg_Dbg(stream, "%s", (*l).c_str());
} }
......
...@@ -126,7 +126,7 @@ std::vector<std::string> Node::toString(int indent) const ...@@ -126,7 +126,7 @@ std::vector<std::string> Node::toString(int indent) const
text.append(getName()); text.append(getName());
ret.push_back(text); ret.push_back(text);
std::vector<Node *>::const_iterator l; std::vector<Node *>::const_iterator l;
for(l = subNodes.begin(); l < subNodes.end(); l++) for(l = subNodes.begin(); l < subNodes.end(); ++l)
{ {
std::vector<std::string> sub = (*l)->toString(indent + 1); std::vector<std::string> sub = (*l)->toString(indent + 1);
ret.insert(ret.end(), sub.begin(), sub.end()); ret.insert(ret.end(), sub.begin(), sub.end());
......
...@@ -375,7 +375,7 @@ void EasterEggBackgroundWidget::spawnFlakes() ...@@ -375,7 +375,7 @@ void EasterEggBackgroundWidget::spawnFlakes()
it = flakes->erase( it ); it = flakes->erase( it );
} }
else else
it++; ++it;
} }
if ( flakes->size() < MAX_FLAKES ) if ( flakes->size() < MAX_FLAKES )
......
...@@ -1262,7 +1262,7 @@ void KeySelectorControl::finish() ...@@ -1262,7 +1262,7 @@ void KeySelectorControl::finish()
if( list.count() >= 2 ) if( list.count() >= 2 )
msg_Dbg( p_this, "This is probably wrong, %s", qtu(i.key()) ); msg_Dbg( p_this, "This is probably wrong, %s", qtu(i.key()) );
i++; ++i;
} }
module_config_free (p_config); module_config_free (p_config);
......
...@@ -56,12 +56,12 @@ void VarList::delSelected() ...@@ -56,12 +56,12 @@ void VarList::delSelected()
if( (*it).m_selected ) if( (*it).m_selected )
{ {
Iterator oldIt = it; Iterator oldIt = it;
it++; ++it;
m_list.erase( oldIt ); m_list.erase( oldIt );
} }
else else
{ {
it++; ++it;
} }
} }
notify(); notify();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment