Imgtool: Removed silly intermediate 'const char *' (nw)

This commit is contained in:
Nathan Woods 2017-07-30 11:04:05 -04:00 committed by Vas Crabb
parent 0f05dff728
commit cc544e98c4

View File

@ -2212,9 +2212,8 @@ imgtool::directory::directory(imgtool::partition &partition)
// enumerating files on a partition // enumerating files on a partition
//------------------------------------------------- //-------------------------------------------------
imgtoolerr_t imgtool::directory::open(imgtool::partition &partition, const std::string &path_string, imgtool::directory::ptr &outenum) imgtoolerr_t imgtool::directory::open(imgtool::partition &partition, const std::string &path, imgtool::directory::ptr &outenum)
{ {
const char *path = path_string.c_str();
imgtoolerr_t err = imgtoolerr_t(IMGTOOLERR_SUCCESS); imgtoolerr_t err = imgtoolerr_t(IMGTOOLERR_SUCCESS);
imgtool::directory::ptr enumeration; imgtool::directory::ptr enumeration;
@ -2224,7 +2223,7 @@ imgtoolerr_t imgtool::directory::open(imgtool::partition &partition, const std::
return imgtoolerr_t(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY); return imgtoolerr_t(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
std::string cannonical_path; std::string cannonical_path;
err = partition.cannonicalize_path(PATH_MUSTBEDIR, path, cannonical_path); err = partition.cannonicalize_path(PATH_MUSTBEDIR, path.c_str(), cannonical_path);
if (err) if (err)
return err; return err;