Fix review comments #51

Merged
Bogdan Nagirniak merged 15 commits from BLEN-430 into hydra-render 2023-06-08 18:10:55 +02:00
2 changed files with 3 additions and 6 deletions
Showing only changes of commit b19e1e0646 - Show all commits

View File

@ -110,8 +110,7 @@ pxr::HdPrimvarDescriptorVector CurvesData::primvar_descriptors(
primvars.emplace_back(pxr::HdTokens->points, interpolation, pxr::HdPrimvarRoleTokens->point); primvars.emplace_back(pxr::HdTokens->points, interpolation, pxr::HdPrimvarRoleTokens->point);
} }
if (!widths_.empty()) { if (!widths_.empty()) {
primvars.emplace_back(pxr::HdTokens->widths, interpolation, primvars.emplace_back(pxr::HdTokens->widths, interpolation, pxr::HdPrimvarRoleTokens->none);
pxr::HdPrimvarRoleTokens->none);
} }
} }
else if (interpolation == pxr::HdInterpolationConstant) { else if (interpolation == pxr::HdInterpolationConstant) {

View File

@ -24,10 +24,8 @@ static std::string cache_image_file(Image *image,
char file_path[FILE_MAX]; char file_path[FILE_MAX];
char file_name[32]; char file_name[32];
snprintf(file_name, sizeof(file_name), "img_%016llx.hdr", (uintptr_t)image); snprintf(file_name, sizeof(file_name), "img_%016llx.hdr", (uintptr_t)image);
DagerD marked this conversation as resolved
Review

add same sizeof(...) to other places with snprintf()

add same `sizeof(...)` to other places with `snprintf()`
BLI_path_join(file_path, sizeof(file_path), BLI_path_join(
BKE_tempdir_session(), file_path, sizeof(file_path), BKE_tempdir_session(), "hydra_image_cache", file_name);
"hydra_image_cache",
file_name);
if (check_exist && BLI_exists(file_path)) { if (check_exist && BLI_exists(file_path)) {
return file_path; return file_path;