From 33e035cc95e08d46fd67674a3cefd0846606feea Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 23 Jun 2021 22:19:08 +0200 Subject: [PATCH] Fix two excessive type casting instances No need to to a string -> char* -> string dance. --- components/esm/weatherstate.cpp | 2 +- components/resource/imagemanager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esm/weatherstate.cpp b/components/esm/weatherstate.cpp index 3d94a445be..cd1a82b0b7 100644 --- a/components/esm/weatherstate.cpp +++ b/components/esm/weatherstate.cpp @@ -49,7 +49,7 @@ namespace ESM void WeatherState::save(ESMWriter& esm) const { - esm.writeHNCString(currentRegionRecord, mCurrentRegion.c_str()); + esm.writeHNCString(currentRegionRecord, mCurrentRegion); esm.writeHNT(timePassedRecord, mTimePassed); esm.writeHNT(fastForwardRecord, mFastForward); esm.writeHNT(weatherUpdateTimeRecord, mWeatherUpdateTime); diff --git a/components/resource/imagemanager.cpp b/components/resource/imagemanager.cpp index dd34ed1a1f..37e76359ff 100644 --- a/components/resource/imagemanager.cpp +++ b/components/resource/imagemanager.cpp @@ -94,7 +94,7 @@ namespace Resource Files::IStreamPtr stream; try { - stream = mVFS->get(normalized.c_str()); + stream = mVFS->get(normalized); } catch (std::exception& e) {