Remove redundant path name argument from the CinemaManager AddPath function.

Differential Revision: https://code.wildfiregames.com/D310
Patch By: Vladislav
This was SVN commit r19406.
This commit is contained in:
elexis 2017-04-11 01:37:00 +00:00
parent 65cbf12b7e
commit 2e37e6a8d9
5 changed files with 8 additions and 9 deletions

View File

@ -109,7 +109,7 @@ float CCinemaPath::GetElapsedTime() const
return m_TimeElapsed; return m_TimeElapsed;
} }
CStrW CCinemaPath::GetName() const const CStrW& CCinemaPath::GetName() const
{ {
return m_Name; return m_Name;
} }

View File

@ -90,7 +90,7 @@ public:
float GetNodeFraction() const; float GetNodeFraction() const;
float GetElapsedTime() const; float GetElapsedTime() const;
CStrW GetName() const; const CStrW& GetName() const;
void SetTimescale(fixed scale); void SetTimescale(fixed scale);

View File

@ -927,7 +927,7 @@ void CXMLReader::ReadPaths(XMBElement parent)
if (!cmpCinemaManager) if (!cmpCinemaManager)
continue; continue;
if (!cmpCinemaManager->HasPath(pathName)) if (!cmpCinemaManager->HasPath(pathName))
cmpCinemaManager->AddPath(pathName, path); cmpCinemaManager->AddPath(path);
else else
LOGWARNING("Path with name '%s' already exists", pathName.ToUTF8()); LOGWARNING("Path with name '%s' already exists", pathName.ToUTF8());
} }

View File

@ -153,14 +153,14 @@ public:
} }
} }
virtual void AddPath(const CStrW& name, const CCinemaPath& path) virtual void AddPath(const CCinemaPath& path)
{ {
if (m_Paths.find(name) != m_Paths.end()) if (m_Paths.find(path.GetName()) != m_Paths.end())
{ {
LOGWARNING("Path with name '%s' already exists", name.ToUTF8()); LOGWARNING("Path with name '%s' already exists", path.GetName().ToUTF8());
return; return;
} }
m_Paths[name] = path; m_Paths[path.GetName()] = path;
} }
virtual void AddCinemaPathToQueue(const CStrW& name) virtual void AddCinemaPathToQueue(const CStrW& name)

View File

@ -33,10 +33,9 @@ class ICmpCinemaManager : public IComponent
public: public:
/** /**
* Adds the path to the path list * Adds the path to the path list
* @param name path name
* @param CCinemaPath path data * @param CCinemaPath path data
*/ */
virtual void AddPath(const CStrW& name, const CCinemaPath& path) = 0; virtual void AddPath(const CCinemaPath& path) = 0;
/** /**
* Adds the path to the playlist * Adds the path to the playlist