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:
authormano-wii <germano.costa@ig.com.br>2018-10-06 06:13:54 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-06 06:13:54 +0300
commit0f5533441390d049d2b85e86abdd57b5a874e530 (patch)
tree717aa1bb3a31b2189fcdce603c9b9322d42084a3 /source/blender/python/gpu/gpu_py_element.c
parent98e62d459ac3918bde15d9e286c9bbd1ff34b190 (diff)
Cleanup: use new format string utility
Diffstat (limited to 'source/blender/python/gpu/gpu_py_element.c')
-rw-r--r--source/blender/python/gpu/gpu_py_element.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/python/gpu/gpu_py_element.c b/source/blender/python/gpu/gpu_py_element.c
index 657358d0448..0c4cd1d815b 100644
--- a/source/blender/python/gpu/gpu_py_element.c
+++ b/source/blender/python/gpu/gpu_py_element.c
@@ -93,11 +93,8 @@ static PyObject *bpygpu_IndexBuf_new(PyTypeObject *UNUSED(type), PyObject *args,
bool format_error = pybuffer.itemsize != 4;
{
- char *typestr = pybuffer.format;
- if (ELEM(typestr[0], '<', '>', '|')) {
- typestr += 1;
- }
- if (ELEM(typestr[0], 'f', 'd')) {
+ char format = FORMAT_STR_GET(pybuffer.format);
+ if (FORMAT_STR_IS_FLOAT(format)) {
format_error = true;
}
}