Yoga.h: clean up const / extern

Summary:
@public

Remove unnecessary `const` and `extern` specifiers from `Yoga.h`.

- Function declarations are `extern` by default
- The removed `const` specifiers for pass-by-valye parameters are only meaningful for the *definition* of functions, not for the declaration.
In this specific case, I found `const YGNodeRef` particularly confusing, as it is a `typedef` for a pointer type. `const` does not refer to the pointed-to object, but to the parameter itself, i.e. `const YGNodeRef` is `YGNode * const`, and not `const YGNode *`.

Reviewed By: SidharthGuglani

Differential Revision: D14999097

fbshipit-source-id: 8350870cb67f4a34722f796c4f4a2fc7dde41b99
This commit is contained in:
David Aurelio
2019-04-23 08:08:51 -07:00
committed by Facebook Github Bot
parent e9bb1efb03
commit e167642672
2 changed files with 166 additions and 228 deletions

View File

@@ -473,7 +473,7 @@ static void YGNodeSetChildrenInternal(
}
void YGNodeSetChildren(
YGNodeRef const owner,
const YGNodeRef owner,
const YGNodeRef c[],
const uint32_t count) {
const YGVector children = {c, c + count};