Commits

Alex Szpakowski committed 4e34e57

Removed dead code for the now-removed Thread:kill

Comments (0)

Files changed (6)

src/modules/graphics/opengl/Image.cpp

 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)
 	, 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)
 	, compressed(true)
 {
 	cdata->retain();
-	this->cdata = cdata;
 	preload();
 }
 
 
 	filter.anisotropy = gl.setTextureFilter(filter);
 	gl.setTextureWrap(wrap);
+	setMipmapSharpness(mipmapSharpness);
 
 	float p2width = next_p2(width);
 	float p2height = next_p2(height);
 	mipmapsCreated = false;
 	checkMipmapsCreated();
 
-	setMipmapSharpness(mipmapSharpness);
-
 	return true;
 }
 
 
 	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;
 	mipmapsCreated = false;
 	checkMipmapsCreated();
 
-	setMipmapSharpness(mipmapSharpness);
-
 	return true;
 }
 

src/modules/thread/Thread.h

 	virtual ~Thread() {}
 	virtual bool start() = 0;
 	virtual void wait() = 0;
-	virtual void kill() = 0;
 }; // ThreadObject
 
 } // thread

src/modules/thread/sdl/Thread.cpp

 	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'

src/modules/thread/sdl/Thread.h

 	Thread(Threadable *t);
 	~Thread();
 	bool start();
-	void kill();
 	void wait();
 }; // Thread
 } // sdl

src/modules/thread/threads.cpp

 	owner->wait();
 }
 
-void Threadable::kill()
-{
-	owner->kill();
-}
-
 } // thread
 } // love

src/modules/thread/threads.h

 
 	bool start();
 	void wait();
-	void kill();
 
 protected:
 	Thread *owner;