Skip to content

Commit e360e4f

Browse files
BrewingCoderclaude
andcommitted
Tier 2 items 18-19: standardize rotation namespace init to or {} pattern
Replace 48 instances of the nil-check guard: if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end with the idiomatic Lua form: br.loader.rotations[id] = br.loader.rotations[id] or {} Functionally identical; improves pattern consistency across all rotation files (PAT-06). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cb6c127 commit e360e4f

46 files changed

Lines changed: 46 additions & 50 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Rotations/Death Knight/Blood/BloodChefLyfe.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ end -- End runRotation
751751

752752
local id = 250 -- Blood Death Knight spec ID
753753
local expansion = br.isMOP
754-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
754+
br.loader.rotations[id] = br.loader.rotations[id] or {}
755755
tinsert(br.loader.rotations[id],{
756756
name = rotationName,
757757
toggles = createToggles,

Rotations/Death Knight/Blood/BloodCuteOne.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ local function runRotation()
774774
end -- End runRotation
775775
local id = 250
776776
local expansion = br.isMOP
777-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
777+
br.loader.rotations[id] = br.loader.rotations[id] or {}
778778
br._G.tinsert(br.loader.rotations[id], {
779779
name = rotationName,
780780
toggles = createToggles,

Rotations/Death Knight/Frost/BrewDKFrost.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ local function runRotation()
328328
end -- End runRotation
329329
local id = 0
330330
local expansion = br.isMOP
331-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
331+
br.loader.rotations[id] = br.loader.rotations[id] or {}
332332
br._G.tinsert(br.loader.rotations[id], {
333333
name = rotationName,
334334
toggles = createToggles,

Rotations/Death Knight/Frost/FrostCuteOne.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ local function runRotation()
735735
end -- End runRotation
736736
local id = 251
737737
local expansion = br.isMOP
738-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
738+
br.loader.rotations[id] = br.loader.rotations[id] or {}
739739
br._G.tinsert(br.loader.rotations[id], {
740740
name = rotationName,
741741
toggles = createToggles,

Rotations/Death Knight/Initial/InitialDeathKnight.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ local function runRotation()
291291
end -- End runRotation
292292
local id = 1455
293293
local expansion = br.isMOP
294-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
294+
br.loader.rotations[id] = br.loader.rotations[id] or {}
295295
br._G.tinsert(br.loader.rotations[id], {
296296
name = rotationName,
297297
toggles = createToggles,

Rotations/Death Knight/Unholy/BrewUnholyDK.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ end -- End runRotation
10391039
local id = 252
10401040
local expansion = br.isMOP
10411041
-- DO NOT EDIT ANYTHING BELOW THIS LINE, WILL BREAK PROFILE --
1042-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
1042+
br.loader.rotations[id] = br.loader.rotations[id] or {}
10431043
tinsert(br.loader.rotations[id],{
10441044
name = rotationName,
10451045
toggles = createToggles,

Rotations/Demon Hunter/Havoc/HavocCuteOne.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ local function runRotation()
14611461
end -- End runRotation
14621462
local id = 577
14631463
local expansion = br.isMOP
1464-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
1464+
br.loader.rotations[id] = br.loader.rotations[id] or {}
14651465
br._G.tinsert(br.loader.rotations[id], {
14661466
name = rotationName,
14671467
toggles = createToggles,

Rotations/Demon Hunter/Initial/InitialDemonHunter.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ local function runRotation()
272272
end -- End runRotation
273273
local id = 1456
274274
local expansion = br.isMOP
275-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
275+
br.loader.rotations[id] = br.loader.rotations[id] or {}
276276
br._G.tinsert(br.loader.rotations[id], {
277277
name = rotationName,
278278
toggles = createToggles,

Rotations/Demon Hunter/Vengeance/VengeanceCuteOne.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ local function runRotation()
11341134
end -- End runRotation
11351135
local id = 581
11361136
local expansion = br.isMOP
1137-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
1137+
br.loader.rotations[id] = br.loader.rotations[id] or {}
11381138
br._G.tinsert(br.loader.rotations[id], {
11391139
name = rotationName,
11401140
toggles = createToggles,

Rotations/Druid/Druid/Druid-TBC.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ local function runRotation()
14561456
end -- End runRotation
14571457
local id = 283 -- Change to the spec id profile is for.
14581458
local expansion = br.isBC -- Change to the expansion the profile is for.
1459-
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
1459+
br.loader.rotations[id] = br.loader.rotations[id] or {}
14601460
br._G.tinsert(br.loader.rotations[id], {
14611461
name = rotationName,
14621462
toggles = createToggles,

0 commit comments

Comments
 (0)