Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d2b9017 authored by Aditya Kumar's avatar Aditya Kumar
Browse files

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 124b2802)
parent 7a45b88f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;