Kaynağa Gözat

Initialize variables in File class

Patrick-Christopher Mattulat 1 yıl önce
ebeveyn
işleme
ad7e1f1d1b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  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());