[waffle] [PATCH 1/4] wcore: do not use get_with_default() when default_value is the same as value
Emil Velikov
emil.l.velikov at gmail.com
Tue Sep 1 05:35:49 PDT 2015
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/waffle/core/wcore_config_attrs.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/waffle/core/wcore_config_attrs.c b/src/waffle/core/wcore_config_attrs.c
index 21c62a2..4a2cb5d 100644
--- a/src/waffle/core/wcore_config_attrs.c
+++ b/src/waffle/core/wcore_config_attrs.c
@@ -163,14 +163,10 @@ static bool
parse_context_version(struct wcore_config_attrs *attrs,
const int32_t attrib_list[])
{
- wcore_attrib_list32_get_with_default(attrib_list,
- WAFFLE_CONTEXT_MAJOR_VERSION,
- &attrs->context_major_version,
- attrs->context_major_version);
- wcore_attrib_list32_get_with_default(attrib_list,
- WAFFLE_CONTEXT_MINOR_VERSION,
- &attrs->context_minor_version,
- attrs->context_minor_version);
+ wcore_attrib_list32_get(attrib_list, WAFFLE_CONTEXT_MAJOR_VERSION,
+ &attrs->context_major_version);
+ wcore_attrib_list32_get(attrib_list, WAFFLE_CONTEXT_MINOR_VERSION,
+ &attrs->context_minor_version);
if (attrs->context_major_version < 1) {
wcore_errorf(WAFFLE_ERROR_BAD_ATTRIBUTE,
@@ -260,10 +256,8 @@ static bool
parse_context_profile(struct wcore_config_attrs *attrs,
const int32_t attrib_list[])
{
- wcore_attrib_list32_get_with_default(attrib_list,
- WAFFLE_CONTEXT_PROFILE,
- &attrs->context_profile,
- attrs->context_profile);
+ wcore_attrib_list32_get(attrib_list, WAFFLE_CONTEXT_PROFILE,
+ &attrs->context_profile);
switch (attrs->context_api) {
case WAFFLE_CONTEXT_OPENGL:
--
2.5.0
More information about the waffle
mailing list