dawncpp.h: Don't expose the fluent syntax for non-builders
At this point this change is a noop, however encoders introduced in follow-up patches aren't builders and thus won't have the fluent syntax. BUG=dawn:5 Change-Id: Idc5f327a1a7788c3ba16a50491aefb054700f257 Reviewed-on: https://dawn-review.googlesource.com/1540 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
d3c4eda135
commit
fdccb54de5
|
@ -58,7 +58,7 @@ namespace dawn {
|
|||
|
||||
{% macro render_cpp_method_declaration(type, method) %}
|
||||
{% set CppType = as_cppType(type.name) %}
|
||||
{% if method.return_type.name.concatcase() == "void" -%}
|
||||
{% if method.return_type.name.concatcase() == "void" and type.is_builder -%}
|
||||
{{CppType}} const&
|
||||
{%- else -%}
|
||||
{{as_cppType(method.return_type.name)}}
|
||||
|
@ -99,7 +99,9 @@ namespace dawn {
|
|||
{{render_cpp_method_declaration(type, method)}} {
|
||||
{% if method.return_type.name.concatcase() == "void" %}
|
||||
{{render_cpp_to_c_method_call(type, method)}};
|
||||
return *this;
|
||||
{% if type.is_builder %}
|
||||
return *this;
|
||||
{% endif %}
|
||||
{% else %}
|
||||
auto result = {{render_cpp_to_c_method_call(type, method)}};
|
||||
{% if method.return_type.category == "native" %}
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace dawn {
|
|||
|
||||
{% macro render_cpp_method_declaration(type, method) %}
|
||||
{% set CppType = as_cppType(type.name) %}
|
||||
{% if method.return_type.name.concatcase() == "void" -%}
|
||||
{% if method.return_type.name.concatcase() == "void" and type.is_builder -%}
|
||||
{{CppType}} const&
|
||||
{%- else -%}
|
||||
{{as_cppType(method.return_type.name)}}
|
||||
|
|
Loading…
Reference in New Issue