Use const where possible
Summary: Use const where possible. This does not use const for all variables as that would require too much refactoring for one diff. It does however use const where currently possible as well as does some small refactoring to enable const usage in more locations. Striving for 100% const usage leads to code with is easier to reason about as a reference will always reference the same value. The compiler will also assist if you accidentally override a reference. Reviewed By: IanChilds Differential Revision: D3741999 fbshipit-source-id: 1ba7da5784c3047f2d4c03746890192f724aa65e
This commit is contained in:
committed by
Facebook Github Bot 6
parent
4bcefd8845
commit
ca72b2b796
@@ -33,14 +33,14 @@
|
||||
|
||||
CSS_EXTERN_C_BEGIN
|
||||
|
||||
bool test(CSSNode *style, CSSNode *expected_layout);
|
||||
bool test(const CSSNodeRef style, const CSSNodeRef expected_layout);
|
||||
CSSSize measure(void *context,
|
||||
float width,
|
||||
float availableWidth,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
float availableHeight,
|
||||
CSSMeasureMode heightMode);
|
||||
void init_css_node_children(CSSNode *node, int childCount);
|
||||
CSSNode *new_test_css_node(void);
|
||||
void init_css_node_children(const CSSNodeRef node, const uint32_t childCount);
|
||||
CSSNodeRef new_test_css_node();
|
||||
|
||||
CSS_EXTERN_C_END
|
||||
|
||||
|
Reference in New Issue
Block a user