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:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 07:56:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 07:56:03 +0300
commitf38ad4c66bee4fd28dbfe3fa4662fb6f8eb7d1c5 (patch)
tree519307199419c9cfe883ba8551a76196e2b918a8 /source/blender/imbuf
parent2d803d3f6d803ab6098410c56048f1df1ba48ee0 (diff)
Cleanup: replace STREQLEN with STRPREFIX for constant strings
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/jpeg.c4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp2
-rw-r--r--source/blender/imbuf/intern/png.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 525284bd867..38f8806d910 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -246,7 +246,7 @@ static boolean handle_app1(j_decompress_ptr cinfo)
INPUT_BYTE(cinfo, neogeo[i], return false);
}
length = 0;
- if (STREQLEN(neogeo, "NeoGeo", 6)) {
+ if (STRPREFIX(neogeo, "NeoGeo")) {
struct NeoGeo_Word *neogeo_word = (struct NeoGeo_Word *)(neogeo + 6);
ibuf_quality = neogeo_word->quality;
}
@@ -362,7 +362,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla
* That is why we need split it to the
* common key/value here.
*/
- if (!STREQLEN(str, "Blender", 7)) {
+ if (!STRPREFIX(str, "Blender")) {
/*
* Maybe the file have text that
* we don't know "what it's", in that
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 7bb4176f4a6..08577f767e7 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1210,7 +1210,7 @@ void IMB_exr_read_channels(void *handle)
"BlenderMultiChannel");
/* 'previous multilayer attribute, flipped. */
- short flip = (ta && STREQLEN(ta->value().c_str(), "Blender V2.43", 13));
+ short flip = (ta && STRPREFIX(ta->value().c_str(), "Blender V2.43"));
exr_printf(
"\nIMB_exr_read_channels\n%s %-6s %-22s "
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index dbae641f707..c4fbd3f7563 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -521,7 +521,7 @@ static void imb_png_warning(png_structp UNUSED(png_ptr), png_const_charp message
* and with new libpng it became too much picky, giving a warning on
* the splash screen even.
*/
- if ((G.debug & G_DEBUG) == 0 && STREQLEN(message, "iCCP", 4)) {
+ if ((G.debug & G_DEBUG) == 0 && STRPREFIX(message, "iCCP")) {
return;
}
fprintf(stderr, "libpng warning: %s\n", message);