Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: Source/build/scripts/templates/SettingsMacros.h.tmpl

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/build/scripts/templates/SettingsMacros.h.tmpl
diff --git a/Source/build/scripts/templates/SettingsMacros.h.tmpl b/Source/build/scripts/templates/SettingsMacros.h.tmpl
index 9609d1535c1b5cc44c5c222a7a5c7116963e1550..7587e15b04e0edd2c18f1ab7ba0271121b55fac9 100644
--- a/Source/build/scripts/templates/SettingsMacros.h.tmpl
+++ b/Source/build/scripts/templates/SettingsMacros.h.tmpl
@@ -1,46 +1,46 @@
-{% from "macros.tmpl" import license -%}
+{% from "macros.tmpl" import license %}
{{ license() }}
#ifndef SettingsMacros_h
#define SettingsMacros_h
#define SETTINGS_GETTERS_AND_SETTERS \
-{%- for setting in settings %}
+ {% for setting in settings %}
{{setting.type|to_passing_type}} {{setting.name}}() const { return m_{{setting.name}}; } \
void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}); \
-{%- endfor %}
+ {% endfor %}
// End of SETTINGS_GETTERS_AND_SETTERS.
#define SETTINGS_MEMBER_VARIABLES \
-{%- for setting in settings if setting.type != "bool" %}
+ {% for setting in settings if setting.type != 'bool' %}
{{setting.type}} m_{{setting.name}}; \
-{%- endfor %}
-{%- for setting in settings if setting.type == "bool" %}
+ {% endfor %}
+ {% for setting in settings if setting.type == 'bool' %}
bool m_{{setting.name}} : 1; \
-{%- endfor %}
+ {% endfor %}
// End of SETTINGS_MEMBER_VARIABLES.
#define SETTINGS_INITIALIZER_LIST \
-{%- for setting in settings if setting.initial and setting.type != "bool" %}
+ {% for setting in settings if setting.initial and setting.type != 'bool' %}
, m_{{setting.name}}({{setting.initial}}) \
-{%- endfor %}
-{%- for setting in settings if setting.initial and setting.type == "bool" %}
+ {% endfor %}
+ {% for setting in settings if setting.initial and setting.type == 'bool' %}
, m_{{setting.name}}({{setting.initial}}) \
-{%- endfor %}
+ {% endfor %}
// End of SETTINGS_INITIALIZER_LIST.
#define SETTINGS_SETTER_BODIES \
-{%- for setting in settings %}
+{% for setting in settings %}
void Settings::set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}) \
{ \
if (m_{{setting.name}} == {{setting.name}}) \
return; \
m_{{setting.name}} = {{setting.name}}; \
- {%- if setting.invalidate %}
+ {% if setting.invalidate %}
invalidate(SettingsDelegate::{{setting.invalidate}}Change); \
- {%- endif %}
+ {% endif %}
} \
-{%- endfor %}
+{% endfor %}
// End of SETTINGS_SETTER_BODIES.
#endif // SettingsMacros_h
« no previous file with comments | « Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl ('k') | Source/build/scripts/templates/StyleBuilder.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698