mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
error: no matching constructor for initialization of 'std::ifstream'
```
hardware/interfaces/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp:51:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>')
51 | std::ifstream configStream(mConfigPath);
| ^ ~~~~~~~~~~~
```
Bug: b/353528991
Change-Id: Idddd5d3e38e2d14bb1becdffbc0649b2f3bb5dae
(cherry picked from commit 124b2802a1)
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <json/json.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
@@ -48,7 +49,8 @@ IvnAndroidDeviceService::IvnAndroidDeviceService(std::string_view configPath) {
|
||||
}
|
||||
|
||||
bool IvnAndroidDeviceService::init() {
|
||||
std::ifstream configStream(mConfigPath);
|
||||
std::string configPathStr(mConfigPath);
|
||||
std::ifstream configStream(configPathStr);
|
||||
if (!configStream) {
|
||||
LOG(ERROR) << "couldn't open " << mConfigPath << " for parsing.";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user