| Index: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| index 210ee2e5f096afcf0b38b546394d8c8cac910cbf..463d2607a2c3bd97d5578165afb08c5e0067f718 100644
|
| --- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| +++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| @@ -28,14 +28,17 @@
|
| #include "mojo/public/cpp/bindings/lib/validation_util.h"
|
| #include "mojo/public/cpp/environment/lib/scoped_task_tracking.h"
|
| #include "mojo/public/cpp/environment/logging.h"
|
| +#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
|
|
|
| {%- for namespace in namespaces_as_array %}
|
| namespace {{namespace}} {
|
| {%- endfor %}
|
|
|
| {#--- Constants #}
|
| -{% for constant in module.constants %}
|
| +{%- for constant in module.constants %}
|
| +{%- if not constant.kind|is_integral_kind %}
|
| const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_value}};
|
| +{%- endif %}
|
| {%- endfor %}
|
|
|
| namespace internal {
|
| @@ -77,8 +80,12 @@ const uint32_t {{method_name}} = {{method.ordinal}};
|
|
|
| {#--- Struct Constants #}
|
| {%- for struct in structs %}
|
| -{% for constant in struct.constants %}
|
| -const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant|constant_value}};
|
| +{%- for constant in struct.constants %}
|
| +{%- if constant.kind|is_integral_kind %}
|
| +MOJO_STATIC_CONST_MEMBER_DEFINITION const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}};
|
| +{%- else %}
|
| +MOJO_STATIC_CONST_MEMBER_DEFINITION const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant|constant_value}};
|
| +{%- endif %}
|
| {%- endfor %}
|
| {%- endfor %}
|
|
|
|
|