(svn r13462) -Codechange: move DriverFactoryBase destructor definition from header file (saves ~16kB)
authorsmatz
Wed, 11 Jun 2008 12:46:28 +0000
changeset 10911 dc3cb3bb6113
parent 10905 293ba816b703
child 10913 af60a6eda0a0
(svn r13462) -Codechange: move DriverFactoryBase destructor definition from header file (saves ~16kB)
src/driver.cpp
src/driver.h
--- a/src/driver.cpp	Tue Jun 10 21:59:22 2008 +0000
+++ b/src/driver.cpp	Wed Jun 11 12:46:28 2008 +0000
@@ -183,3 +183,18 @@
 
 	return p;
 }
+
+/** Frees memory used for this->name
+ */
+DriverFactoryBase::~DriverFactoryBase() {
+	if (this->name == NULL) return;
+
+	/* Prefix the name with driver type to make it unique */
+	char buf[32];
+	strecpy(buf, GetDriverTypeName(type), lastof(buf));
+	strecpy(buf + 5, this->name, lastof(buf));
+
+	GetDrivers().erase(buf);
+	if (GetDrivers().empty()) delete &GetDrivers();
+	free(this->name);
+}
--- a/src/driver.h	Tue Jun 10 21:59:22 2008 +0000
+++ b/src/driver.h	Wed Jun 11 12:46:28 2008 +0000
@@ -67,20 +67,7 @@
 		name(NULL)
 	{}
 
-	/** Frees memory used for this->name
-	 */
-	virtual ~DriverFactoryBase() {
-		if (this->name == NULL) return;
-
-		/* Prefix the name with driver type to make it unique */
-		char buf[32];
-		strecpy(buf, GetDriverTypeName(type), lastof(buf));
-		strecpy(buf + 5, this->name, lastof(buf));
-
-		GetDrivers().erase(buf);
-		if (GetDrivers().empty()) delete &GetDrivers();
-		free(this->name);
-	}
+	virtual ~DriverFactoryBase();
 
 	/** Shuts down all active drivers
 	 */