mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
neutrino use check empty() instead of length() or size()
This commit is contained in:
@@ -307,7 +307,7 @@ void cYTCache::cancelAll(MI_MOVIE_INFO::miSource source)
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||
cancelled = false;
|
||||
if (pending.size() > 0) {
|
||||
if (!pending.empty()) {
|
||||
if (pthread_create(&thread, NULL, downloadThread, this)) {
|
||||
perror("pthread_create");
|
||||
return;
|
||||
@@ -344,7 +344,7 @@ std::vector<MI_MOVIE_INFO> cYTCache::getPending(MI_MOVIE_INFO::miSource source,
|
||||
for (std::vector<MI_MOVIE_INFO>::iterator it = pending.begin(); it != pending.end(); ++it)
|
||||
if ((*it).source == source)
|
||||
res.push_back(*it);
|
||||
if (res.size() > 0 && pending.front().source == source) {
|
||||
if (!res.empty() && pending.front().source == source) {
|
||||
if (p_dltotal)
|
||||
*p_dltotal = dltotal;
|
||||
if (p_dlnow)
|
||||
|
Reference in New Issue
Block a user