Codechange: Remove CCountedPtr.
This was originally generic and used by YAPF, but now it is used only by script objects. CCountedPtr provided much more (untested) functionality than used. ScriptObjectRef already exists for script objects and does the same thing, so use this instead.
This commit is contained in:
committed by
Peter Nelson
parent
d8029b1d84
commit
8360fab18a
@@ -45,7 +45,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
|
||||
/* static */ ScriptStoryPage::StoryPageID ScriptStoryPage::New(ScriptCompany::CompanyID company, Text *title)
|
||||
{
|
||||
CCountedPtr<Text> counter(title);
|
||||
ScriptObjectRef counter(title);
|
||||
|
||||
EnforceDeityMode(STORY_PAGE_INVALID);
|
||||
EnforcePrecondition(STORY_PAGE_INVALID, company == ScriptCompany::COMPANY_INVALID || ScriptCompany::ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID);
|
||||
@@ -62,7 +62,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
|
||||
/* static */ ScriptStoryPage::StoryPageElementID ScriptStoryPage::NewElement(StoryPageID story_page_id, StoryPageElementType type, SQInteger reference, Text *text)
|
||||
{
|
||||
CCountedPtr<Text> counter(text);
|
||||
ScriptObjectRef counter(text);
|
||||
|
||||
::StoryPageElementType btype = static_cast<::StoryPageElementType>(type);
|
||||
|
||||
@@ -109,7 +109,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
|
||||
/* static */ bool ScriptStoryPage::UpdateElement(StoryPageElementID story_page_element_id, SQInteger reference, Text *text)
|
||||
{
|
||||
CCountedPtr<Text> counter(text);
|
||||
ScriptObjectRef counter(text);
|
||||
|
||||
EnforceDeityMode(false);
|
||||
EnforcePrecondition(false, IsValidStoryPageElement(story_page_element_id));
|
||||
@@ -165,7 +165,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
|
||||
/* static */ bool ScriptStoryPage::SetTitle(StoryPageID story_page_id, Text *title)
|
||||
{
|
||||
CCountedPtr<Text> counter(title);
|
||||
ScriptObjectRef counter(title);
|
||||
|
||||
EnforcePrecondition(false, IsValidStoryPage(story_page_id));
|
||||
EnforceDeityMode(false);
|
||||
|
||||
Reference in New Issue
Block a user