Sfoglia il codice sorgente

Initialize variables in File class

Patrick-Christopher Mattulat 1 anno fa
parent
commit
ad7e1f1d1b
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      source/ls-std/io/File.cpp

+ 2 - 2
source/ls-std/io/File.cpp

@@ -71,7 +71,7 @@ bool File::canExecute()
 
 bool File::canRead()
 {
-  bool readable;
+  bool readable{};
 
 #if defined(unix) || defined(__APPLE__)
   readable = File::_isReadableUnix(this->absoluteFilePath);
@@ -591,7 +591,7 @@ time_t File::_lastModified(const string &_path)
 
 bool File::_makeDirectory(const string &_path)
 {
-  int result;
+  int result{};
 
 #ifdef _WIN32
   result = _mkdir(_path.c_str());