Skip to content

Commit

Permalink
Fix up a few remaining preserveAcronyms issues for Darwin. (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Nov 29, 2022
1 parent dd64bd4 commit 352ea84
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,12 @@ async function asObjectiveCClass(type, cluster, options) {
if (options.hash.compatRemapClusterName) {
cluster = compatClusterNameRemapping.call(this, cluster);
} else {
let preserveAcronyms = true;
if ('preserveAcronyms' in options.hash) {
preserveAcronyms = options.hash.preserveAcronyms;
}
cluster = appHelper.asUpperCamelCase(cluster, {
hash: { preserveAcronyms: false },
hash: { preserveAcronyms: preserveAcronyms },
});
}
return `MTR${cluster}Cluster${appHelper.asUpperCamelCase(type)}`;
Expand Down Expand Up @@ -231,9 +235,9 @@ function commandHasRequiredField(command) {
* This function strips out the redundant cluster names, and strips off trailing
* "Enum" bits on the enum names while we're here.
*/
function objCEnumName(clusterName, enumLabel) {
function objCEnumName(clusterName, enumLabel, options) {
clusterName = appHelper.asUpperCamelCase(clusterName, {
hash: { preserveAcronyms: false },
hash: { preserveAcronyms: options.hash.preserveAcronyms },
});
enumLabel = appHelper.asUpperCamelCase(enumLabel);
// Some enum names have one or more copies of the cluster name at the
Expand Down

0 comments on commit 352ea84

Please sign in to comment.