From bd2a1edbbf69f352a6c40730114db9918c384848 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Wed, 10 Jul 2024 03:52:10 +0900 Subject: [PATCH] add comment on is_value_empty() --- src/prim-types.hh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/prim-types.hh b/src/prim-types.hh index a0d921d0..11ca06dc 100644 --- a/src/prim-types.hh +++ b/src/prim-types.hh @@ -1642,6 +1642,12 @@ class TypedAttribute { void set_value_empty() { _value_empty = true; } + // + // Check if the attribute is authored, but no value(including ValueBlock) assigned. + // e.g. + // + // float myval; + // bool is_value_empty() const { if (has_connections()) { return false; @@ -1658,7 +1664,7 @@ class TypedAttribute { return _value_empty; } - // value set? + // The attribute authroed? bool authored() const { if (_attrib) { return true; @@ -1803,6 +1809,12 @@ class TypedAttributeWithFallback { bool has_connections() const { return _paths.size(); } + // + // Check if the attribute is authored, but no value(including ValueBlock) assigned. + // e.g. + // + // float myval; + // bool is_value_empty() const { if (has_connections()) { return false;