From 29aaf118be64d64eaa43a4928449fca72cbf71ae Mon Sep 17 00:00:00 2001 From: xianjimli Date: Thu, 2 Apr 2020 16:57:34 +0800 Subject: [PATCH] fix ti compile error --- 3rd/agge/agge/stroke_features.h | 1 + 3rd/agge/agge/vector_rasterizer.cpp | 28 ++++++++++++++-------------- docs/changes.md | 4 +++- src/tkc/value_desc.h | 4 ++-- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/3rd/agge/agge/stroke_features.h b/3rd/agge/agge/stroke_features.h index 304177d1f..58462c685 100644 --- a/3rd/agge/agge/stroke_features.h +++ b/3rd/agge/agge/stroke_features.h @@ -1,6 +1,7 @@ #pragma once #include "stroke.h" +#include namespace agge { diff --git a/3rd/agge/agge/vector_rasterizer.cpp b/3rd/agge/agge/vector_rasterizer.cpp index 544ef0064..4ee9b3f65 100644 --- a/3rd/agge/agge/vector_rasterizer.cpp +++ b/3rd/agge/agge/vector_rasterizer.cpp @@ -160,8 +160,8 @@ namespace agge const int fy1 = y1 & _1_mask; const int fy2 = y2 & _1_mask; const int step = dy > 0 ? +1 : -1; - const int near = dy > 0 ? _1 : 0; - const int far = _1 - near; + const int near_ = dy > 0 ? _1 : 0; + const int far_ = _1 - near_; if (x2 == x1) { @@ -173,12 +173,12 @@ namespace agge const int two_fx = 2 * (x1 & _1_mask); jump_xy(current, ex1, ey1); - add_and_commit(current, two_fx, near - fy1); + add_and_commit(current, two_fx, near_ - fy1); ey1 += step; if (ey1 != ey2) { - const int inner_delta = near - far, inner_area = two_fx * inner_delta; + const int inner_delta = near_ - far_, inner_area = two_fx * inner_delta; do { @@ -186,13 +186,13 @@ namespace agge ey1 += step; } while (ey1 != ey2); } - set(current, ex1, ey1, two_fx, fy2 - far); + set(current, ex1, ey1, two_fx, fy2 - far_); } else { // Ok, we have to render several hlines. - const int lift = near - fy1; + const int lift = near_ - fy1; precise_delta ctg_delta(dx, dy), tg_delta(dy, dx); ctg_delta.multiply(lift); @@ -205,7 +205,7 @@ namespace agge if (ey1 != ey2) { - const int lift_full = near - far; + const int lift_full = near_ - far_; ctg_delta.multiply(lift_full); @@ -217,7 +217,7 @@ namespace agge ey1 += step; } while (ey1 != ey2); } - if (int dy_rest = fy2 - far) + if (int dy_rest = fy2 - far_) hline(current, tg_delta, ey1, x_to, x2, dy_rest); } } @@ -320,19 +320,19 @@ namespace agge // Ok, we'll have to render a run of adjacent cells on the same hline... const int step = x2 > x1 ? +1 : -1; - const int near = x2 > x1 ? _1 : 0; - const int far = _1 - near; + const int near_ = x2 > x1 ? _1 : 0; + const int far_ = _1 - near_; - tg_delta.multiply(near - fx1); + tg_delta.multiply(near_ - fx1); int y_to = tg_delta.next(); - add_and_commit(current, fx1 + near, y_to); + add_and_commit(current, fx1 + near_, y_to); ex1 += step; if (ex1 != ex2) { - tg_delta.multiply(near - far); + tg_delta.multiply(near_ - far_); do { @@ -344,7 +344,7 @@ namespace agge ex1 += step; } while (ex1 != ex2); } - set(current, ex1, ey, fx2 + far, dy - y_to); + set(current, ex1, ey, fx2 + far_, dy - y_to); } } diff --git a/docs/changes.md b/docs/changes.md index 4a98d63b4..82d698d0d 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,6 +1,8 @@ # 最新动态 * 2020/04/02 - * 增加waitable ring buffer + * 增加 waitable ring buffer + * 修改资源的问题(感谢陈谭提供补丁)。 + * 修改 ti 编译器的问题(感谢陈谭提供补丁)。 * 2020/04/01 * 修正 overlay 的注释(感谢大恒提供补丁)。 diff --git a/src/tkc/value_desc.h b/src/tkc/value_desc.h index c3bc140d3..9d017613b 100644 --- a/src/tkc/value_desc.h +++ b/src/tkc/value_desc.h @@ -660,11 +660,11 @@ typedef struct _value_desc_double_t { */ double max; /** - * @property {double_t} step + * @property {double} step * @annotation ["readable"] * 步长。 */ - double_t step; + double step; /** * @property {const char*} unit * @annotation ["readable"]