src/driver.cpp
changeset 9436 2eabc2c8ac08
parent 9111 48ce04029fe4
child 9470 08424e2e79e4
equal deleted inserted replaced
9435:83d4582847f3 9436:2eabc2c8ac08
   154 	/* Prefix the name with driver type to make it unique */
   154 	/* Prefix the name with driver type to make it unique */
   155 	char buf[32];
   155 	char buf[32];
   156 	strecpy(buf, GetDriverTypeName(type), lastof(buf));
   156 	strecpy(buf, GetDriverTypeName(type), lastof(buf));
   157 	strecpy(buf + 5, name, lastof(buf));
   157 	strecpy(buf + 5, name, lastof(buf));
   158 
   158 
   159 #if !defined(NDEBUG) || defined(WITH_ASSERT)
   159 	std::pair<Drivers::iterator, bool> P = GetDrivers().insert(Drivers::value_type(buf, this));
   160 	/* NDEBUG disables asserts and gives a warning: unused variable 'P' */
       
   161 	std::pair<Drivers::iterator, bool> P =
       
   162 #endif /* !NDEBUG */
       
   163 	GetDrivers().insert(Drivers::value_type(buf, this));
       
   164 	assert(P.second);
   160 	assert(P.second);
   165 }
   161 }
   166 
   162 
   167 /**
   163 /**
   168  * Build a human readable list of available drivers, grouped by type.
   164  * Build a human readable list of available drivers, grouped by type.