mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Fix compilation error on CentOS 7 (gcc 4.8)
libstdc++ that comes with gcc 4.8 doesn't define `getline(basic_istream<char>&&, std::string&)` even if it's part of the c++11 standard. However we can still use the following: `getline(basic_istream<char>&, std::string&)`.
This commit is contained in:
parent
fc3e393516
commit
a89868928b
@ -153,7 +153,8 @@ std::vector<UvcDeviceInfo> V4L2Context::queryUvcDeviceInfoList()
|
||||
}
|
||||
std::istringstream(modalias.substr(5, 4)) >> std::hex >> uvcDev.vid;
|
||||
std::istringstream(modalias.substr(10, 4)) >> std::hex >> uvcDev.pid;
|
||||
std::getline(std::ifstream(video + "/device/interface"), uvcDev.name);
|
||||
std::ifstream iface(video + "/device/interface");
|
||||
std::getline(iface, uvcDev.name);
|
||||
std::ifstream(video + "/device/bInterfaceNumber") >> uvcDev.mi;
|
||||
uvcDevMap.insert({ interfaceRealPath, uvcDev });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user