mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 18:05:20 +02:00
Remove unnecessary file existence check in GMenu2X::readConfig(string)
A file existence check is already performed, atomically with respect to the filesystem, by ifstream's constructor. The result of this check is available using ifstream::is_open().
This commit is contained in:
parent
a741653a13
commit
457fb0a085
@ -448,7 +448,6 @@ void GMenu2X::readConfig() {
|
||||
}
|
||||
|
||||
void GMenu2X::readConfig(string conffile) {
|
||||
if (fileExists(conffile)) {
|
||||
ifstream inf(conffile.c_str(), ios_base::in);
|
||||
if (inf.is_open()) {
|
||||
string line;
|
||||
@ -464,7 +463,7 @@ void GMenu2X::readConfig(string conffile) {
|
||||
}
|
||||
inf.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (!confStr["lang"].empty())
|
||||
tr.setLang(confStr["lang"]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user