mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use c_str() instead of data()
This commit is contained in:
parent
c093a50f3f
commit
e1cfa8693f
|
@ -31,7 +31,7 @@ public:
|
|||
}
|
||||
|
||||
int32_t error;
|
||||
_zip = zip_open(std::string(path).data(), zipOpenMode, &error);
|
||||
_zip = zip_open(std::string(path).c_str(), zipOpenMode, &error);
|
||||
if (_zip == nullptr)
|
||||
{
|
||||
throw IOException("Unable to open zip file.");
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
std::vector<uint8_t> GetData(std::string_view path) const override
|
||||
{
|
||||
auto absolutePath = Path::Combine(_basePath, std::string(path).data());
|
||||
auto absolutePath = Path::Combine(_basePath, std::string(path).c_str());
|
||||
return File::ReadAllBytes(absolutePath);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -158,7 +158,7 @@ PluginType Plugin::ParsePluginType(std::string_view type)
|
|||
void Plugin::CheckForLicence(const DukValue& dukLicence, std::string_view pluginName)
|
||||
{
|
||||
if (dukLicence.type() != DukValue::Type::STRING || dukLicence.as_string().empty())
|
||||
log_error("Plugin %s does not specify a licence", std::string(pluginName).data());
|
||||
log_error("Plugin %s does not specify a licence", std::string(pluginName).c_str());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,7 @@ class ImageImporterTests : public testing::Test
|
|||
public:
|
||||
static std::string GetImagePath(const std::string& name)
|
||||
{
|
||||
return Path::Combine(TestData::GetBasePath(), "images", name.data());
|
||||
return Path::Combine(TestData::GetBasePath(), "images", name.c_str());
|
||||
}
|
||||
|
||||
static uint32_t GetHash(void* buffer, size_t bufferLength)
|
||||
|
|
Loading…
Reference in New Issue