Fix misc-misplaced-const
warnings in Yoga tests (#1677)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1677 We have Clang Tidy warnings enabled internally, that will flag `const YG*Ref` as misleading, as a const pointer to non-const, instead of non-const pointer to const. Let's remove all the misleading const in existing tests, and generated tests. Reviewed By: joevilches Differential Revision: D59335968 fbshipit-source-id: c66af878904ba7900f8ffcd99162968d90f8e5c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4fe14ab3e
commit
5009f5c1ac
@@ -49,7 +49,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
this.push('');
|
||||
}
|
||||
|
||||
this.push('const YGConfigRef config = YGConfigNew();');
|
||||
this.push('YGConfigRef config = YGConfigNew();');
|
||||
for (const i in experiments) {
|
||||
this.push(
|
||||
'YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeature' +
|
||||
@@ -63,9 +63,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
|
||||
emitTestTreePrologue: {
|
||||
value: function (nodeName) {
|
||||
this.push(
|
||||
'const YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);',
|
||||
);
|
||||
this.push('YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);');
|
||||
},
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user