Pushing auto casted char buffer to vector of strings. Shall save one
allocation per street name
This commit is contained in:
parent
1ee470f5b4
commit
7872354b49
@ -69,8 +69,7 @@ struct ObjectsForQueryStruct {
|
||||
namesInStream.read((char *)&sizeOfString, sizeof(unsigned));
|
||||
buf[sizeOfString] = '\0'; // instead of memset
|
||||
namesInStream.read(buf, sizeOfString);
|
||||
std::string currentStreetName(buf);
|
||||
names->push_back(currentStreetName);
|
||||
names->push_back(buf);
|
||||
}
|
||||
std::vector<std::string>(*names).swap(*names);
|
||||
hsgrInStream.close();
|
||||
|
Loading…
Reference in New Issue
Block a user