- fix warning
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7903 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 820f8ecf29b7b727f84cf71a5e6801bd501d50d1 Former-commit-id: d8e31dd8d4886400065d2fc9b99f72722ed74fa1
This commit is contained in:
parent
41e6019486
commit
74c03f974b
1 changed files with 6 additions and 5 deletions
|
@ -385,21 +385,22 @@ int NetNetwork::GetDriverIdx()
|
|||
}
|
||||
|
||||
// Get the Driver instance with given index in the race driver list (= the race XML file)
|
||||
void NetNetwork::ReadDriverData(NetDriver &driver,int index,void *params)
|
||||
void NetNetwork::ReadDriverData(NetDriver &driver,int index, void *params)
|
||||
{
|
||||
char path2[256];
|
||||
sprintf(path2, "%s/%d", RM_SECT_DRIVERS, index);
|
||||
const char *pMod = GfParmGetStr(params, path2, RM_ATTR_MODULE,NULL);
|
||||
strncpy(&driver.module[0], pMod, 64);
|
||||
driver.idx = (int)GfParmGetNum(params, path2, RM_ATTR_IDX, NULL,-1);
|
||||
strncpy(&driver.module[0], pMod, 63);
|
||||
driver.module[63] = '\0';
|
||||
driver.idx = (int)GfParmGetNum(params, path2, RM_ATTR_IDX, NULL, -1);
|
||||
}
|
||||
|
||||
void NetNetwork::WriteDriverData(NetDriver driver,int index,void *params)
|
||||
{
|
||||
char path2[256];
|
||||
sprintf(path2, "%s/%d", RM_SECT_DRIVERS, index);
|
||||
GfParmSetStr(params, path2, RM_ATTR_MODULE,driver.module);
|
||||
GfParmSetNum(params, path2, RM_ATTR_IDX, NULL,(tdble)driver.idx);
|
||||
GfParmSetStr(params, path2, RM_ATTR_MODULE, driver.module);
|
||||
GfParmSetNum(params, path2, RM_ATTR_IDX, NULL, (tdble)driver.idx);
|
||||
}
|
||||
|
||||
std::string NetNetwork::GetNetworkDriverName()
|
||||
|
|
Loading…
Reference in a new issue