mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 18:23:08 +02:00
Remove unnecessary file existence check in GMenu2X::readTmp()
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
82ac7ef44b
commit
8cd3ab8cb8
@ -537,7 +537,6 @@ void GMenu2X::writeSkinConfig() {
|
|||||||
|
|
||||||
void GMenu2X::readTmp() {
|
void GMenu2X::readTmp() {
|
||||||
lastSelectorElement = -1;
|
lastSelectorElement = -1;
|
||||||
if (fileExists("/tmp/gmenu2x.tmp")) {
|
|
||||||
ifstream inf("/tmp/gmenu2x.tmp", ios_base::in);
|
ifstream inf("/tmp/gmenu2x.tmp", ios_base::in);
|
||||||
if (inf.is_open()) {
|
if (inf.is_open()) {
|
||||||
string line;
|
string line;
|
||||||
@ -558,7 +557,6 @@ void GMenu2X::readTmp() {
|
|||||||
}
|
}
|
||||||
inf.close();
|
inf.close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMenu2X::writeTmp(int selelem, const string &selectordir) {
|
void GMenu2X::writeTmp(int selelem, const string &selectordir) {
|
||||||
|
Loading…
Reference in New Issue
Block a user