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 <campbell@blender.org>2022-03-16 03:58:22 +0300
committerCampbell Barton <campbell@blender.org>2022-03-16 03:58:22 +0300
commitbe7855591e3b47e5e72c09555946f75975a8c028 (patch)
treeeb11ff27360e2285cddfe24609bc293b103e9ac0 /source/blender/imbuf/intern/dds
parent379bd6d50ce37e07cbc4fb1e1c47c814f6a7530e (diff)
Cleanup: rename cnt to count
Follow naming from T85728.
Diffstat (limited to 'source/blender/imbuf/intern/dds')
-rw-r--r--source/blender/imbuf/intern/dds/Stream.cpp14
-rw-r--r--source/blender/imbuf/intern/dds/Stream.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp
index bc7239dbd1b..34f3654aa3f 100644
--- a/source/blender/imbuf/intern/dds/Stream.cpp
+++ b/source/blender/imbuf/intern/dds/Stream.cpp
@@ -12,14 +12,14 @@
static const char *msg_error_seek = "DDS: trying to seek beyond end of stream (corrupt file?)";
static const char *msg_error_read = "DDS: trying to read beyond end of stream (corrupt file?)";
-inline bool is_read_within_bounds(const Stream &mem, unsigned int cnt)
+inline bool is_read_within_bounds(const Stream &mem, unsigned int count)
{
if (mem.pos >= mem.size) {
/* No more data remained in the memory buffer. */
return false;
}
- if (cnt > mem.size - mem.pos) {
+ if (count > mem.size - mem.pos) {
/* Reading past the memory bounds. */
return false;
}
@@ -83,15 +83,15 @@ unsigned int mem_read(Stream &mem, unsigned char &i)
return 1;
}
-unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int cnt)
+unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int count)
{
- if (!is_read_within_bounds(mem, cnt)) {
+ if (!is_read_within_bounds(mem, count)) {
mem.set_failed(msg_error_read);
return 0;
}
- memcpy(i, mem.mem + mem.pos, cnt);
- mem.pos += cnt;
- return cnt;
+ memcpy(i, mem.mem + mem.pos, count);
+ mem.pos += count;
+ return count;
}
void Stream::set_failed(const char *msg)
diff --git a/source/blender/imbuf/intern/dds/Stream.h b/source/blender/imbuf/intern/dds/Stream.h
index 3e17b143629..d90440f47cd 100644
--- a/source/blender/imbuf/intern/dds/Stream.h
+++ b/source/blender/imbuf/intern/dds/Stream.h
@@ -24,4 +24,4 @@ unsigned int mem_read(Stream &mem, unsigned long long &i);
unsigned int mem_read(Stream &mem, unsigned int &i);
unsigned int mem_read(Stream &mem, unsigned short &i);
unsigned int mem_read(Stream &mem, unsigned char &i);
-unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int cnt);
+unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int count);