Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-03 15:59:27 +0300
committerJacques Lucke <jacques@blender.org>2020-07-03 15:59:27 +0300
commit2633683b52054d15006aea1314f62f73a8505b42 (patch)
treea97b2916170b53f04fc9a898f4eedb527f14f84e /source/blender/imbuf/intern/openexr
parent93da09d717ff4502975c506c574faf0c07f010b4 (diff)
Clang-tidy: enable readability-container-size-empty warning
Reviewers: sergey Differential Revision: https://developer.blender.org/D8197
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 0555d213b3f..2a5532a0902 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -816,7 +816,7 @@ void IMB_exr_add_channel(void *handle,
if (layname && layname[0] != '\0') {
imb_exr_insert_view_name(echan->name, echan->m->name.c_str(), echan->m->view.c_str());
}
- else if (data->multiView->size() >= 1) {
+ else if (!data->multiView->empty()) {
std::string raw_name = insertViewName(echan->m->name, *data->multiView, echan->view_id);
BLI_strncpy(echan->name, raw_name.c_str(), sizeof(echan->name));
}
@@ -1066,7 +1066,7 @@ float *IMB_exr_channel_rect(void *handle,
imb_exr_insert_view_name(temp_buf, name, viewname);
BLI_strncpy(name, temp_buf, sizeof(name));
}
- else if (data->multiView->size() >= 1) {
+ else if (!data->multiView->empty()) {
const int view_id = std::max(0, imb_exr_get_multiView_id(*data->multiView, viewname));
std::string raw_name = insertViewName(name, *data->multiView, view_id);
BLI_strncpy(name, raw_name.c_str(), sizeof(name));
@@ -1300,7 +1300,7 @@ void IMB_exr_multilayer_convert(void *handle,
ExrPass *pass;
/* RenderResult needs at least one RenderView */
- if (data->multiView->size() == 0) {
+ if (data->multiView->empty()) {
addview(base, "");
}
else {
@@ -1775,7 +1775,7 @@ static bool imb_exr_is_multilayer_file(MultiPartInputFile &file)
* channels without a layer name will be single layer. */
channels.layers(layerNames);
- return (layerNames.size() > 0);
+ return (!layerNames.empty());
}
static void imb_exr_type_by_channels(ChannelList &channels,
@@ -1792,7 +1792,7 @@ static void imb_exr_type_by_channels(ChannelList &channels,
/* will not include empty layer names */
channels.layers(layerNames);
- if (views.size() && views[0] != "") {
+ if (!views.empty() && !views[0].empty()) {
*r_multiview = true;
}
else {
@@ -1802,7 +1802,7 @@ static void imb_exr_type_by_channels(ChannelList &channels,
return;
}
- if (layerNames.size()) {
+ if (!layerNames.empty()) {
/* if layerNames is not empty, it means at least one layer is non-empty,
* but it also could be layers without names in the file and such case
* shall be considered a multilayer exr