diff options
author | firefly2442 <firefly2442@gmail.com> | 2018-01-03 21:17:30 -0700 |
---|---|---|
committer | firefly2442 <firefly2442@gmail.com> | 2018-01-03 21:23:48 -0700 |
commit | f066991aa7bdf8c5e06f2255ea1df96e5daeac9f (patch) | |
tree | 424ea3f7d04d415bdaee86e4cfaf8be0bfb89e1d /core/os/dir_access.cpp | |
parent | 914f51031c54a36891418451ffe9a0490d2ab561 (diff) | |
download | redot-engine-f066991aa7bdf8c5e06f2255ea1df96e5daeac9f.tar.gz |
found via cppcheck:
remove code that will never run
make definition and declaration names for parameters match
change floats that were being set to bool values
remove pointer that is never used
Diffstat (limited to 'core/os/dir_access.cpp')
-rw-r--r-- | core/os/dir_access.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index c906fa7333..eadb8e8546 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -293,7 +293,7 @@ String DirAccess::get_full_path(const String &p_path, AccessType p_access) { return full; } -Error DirAccess::copy(String p_from, String p_to, int chmod_flags) { +Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) { //printf("copy %s -> %s\n",p_from.ascii().get_data(),p_to.ascii().get_data()); Error err; @@ -330,9 +330,9 @@ Error DirAccess::copy(String p_from, String p_to, int chmod_flags) { fdst->store_8(fsrc->get_8()); } - if (err == OK && chmod_flags != -1) { + if (err == OK && p_chmod_flags != -1) { fdst->close(); - err = fdst->_chmod(p_to, chmod_flags); + err = fdst->_chmod(p_to, p_chmod_flags); // If running on a platform with no chmod support (i.e., Windows), don't fail if (err == ERR_UNAVAILABLE) err = OK; |