Re: [Powertop] [PATCH v2 03/31] html-report: add title and div tags
Igor Zhbanov <i.zhbanov at samsung.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <[email protected]> |
Hi Alexandra,
Alexandra Yates wrote:
...
> +void
> +report_formatter_html::add_div(struct tag_attr * div_attr)
> +{
> + std::string empty="";
> + std::string tmp_str;
> +
> + if (div_attr->css_class == empty && div_attr->css_id == empty)
> + add_exact("<div>\n");
> +
> + else if (div_attr->css_class == empty && div_attr->css_id != empty)
> + addf_exact("<div id=\"%s\">\n", div_attr->css_id);
> +
> + else if (div_attr->css_class != empty && div_attr->css_id == empty)
> + addf_exact("<div class=\"%s\">\n", div_attr->css_class);
> +
> + else if (div_attr->css_class != empty && div_attr->css_id != empty)
> + addf_exact("<div class=\"%s\" id=\"%s\">\n", div_attr->css_class, div_attr->css_id);
Please use indentation like:
if (something)
do_something();
else if (other)
do_something else();
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
phone: +7 (495) 797 25 00 ext 3981
e-mail: i.zhbanov(a)samsung.com
Mobile group, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation