Remove F suffix for futures from the cpp api
Bug: dawn:1987
Change-Id: I579bd38f99c648ac1748004d58b40abd619e298a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/172943
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/generator/templates/api_cpp.cpp b/generator/templates/api_cpp.cpp
index 9ad11b9..d534984 100644
--- a/generator/templates/api_cpp.cpp
+++ b/generator/templates/api_cpp.cpp
@@ -177,20 +177,6 @@
{% macro render_cpp_method_declaration(type, method) -%}
{% set CppType = as_cppType(type.name) %}
- {{as_cppType(method.return_type.name)}} {{CppType}}::{{method.name.CamelCase()}}(
- {%- for arg in method.arguments -%}
- {%- if not loop.first %}, {% endif -%}
- {%- if arg.type.category == "object" and arg.annotation == "value" -%}
- {{as_cppType(arg.type.name)}} const& {{as_varName(arg.name)}}
- {%- else -%}
- {{as_annotated_cppType(arg)}}
- {%- endif -%}
- {%- endfor -%}
- ) const
- {%- endmacro -%}
-
- {% macro render_cpp_method_future_overrides_definition(type, method) -%}
- {% set CppType = as_cppType(type.name) %}
{% set OriginalMethodName = method.name.CamelCase() %}
{% set MethodName = OriginalMethodName[:-1] if method.name.chunks[-1] == "f" else OriginalMethodName %}
{{as_cppType(method.return_type.name)}} {{CppType}}::{{MethodName}}(
@@ -202,13 +188,7 @@
{{as_annotated_cppType(arg)}}
{%- endif -%}
{%- endfor -%}
- ) const {
- return {{OriginalMethodName}}(
- {%- for arg in method.arguments -%}
- {% if not loop.first %}, {% endif %}{{as_varName(arg.name)}}
- {%- endfor -%}
- );
- }
+ ) const
{%- endmacro -%}
{%- macro render_cpp_to_c_method_call(type, method) -%}
@@ -230,9 +210,6 @@
return {{convert_cType_to_cppType(method.return_type, 'value', 'result') | indent(8)}};
{% endif %}
}
- {% if method.return_type.dict_name == "future" -%}
- {{render_cpp_method_future_overrides_definition(type, method)}}
- {% endif %}
{% endfor %}
void {{CppType}}::{{c_prefix}}Reference({{CType}} handle) {
if (handle != nullptr) {
diff --git a/generator/templates/api_cpp.h b/generator/templates/api_cpp.h
index a107d08..d129f54 100644
--- a/generator/templates/api_cpp.h
+++ b/generator/templates/api_cpp.h
@@ -210,21 +210,6 @@
{% macro render_cpp_method_declaration(type, method) %}
{% set CppType = as_cppType(type.name) %}
- {{as_cppType(method.return_type.name)}} {{method.name.CamelCase()}}(
- {%- for arg in method.arguments -%}
- {%- if not loop.first %}, {% endif -%}
- {%- if arg.type.category == "object" and arg.annotation == "value" -%}
- {{as_cppType(arg.type.name)}} const& {{as_varName(arg.name)}}
- {%- else -%}
- {{as_annotated_cppType(arg)}}
- {%- endif -%}
- {{render_cpp_default_value(arg, False)}}
- {%- endfor -%}
- ) const
-{%- endmacro %}
-
-{% macro render_cpp_method_future_overrides_declaration(type, method) %}
- {% set CppType = as_cppType(type.name) %}
{% set OriginalMethodName = method.name.CamelCase() %}
{% set MethodName = OriginalMethodName[:-1] if method.name.chunks[-1] == "f" else OriginalMethodName %}
{{as_cppType(method.return_type.name)}} {{MethodName}}(
@@ -250,9 +235,6 @@
{% for method in type.methods %}
{{render_cpp_method_declaration(type, method)}};
- {% if method.return_type.dict_name == "future" %}
- {{render_cpp_method_future_overrides_declaration(type, method)}};
- {% endif %}
{% endfor %}
private: