Directory Value: Remove unused code
@@ -157,50 +157,6 @@ CppKey convertToDirectChild (CppKey const & parent, CppKey const & child)
return directChild;
}
-/**
- * @brief This function checks if `element` is an array element of `parent`.
- *
- * @pre The key `child` must be below `parent`.
- *
- * @param parent This parameter specifies a parent key.
- * @param keys This variable stores a direct or indirect child of `parent`.
- *
- * @retval true If `element` is an array element
- * @retval false Otherwise
- */
-bool inline isArrayElementOf (CppKey const & parent, CppKey const & child)
-{
- char const * relative = elektraKeyGetRelativeName (*child, *parent);
- auto offsetIndex = elektraArrayValidateBaseNameString (relative);
- if (offsetIndex <= 0) return false;
- // Skip `#`, underscores and digits
- relative += 2 * offsetIndex;
- // The next character has to be the separation char (`/`) or end of string
- if (relative[0] != '\0' && relative[0] != '/') return false;
-
- return true;
-}
-
-/**
- * @brief This function determines if the given key is an array parent.
- *
- * @param parent This parameter specifies a possible array parent.
- * @param keys This variable stores the key set of `parent`.
- *
- * @retval true If `parent` is the parent key of an array
- * @retval false Otherwise
- */
-bool isArrayParent (CppKey const & parent, CppKeySet const & keys)
-{
- for (auto const & key : keys)
- {
- if (!key.isBelow (parent)) continue;
- if (!isArrayElementOf (parent, key)) return false;
- }
-
- return true;
-}
-
/**
* @brief Return all array parents of the given key set.
*
