Updated config mutator to support dynamic replacements

class TestCWR_ConfigWeaponMutatorCWR extends TestCWRTemplate
	config(TestCWR_ConfigWeapon);

var config name ReplaceWeaponClassName;
var config name ReplaceAmmoClassName;
var config ReplacementOptionsInfo ReplaceWeaponOptions;
var config ReplacementOptionsInfo ReplaceAmmoOptions;

static function StaticGetDynamicReplacements(out array<TemplateDynamicInfo> Replacements)
{
	if (default.ReplaceWeaponClassName != '')
	{
		Replacements.AddItem(CreateTemplate(false, default.ReplaceWeaponClassName, PathName(class'TestCWR_RipperWeapon'), default.ReplaceWeaponOptions));
		Replacements.AddItem(CreateTemplate(true, default.ReplaceAmmoClassName, PathName(class'TestCWR_RipperAmmo'), default.ReplaceAmmoOptions));
	}
}

DefaultProperties
{
	ReplaceWeaponClassName="UTWeap_BioRifle_Content"
	ReplaceAmmoClassName="UTAmmo_BioRifle_Content"
	ReplaceWeaponOptions=()
	ReplaceAmmoOptions=()
}

class TestCWR_ConfigWeaponMutatorCWR extends TestCWRTemplate
	config(TestCWR_ConfigWeapon);

var config name ReplaceWeaponClassName;
var config name ReplaceAmmoClassName;
var config ReplacementOptionsInfo ReplaceWeaponOptions;
var config ReplacementOptionsInfo ReplaceAmmoOptions;

// Called immediately after gameplay begins.
event PostBeginPlay()
{
	super.PostBeginPlay();

	if (ReplaceWeaponClassName != '')
	{
		RegisterWeaponReplacement(self, ReplaceWeaponClassName, PathName(class'TestCWR_RipperWeapon'), false, ReplaceWeaponOptions);
		RegisterWeaponReplacement(self, ReplaceAmmoClassName, PathName(class'TestCWR_RipperAmmo'), true, ReplaceAmmoOptions);
	}
}

static protected function bool StaticIsConflicting(optional out string ErrorMessage)
{
	if (!super.StaticIsConflicting() && default.ReplaceWeaponClassName != '')
	{
		return !RegisterWeaponReplacement(default.Class, default.ReplaceWeaponClassName, PathName(class'TestCWR_RipperWeapon'), false, default.ReplaceWeaponOptions, true, true, ErrorMessage) ||
			!RegisterWeaponReplacement(default.Class, default.ReplaceWeaponClassName, PathName(class'TestCWR_RipperAmmo'), true, default.ReplaceAmmoOptions, true, true, ErrorMessage);
	}

	return false;
}

static protected function StaticInitialize()
{
	super.StaticInitialize();

	if (default.ReplaceWeaponClassName != '')
	{
		RegisterWeaponReplacement(default.Class, default.ReplaceWeaponClassName, PathName(class'TestCWR_RipperWeapon'), false, default.ReplaceWeaponOptions, true);
		RegisterWeaponReplacement(default.Class, default.ReplaceAmmoClassName, PathName(class'TestCWR_RipperAmmo'), true, default.ReplaceAmmoOptions, true);
	}
}

DefaultProperties
{
	ReplaceWeaponClassName="UTWeap_BioRifle_Content"
	ReplaceAmmoClassName="UTAmmo_BioRifle_Content"
	ReplaceWeaponOptions=()
	ReplaceAmmoOptions=()
}


Added X2ItemTemplateManager

Added X2ItemTemplateManager

Vanilla version

//---------------------------------------------------------------------------------------
//  FILE:    X2ItemTemplateManager.uc
//  AUTHOR:  Joshua Bouscher
//
//---------------------------------------------------------------------------------------
//  Copyright (c) 2016 Firaxis Games, Inc. All rights reserved.
//---------------------------------------------------------------------------------------

class X2ItemTemplateManager extends X2DataTemplateManager
	native(Core) config(GameData);

var config array<name>       ItemCategories;
var config array<name>       UniqueEquipCategories;      //  should be a subset of ItemCategories
var config array<name>       WeaponCategories;
var config array<name>       WeaponTechCategories;
var config array<name>       ArmorTechCategories;

var config array<name>      BuildItemWeaponCategories;
var config array<name>      BuildItemArmorCategories;
var config array<name>      BuildItemMiscCategories;

var config int				MaxTechDistanceForValidDrop;  // number of techs "away" from being useable an item can be for it to be eligible to drop (schematics)

var protectedwrite config array<InventoryLoadout>  Loadouts;
var protectedwrite config array<StatBoostDefinition> StatBoostTable;
var protectedwrite config array<TX2MPSoldierItemDefinition> MPAvailableSoldierItems; // the list of items that are available for MP soldier to equip. -tsmith

var protectedwrite X2LootTableManager  LootTableManager;

native static function X2ItemTemplateManager GetItemTemplateManager();

cpptext
{
public:
	virtual void GetDynamicListValues(const FString& ListName, TArray<FString>& Values);
}

protected event ValidateTemplatesEvent()
{
	local int i;
	local X2ItemTemplate kItemTemplate;

	super.ValidateTemplatesEvent();

	LootTableManager = new class'X2LootTableManager';
	LootTableManager.InitLootTables();

	for(i = 0; i < MPAvailableSoldierItems.Length; i++)
	{
		kItemTemplate = FindItemTemplate(MPAvailableSoldierItems[i].ItemTemplateName);
		if(kItemTemplate != none)
		{
			kItemTemplate.MPCost = MPAvailableSoldierItems[i].ItemCost;
		}
	}
}

function bool AddItemTemplate(X2ItemTemplate Template, bool ReplaceDuplicate = false)
{
	return AddDataTemplate(Template, ReplaceDuplicate);
}

function X2DamageTypeTemplate FindDamageTypeTemplate(name DataName)
{
	local X2DataTemplate kTemplate;

	kTemplate = FindDataTemplate(DataName);
	if(kTemplate != none)
		return X2DamageTypeTemplate(kTemplate);
	return none;
}

function X2ItemTemplate FindItemTemplate(name DataName)
{
	local X2DataTemplate kTemplate;

	kTemplate = FindDataTemplate(DataName);
	if (kTemplate != none)
		return X2ItemTemplate(kTemplate);
	return none;
}

function TX2MPSoldierItemDefinition FindMPSoldierItemDefinition(name ItemTemplateName)
{
	local TX2MPSoldierItemDefinition ItemDef;
	local int i;

	for(i = 0; i < MPAvailableSoldierItems.Length; i++)
	{
		if(MPAvailableSoldierItems[i].ItemTemplateName == ItemTemplateName)
		{
			ItemDef = MPAvailableSoldierItems[i];
			break;
		}
	}

	return ItemDef;
}

function array<X2WeaponTemplate> GetAllWeaponTemplates()
{
	local array<X2WeaponTemplate> arrWeaponTemplates;
	local X2DataTemplate Template;
	local X2WeaponTemplate WeaponTemplate;

	foreach IterateTemplates(Template, none)
	{
		WeaponTemplate = X2WeaponTemplate(Template);

		if(WeaponTemplate != none)
		{
			arrWeaponTemplates.AddItem(WeaponTemplate);
		}
	}

	return arrWeaponTemplates;
}

function array<X2EquipmentTemplate> GetAllArmorTemplates()
{
	local array<X2EquipmentTemplate> arrArmorTemplates;
	local X2DataTemplate Template;
	local X2EquipmentTemplate ArmorTemplate;

	foreach IterateTemplates(Template, none)
	{
		ArmorTemplate = X2ArmorTemplate(Template);

		if(ArmorTemplate != none)
		{
			arrArmorTemplates.AddItem(ArmorTemplate);
		}
	}

	return arrArmorTemplates;
}

function array<X2WeaponUpgradeTemplate> GetAllUpgradeTemplates()
{
	local array<X2WeaponUpgradeTemplate> arrUpgradeTemplates;
	local X2DataTemplate Template;
	local X2WeaponUpgradeTemplate UpgradeTemplate;

	foreach IterateTemplates(Template, none)
	{
		UpgradeTemplate = X2WeaponUpgradeTemplate(Template);

		if(UpgradeTemplate != none)
		{
			arrUpgradeTemplates.AddItem(UpgradeTemplate);
		}
	}

	return arrUpgradeTemplates;
}

function array<X2SchematicTemplate> GetAllSchematicTemplates()
{
	local array<X2SchematicTemplate> arrSchematicTemplates;
	local X2DataTemplate Template;
	local X2SchematicTemplate SchematicTemplate;

	foreach IterateTemplates(Template, none)
	{
		SchematicTemplate = X2SchematicTemplate(Template);

		if(SchematicTemplate != none)
		{
			arrSchematicTemplates.AddItem(SchematicTemplate);
		}
	}

	return arrSchematicTemplates;
}

function array<X2ItemTemplate> GetAllItemsCreatedByTemplate(name TemplateName)
{
	local array<X2ItemTemplate> arrItemTemplates;
	local X2DataTemplate Template;
	local X2ItemTemplate ItemTemplate;

	foreach IterateTemplates(Template, none)
	{
		ItemTemplate = X2ItemTemplate(Template);

		if (ItemTemplate != none && ItemTemplate.CreatorTemplateName == TemplateName)
		{
			arrItemTemplates.AddItem(ItemTemplate);
		}
	}

	return arrItemTemplates;
}

// This uses the *mostly* deprecated UpgradeItem variable, mainly existing for backwards compatibility with Day 0 DLC
function array<X2ItemTemplate> GetAllBaseItemTemplatesFromUpgrade(name UpgradeTemplateName)
{
	local array<X2ItemTemplate> arrItemTemplates;
	local X2DataTemplate Template;
	local X2ItemTemplate ItemTemplate;

	foreach IterateTemplates(Template, none)
	{
		ItemTemplate = X2ItemTemplate(Template);

		if (ItemTemplate != none && ItemTemplate.UpgradeItem == UpgradeTemplateName)
		{
			arrItemTemplates.AddItem(ItemTemplate);
		}
	}

	return arrItemTemplates;
}

// Every upgraded item should have only one base
function X2ItemTemplate GetUpgradedItemTemplateFromBase(name BaseTemplateName)
{
	local X2DataTemplate Template;
	local X2ItemTemplate ItemTemplate;

	foreach IterateTemplates(Template, none)
	{
		ItemTemplate = X2ItemTemplate(Template);

		if (ItemTemplate != none && ItemTemplate.BaseItem == BaseTemplateName)
		{
			return ItemTemplate;
		}
	}

	return none;
}

function array<X2ItemTemplate> GetBuildableItemTemplates()
{
	local array<X2ItemTemplate> arrBuildTemplates;
	local X2DataTemplate Template;
	local X2ItemTemplate ItemTemplate;
	local XComGameState_HeadquartersXCom XComHQ;
	local XComGameStateHistory History;

	History = `XCOMHISTORY;
	XComHQ = XComGameState_HeadquartersXCom(History.GetSingleGameStateObjectForClass(class'XComGameState_HeadquartersXCom'));

	foreach IterateTemplates(Template, none)
	{
		ItemTemplate = X2ItemTemplate(Template);

		if(ItemTemplate != none)
		{
			if(ItemTemplate.CanBeBuilt &&
				(!ItemTemplate.bOneTimeBuild || (!XComHQ.HasItem(ItemTemplate) && XComHQ.GetNumItemBeingBuilt(ItemTemplate) == 0)) &&
				(!ItemTemplate.bBlocked || XComHQ.UnlockedItems.Find(ItemTemplate.DataName) != INDEX_NONE) &&
				XComHQ.MeetsEnoughRequirementsToBeVisible(ItemTemplate.Requirements, ItemTemplate.AlternateRequirements) &&
				!XComHQ.IsTechResearched(ItemTemplate.HideIfResearched) && !XComHQ.HasItemByName(ItemTemplate.HideIfPurchased))
			{
				arrBuildTemplates.AddItem(ItemTemplate);
			}
		}
	}

	return arrBuildTemplates;
}

function bool GetItemStatBoost(int PowerLevel, ECharStatType StatType, out StatBoost ItemStatBoost, optional bool bMaxBoost = false)
{
	local int idx;

	for(idx = 0; idx < StatBoostTable.Length; idx++)
	{
		if (bMaxBoost) // skirmish mode uses negative power and wants max boost
		{
			if (StatBoostTable[idx].PowerLevel == PowerLevel && StatBoostTable[idx].StatType == StatType)
			{
				ItemStatBoost.StatType = StatBoostTable[idx].StatType;
				ItemStatBoost.Boost = StatBoostTable[idx].MaxBoost;
				return true;
			}
		}
		else if(StatBoostTable[idx].PowerLevel == PowerLevel && StatBoostTable[idx].StatType == StatType)
		{
			ItemStatBoost.StatType = StatBoostTable[idx].StatType;
			ItemStatBoost.Boost = StatBoostTable[idx].MinBoost +
				`SYNC_RAND(StatBoostTable[idx].MaxBoost - StatBoostTable[idx].MinBoost + 1);
			return true;
		}
	}

	return false;
}

function bool WeaponCategoryIsValid(const out name Category)
{
	return WeaponCategories.Find(Category) != INDEX_NONE;
}

function bool ItemCategoryIsValid(const out name Category)
{
	return ItemCategories.Find(Category) != INDEX_NONE;
}

function bool WeaponTechIsValid(const out name Tech)
{
	return  WeaponTechCategories.Find(Tech) != INDEX_NONE;
}

function bool ArmorTechIsValid(const out name Tech)
{
	return ArmorTechCategories.Find(Tech) != INDEX_NONE;
}

function bool ItemCategoryIsUniqueEquip(const out name Category)
{
	return UniqueEquipCategories.Find(Category) != INDEX_NONE;
}

function LoadAllContent()
{
	local X2DataTemplate Template;
	local X2EquipmentTemplate EquipmentTemplate;
	local XComContentManager ContentMgr;
	local int i;

	ContentMgr = `CONTENT;
	foreach IterateTemplates(Template, none)
	{
		EquipmentTemplate = X2EquipmentTemplate(Template);
		if(EquipmentTemplate != none)
		{
			if(EquipmentTemplate.GameArchetype != "")
			{
				ContentMgr.RequestGameArchetype(EquipmentTemplate.GameArchetype, none, none, true);
			}

			if(EquipmentTemplate.AltGameArchetype != "")
			{
				ContentMgr.RequestGameArchetype(EquipmentTemplate.AltGameArchetype, none, none, true);
			}

			if(EquipmentTemplate.CosmeticUnitTemplate != "")
			{
				ContentMgr.RequestGameArchetype(EquipmentTemplate.CosmeticUnitTemplate, none, none, true);
			}

			for (i = 0; i < EquipmentTemplate.AltGameArchetypeArray.Length; ++i)
			{
				if (EquipmentTemplate.AltGameArchetypeArray[i].ArchetypeString != "")
				{
					ContentMgr.RequestGameArchetype(EquipmentTemplate.AltGameArchetypeArray[i].ArchetypeString, none, none, true);
				}
			}
		}
	}
}

DefaultProperties
{
	TemplateDefinitionClass=class'X2Item';
}

error: pathspec 'X2WOTCCommunityHighlander/Src/XComGame/Classes/X2ItemTemplateManager.uc' did not match any file(s) known to git


Update math.uc

Update math.uc

Fixed lower case notation for Abs, Sin, Cos, Tan, Exp, Exp2, Log, Log2, Log10, Ceil

# math.uc - uCalc Transformation file
# This file was saved with uCalc Transform 2.95 on 3/19/2014 12:34:35 PM
# Comment: Converts math-related code from PowerBASIC to C++

ExternalKeywords: Exclude, Comment, Selected, ParentChild, FindMode, InputFile, OutputFile, BatchAction, SEND
ExternalKeywords: Highlight, ForeColor, BackColor, FontName, FontSize, FontStyle
ExternalKeywords: FilterEndText, FilterSeparator, FilterSort, FilterSortFunc, FilterStartText, FilterUnique, FilterTally

FindMode: Replace

# Definitions

# Search Criteria

Criteria: 0
Enabled: True
Exclude: False
Comment: Converts math-related code from PowerBASIC to C++
Selected: False
Highlight: True
ForeColor: ControlText
BackColor: Aqua
FontName:
FontSize:
FontStyle:
CaseSensitive: False
QuoteSensitive: True
CodeBlockSensitive: True
FilterEndText:
FilterSeparator: {#10}
FilterSort: False
FilterSortFunc:
FilterStartText:
FilterUnique: False
FilterTally: False
Min: 0
Max: -1
MinSoft: 0
MaxSoft: -1
BatchAction: Transform
InputFile:
OutputFile:
SEND:
StartAfter: 0
StopAfter: -1
SkipOver: False
ParentChild: 0
Pass: 0
PassOnce: True
Precedence: 0
RightToLeft: False

Criteria: 1
Comment: ^ (power)
Pass: 1

Criteria: 2
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 3
BackColor: Gold
Precedence: 100
Find: {x} ^ {y}  {@Note: precedence property set to 100}
Replace: pow({x}, {y})

Criteria: 4
Comment: Bitwise AND and OR
Pass: 2

Criteria: 5
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 6
Comment: Bitwise AND and OR
BackColor: YellowGreen
Find: ({expr})
Replace: ({@Eval: Replace(Replace('{expr}', "And", "&"), "Or", "|")})

Criteria: 7
Comment: Everything else
Pass: 3

Criteria: 8
Find: {@Start}
      {@Note:
         ToDo:  \ exp10 frac sgn shift
               eqv imp bin hex oct Not
      }
Replace: #include <math.h>
         #include <stdlib.h>
         {@Note: rand & srand are in stdlib.h}

Criteria: 9
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 10
Selected: True
Find: {func: Abs|Sin|Cos|Tan|Exp|Exp2|Log|Log2|Log10|Ceil}
Replace: {@Eval: LCase("{func}", "{'.*'}")}

Criteria: 11
Find: Mod
Replace: %

Criteria: 12
BackColor: Yellow
Find: Atn
Replace: atan

Criteria: 13
BackColor: Lime
Find: Sqr
Replace: sqrt

Criteria: 14
BackColor: Brown
Find: Fix
Replace: trunc

Criteria: 15
BackColor: Pink
Find: Cint
Replace: lround

Criteria: 16
BackColor: Red
Find: Incr {var:1}
Replace: {var}++

Criteria: 17
BackColor: RoyalBlue
Find: Decr {var:1}
Replace: {var}--

Criteria: 18
Comment: Logical (short-circuit) AND
Find: And
Replace: &&

Criteria: 19
Comment: Logical (short-circuit) OR
BackColor: Purple
Find: Or
Replace: ||

Criteria: 20
BackColor: Khaki
Find: Xor
Replace: ^

Criteria: 21
BackColor: Green
Find: Not
Replace: ~

Criteria: 22
SkipOver: True
Find: #{metastatement:1} Not
Replace: [Skip over]

Criteria: 23
BackColor: Silver
Find: IsTrue {x%}  [{stop-: And | Or | Then | : }]
Replace: (({x}) <> 0)

Criteria: 24
BackColor: SandyBrown
Find: IsFalse {x%} [{stop-: And | Or | Then | : }]
Replace: !({x})

Criteria: 25
BackColor: Violet
Find: <>
Replace: !=

Criteria: 26
Find: Randomize {number}
Replace: srand({number})

Criteria: 27
Find: Rnd[()]
Replace: (rand() / RAND_MAX)

Criteria: 28
Find: Rnd({a}, {b})
Replace: (rand() % ({b}) + ({a}))

Criteria: 29
Find: Shift Right {ivar}, {countexpr}
Replace: {ivar} = ({ivar} >> {countexpr})

Criteria: 30
Find: Shift Left {ivar}, {countexpr}
Replace: {ivar} = ({ivar} << {countexpr})

Criteria: 31
Find: Sgn({number})
Replace: PB_SGN({number})

Criteria: 32
Find: Max({args})
Replace: PB_MAX({args})

# End Search

# math.uc - uCalc Transformation file
# This file was saved with uCalc Transform 2.5 on 3/7/2014 4:49:52 PM
# Comment: Converts math-related code from PowerBASIC to C++

ExternalKeywords: Exclude, Comment, Selected, ParentChild, FindMode, OutputFile, BatchAction, SEND
ExternalKeywords: Highlight, ForeColor, BackColor, FontName, FontSize, FontStyle
ExternalKeywords: FilterEndText, FilterSeparator, FilterSort, FilterSortFunc, FilterStartText, FilterUnique

FindMode: Replace

# Definitions

# Search Criteria

Criteria: 0
Enabled: False
Exclude: False
Comment: Converts math-related code from PowerBASIC to C++
Selected: False
Highlight: True
ForeColor: ControlText
BackColor: Aqua
FontName:
FontSize:
FontStyle:
CaseSensitive: False
QuoteSensitive: True
CodeBlockSensitive: True
FilterEndText:
FilterSeparator: {#10}
FilterSort: False
FilterSortFunc:
FilterStartText:
FilterUnique: False
Min: 0
Max: -1
MinSoft: 0
MaxSoft: -1
BatchAction: Transform
OutputFile:
SEND:
StartAfter: 0
StopAfter: -1
SkipOver: False
ParentChild: 0
Pass: 0
PassOnce: True
Precedence: 0
RightToLeft: False

Criteria: 1
Comment: ^ (power)
Pass: 1

Criteria: 2
Enabled: True
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 3
Enabled: True
BackColor: Gold
Precedence: 100
Find: {x} ^ {y}  {@Note: precedence property set to 100}
Replace: pow({x}, {y})

Criteria: 4
Comment: Bitwise AND and OR
Pass: 2

Criteria: 5
Enabled: True
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 6
Enabled: True
Comment: Bitwise AND and OR
BackColor: YellowGreen
Find: ({expr})
Replace: ({@Eval: Replace(Replace('{expr}', "And", "&"), "Or", "|")})

Criteria: 7
Comment: Everything else
Pass: 3

Criteria: 8
Enabled: True
Find: {@Start}
      {@Note:
         ToDo:  \ exp10 frac sgn shift
               eqv imp bin hex oct Not
               and fix LCase for next version
      }
Replace: #include <math.h>
         #include <stdlib.h>
         {@Note: rand & srand are in stdlib.h}

Criteria: 9
Enabled: True
SkipOver: True
Find: ' {Comment:".*"}
Replace: [Skip over]

Criteria: 10
Enabled: False
Find: {func: Abs|Sin|Cos|Tan|Exp|Exp2|Log|Log2|Log10|Ceil}
Replace: {@Evaluate: LCase({func})}

Criteria: 11
Enabled: True
Find: Mod
Replace: %

Criteria: 12
Enabled: True
BackColor: Yellow
Find: Atn
Replace: atan

Criteria: 13
Enabled: True
BackColor: Lime
Find: Sqr
Replace: sqrt

Criteria: 14
Enabled: True
BackColor: Brown
Find: Fix
Replace: trunc

Criteria: 15
Enabled: True
BackColor: Pink
Find: Cint
Replace: lround

Criteria: 16
Enabled: True
BackColor: Red
Find: Incr {var:1}
Replace: {var}++

Criteria: 17
Enabled: True
BackColor: RoyalBlue
Find: Decr {var:1}
Replace: {var}--

Criteria: 18
Enabled: True
Comment: Logical (short-circuit) AND
Find: And
Replace: &&

Criteria: 19
Enabled: True
Comment: Logical (short-circuit) OR
BackColor: Purple
Find: Or
Replace: ||

Criteria: 20
Enabled: True
BackColor: Khaki
Find: Xor
Replace: ^

Criteria: 21
Enabled: True
BackColor: Green
Find: Not
Replace: ~

Criteria: 22
Enabled: True
SkipOver: True
Find: #{metastatement:1} Not
Replace: [Skip over]

Criteria: 23
Enabled: True
BackColor: Silver
Find: IsTrue {x%}  [{stop-: And | Or | Then | : }]
Replace: (({x}) <> 0)

Criteria: 24
Enabled: True
BackColor: SandyBrown
Find: IsFalse {x%} [{stop-: And | Or | Then | : }]
Replace: !({x})

Criteria: 25
Enabled: True
BackColor: Violet
Find: <>
Replace: !=

Criteria: 26
Enabled: True
Find: Randomize {number}
Replace: srand({number})

Criteria: 27
Enabled: True
Find: Rnd[()]
Replace: (rand() / RAND_MAX)

Criteria: 28
Enabled: True
Find: Rnd({a}, {b})
Replace: (rand() % ({b}) + ({a}))

Criteria: 29
Enabled: True
Find: Shift Right {ivar}, {countexpr}
Replace: {ivar} = ({ivar} >> {countexpr})

Criteria: 30
Enabled: True
Find: Shift Left {ivar}, {countexpr}
Replace: {ivar} = ({ivar} << {countexpr})

Criteria: 31
Enabled: True
Find: Sgn({number})
Replace: PB_SGN({number})

Criteria: 32
Enabled: True
Selected: True
Find: Max({args})
Replace: PB_MAX({args})

# End Search