Removed dead code for the now-removed Thread:kill

This commit is contained in:
Alex Szpakowski
2013-07-08 17:00:47 -03:00
parent 9da1af1e99
commit 9155b7b0ee
6 changed files with 5 additions and 26 deletions
+5 -7
View File
@@ -37,7 +37,8 @@ Image::FilterMode Image::defaultMipmapFilter = Image::FILTER_NONE;
float Image::defaultMipmapSharpness = 0.0f;
Image::Image(love::image::ImageData *data)
: cdata(0)
: data(data)
, cdata(0)
, width((float)(data->getWidth()))
, height((float)(data->getHeight()))
, texture(0)
@@ -46,12 +47,12 @@ Image::Image(love::image::ImageData *data)
, compressed(false)
{
data->retain();
this->data = data;
preload();
}
Image::Image(love::image::CompressedData *cdata)
: data(0)
, cdata(cdata)
, width((float)(cdata->getWidth(0)))
, height((float)(cdata->getHeight(0)))
, texture(0)
@@ -60,7 +61,6 @@ Image::Image(love::image::CompressedData *cdata)
, compressed(true)
{
cdata->retain();
this->cdata = cdata;
preload();
}
@@ -369,6 +369,7 @@ bool Image::loadVolatilePOT()
filter.anisotropy = gl.setTextureFilter(filter);
gl.setTextureWrap(wrap);
setMipmapSharpness(mipmapSharpness);
float p2width = next_p2(width);
float p2height = next_p2(height);
@@ -431,8 +432,6 @@ bool Image::loadVolatilePOT()
mipmapsCreated = false;
checkMipmapsCreated();
setMipmapSharpness(mipmapSharpness);
return true;
}
@@ -443,6 +442,7 @@ bool Image::loadVolatileNPOT()
filter.anisotropy = gl.setTextureFilter(filter);
gl.setTextureWrap(wrap);
setMipmapSharpness(mipmapSharpness);
// We want this lock to potentially cover mipmap creation as well.
love::thread::EmptyLock lock;
@@ -481,8 +481,6 @@ bool Image::loadVolatileNPOT()
mipmapsCreated = false;
checkMipmapsCreated();
setMipmapSharpness(mipmapSharpness);
return true;
}
-1
View File
@@ -36,7 +36,6 @@ public:
virtual ~Thread() {}
virtual bool start() = 0;
virtual void wait() = 0;
virtual void kill() = 0;
}; // ThreadObject
} // thread
-11
View File
@@ -68,17 +68,6 @@ void Thread::wait()
thread = 0;
}
void Thread::kill()
{
Lock l(mutex);
if (!running)
return;
SDL_KillThread(thread);
SDL_WaitThread(thread, 0);
running = false;
thread = 0;
}
int Thread::thread_runner(void *data)
{
Thread *self = (Thread *) data; // some compilers don't like 'this'
-1
View File
@@ -47,7 +47,6 @@ public:
Thread(Threadable *t);
~Thread();
bool start();
void kill();
void wait();
}; // Thread
} // sdl
-5
View File
@@ -93,10 +93,5 @@ void Threadable::wait()
owner->wait();
}
void Threadable::kill()
{
owner->kill();
}
} // thread
} // love
-1
View File
@@ -82,7 +82,6 @@ public:
bool start();
void wait();
void kill();
protected:
Thread *owner;