Skip to content

Commit

Permalink
CXRandR: pass strings by reference, not value
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff authored and Montellese committed Jan 7, 2015
1 parent 808aac1 commit e60e232
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions xbmc/windowing/X11/XRandR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool CXRandR::Query(bool force, int screennum, bool ignoreoff)
return m_outputs.size() > 0;
}

bool CXRandR::TurnOffOutput(std::string name)
bool CXRandR::TurnOffOutput(const std::string& name)
{
XOutput *output = GetOutput(name);
if (!output)
Expand All @@ -181,7 +181,7 @@ bool CXRandR::TurnOffOutput(std::string name)
return true;
}

bool CXRandR::TurnOnOutput(std::string name)
bool CXRandR::TurnOnOutput(const std::string& name)
{
XOutput *output = GetOutput(name);
if (!output)
Expand Down Expand Up @@ -346,7 +346,7 @@ bool CXRandR::SetMode(XOutput output, XMode mode)
return true;
}

XMode CXRandR::GetCurrentMode(std::string outputName)
XMode CXRandR::GetCurrentMode(const std::string& outputName)
{
Query();
XMode result;
Expand All @@ -369,7 +369,7 @@ XMode CXRandR::GetCurrentMode(std::string outputName)
return result;
}

XMode CXRandR::GetPreferredMode(std::string outputName)
XMode CXRandR::GetPreferredMode(const std::string& outputName)
{
Query();
XMode result;
Expand Down Expand Up @@ -449,7 +449,7 @@ void CXRandR::SetNumScreens(unsigned int num)
m_bInit = false;
}

bool CXRandR::IsOutputConnected(std::string name)
bool CXRandR::IsOutputConnected(const std::string& name)
{
bool result = false;
Query();
Expand All @@ -465,7 +465,7 @@ bool CXRandR::IsOutputConnected(std::string name)
return result;
}

XOutput* CXRandR::GetOutput(std::string outputName)
XOutput* CXRandR::GetOutput(const std::string& outputName)
{
XOutput *result = 0;
Query();
Expand Down
12 changes: 6 additions & 6 deletions xbmc/windowing/X11/XRandR.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ class CXRandR
bool Query(bool force=false, bool ignoreoff=true);
bool Query(bool force, int screennum, bool ignoreoff=true);
std::vector<XOutput> GetModes(void);
XMode GetCurrentMode(std::string outputName);
XMode GetPreferredMode(std::string outputName);
XOutput *GetOutput(std::string outputName);
XMode GetCurrentMode(const std::string& outputName);
XMode GetPreferredMode(const std::string& outputName);
XOutput *GetOutput(const std::string& outputName);
bool SetMode(XOutput output, XMode mode);
void LoadCustomModeLinesToAllOutputs(void);
void SaveState();
void SetNumScreens(unsigned int num);
bool IsOutputConnected(std::string name);
bool TurnOffOutput(std::string name);
bool TurnOnOutput(std::string name);
bool IsOutputConnected(const std::string& name);
bool TurnOffOutput(const std::string& name);
bool TurnOnOutput(const std::string& name);
int GetCrtc(int x, int y);
//bool Has1080i();
//bool Has1080p();
Expand Down

0 comments on commit e60e232

Please sign in to comment.