Fix indentation
This commit is contained in:
@@ -16,7 +16,8 @@ namespace device {
|
|||||||
std::string DeviceManager::readDeviceFile(const std::string& filename)
|
std::string DeviceManager::readDeviceFile(const std::string& filename)
|
||||||
{
|
{
|
||||||
std::ifstream file(filename);
|
std::ifstream file(filename);
|
||||||
if (!file.is_open()) {
|
if (!file.is_open())
|
||||||
|
{
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
std::string(__func__) + ": Couldn't open deviceSpec file: "
|
std::string(__func__) + ": Couldn't open deviceSpec file: "
|
||||||
+ filename);
|
+ filename);
|
||||||
@@ -47,18 +48,19 @@ void DeviceManager::collateAllDeviceSpecs(void)
|
|||||||
void DeviceManager::parseAllDeviceSpecs(void)
|
void DeviceManager::parseAllDeviceSpecs(void)
|
||||||
{
|
{
|
||||||
std::unique_ptr<FILE, decltype(&fclose)> input(
|
std::unique_ptr<FILE, decltype(&fclose)> input(
|
||||||
fmemopen((void*)allDeviceSpecs.c_str(),
|
fmemopen((void*)allDeviceSpecs.c_str(), allDeviceSpecs.size(), "r"),
|
||||||
allDeviceSpecs.size(), "r"),
|
|
||||||
&fclose);
|
&fclose);
|
||||||
|
|
||||||
if (!input) {
|
if (!input)
|
||||||
|
{
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
std::string(__func__) + ": Failed to fmemopen() a FILE* for "
|
std::string(__func__) + ": Failed to fmemopen() a FILE* for "
|
||||||
"parsing device specs");
|
"parsing device specs");
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceSpeclin = input.get();
|
deviceSpeclin = input.get();
|
||||||
if (deviceSpecpparse()) {
|
if (deviceSpecpparse())
|
||||||
|
{
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
std::string(__func__) + ": Failed to parse device specs. "
|
std::string(__func__) + ": Failed to parse device specs. "
|
||||||
"Check specs for errors");
|
"Check specs for errors");
|
||||||
|
|||||||
Reference in New Issue
Block a user