茂木です。 ここはstd::maxがオススメです。 styleProps.insert("draw:marker-end-width", std::max(w, 0.05));
On 2014/11/07 17:00, Naruhiko Ogasawara wrote:
小笠原です。 小出しにごめんなさい。 1. ソース全部みたわけではないのですが変数 w の型は double というのは 間違いないんですよね。 2. ここで変数を宣言することはコーディング規約的に大丈夫なんでしたっけ。 というかDLPのコーディング規約はLibOと同じでいいのかな。 3. これは好みの問題ですが、ぼくなら三項演算子を使ってこう書くかなあ。 (三項演算子の使用がOKかどうかはコーディング規約確認してません) ---------------- double w = m_scale*_linePropertiesMarkerScale(style.endMarker)*(0.1/(style.width*style.width+1)+2.54*style.width); - if (w < 0.05) - w = 0.05; - styleProps.insert("draw:marker-end-width", w); + styleProps.insert("draw:marker-end-width", w < 0.05 ? 0.05 : w); ---------------- では。
-- Unsubscribe instructions: E-mail to discuss+unsubscr...@ja.libreoffice.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/ja/discuss/ All messages sent to this list will be publicly archived and cannot be deleted