Skip to content

Commit 25ebf8a

Browse files
author
David Chu
committed
refactor: simplify ParseError
1 parent 963c924 commit 25ebf8a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ini/INIReader.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,13 @@ inline int INIReader::ParseError() const {
279279
break;
280280
case -1:
281281
throw std::runtime_error("ini file not found.");
282-
break;
283282
case -2:
284283
throw std::runtime_error("memory alloc error");
285-
break;
286284
default:
287285
throw std::runtime_error("parse error on line no: " +
288286
std::to_string(_error));
289-
break;
290287
}
291-
return _error;
288+
return 0;
292289
}
293290

294291
inline const std::set<std::string> INIReader::Sections() const {

0 commit comments

Comments
 (0)