mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 17:00:59 +08:00
refactor: remove excess cast to C-string and add const reference
Signed-off-by: Semenov Herman (Семенов Герман) <GermanAizek@yandex.ru>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e325d48ef2
commit
34ee40393f
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -63,7 +63,7 @@ bool CompilerCache::evictCache(uint64_t &bytesEvicted) {
|
||||
for (int i = 0; i < filesCount; ++i) {
|
||||
ElementsStruct fileElement = {};
|
||||
fileElement.path = joinPath(config.cacheDir, files[i]->d_name);
|
||||
if (NEO::SysCalls::stat(fileElement.path.c_str(), &fileElement.statEl) == 0) {
|
||||
if (NEO::SysCalls::stat(fileElement.path, &fileElement.statEl) == 0) {
|
||||
cacheFiles.push_back(std::move(fileElement));
|
||||
}
|
||||
free(files[i]);
|
||||
@@ -177,7 +177,7 @@ void CompilerCache::lockConfigFileAndReadSize(const std::string &configFilePath,
|
||||
if (fileName.find(config.cacheFileExtension) != fileName.npos) {
|
||||
ElementsStruct fileElement = {};
|
||||
fileElement.path = joinPath(config.cacheDir, files[i]->d_name);
|
||||
if (NEO::SysCalls::stat(fileElement.path.c_str(), &fileElement.statEl) == 0) {
|
||||
if (NEO::SysCalls::stat(fileElement.path, &fileElement.statEl) == 0) {
|
||||
cacheFiles.push_back(std::move(fileElement));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user