diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2018-01-01 15:34:04 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2018-01-01 23:04:54 +0100 |
commit | 6f6a8fce6fe1e8dadef773194327947f4ceabcd9 (patch) | |
tree | 24d6265d54deae024ef1f94bfd68acc2e513350f | |
parent | 6e0cc3f059f114bd77dc829493db7cbac33bc7d4 (diff) |
[PVR] CGUIEPGGridContainerModel: Change method signatures to use const ref for params to avoid copy.
-rw-r--r-- | xbmc/pvr/windows/GUIEPGGridContainerModel.cpp | 4 | ||||
-rw-r--r-- | xbmc/pvr/windows/GUIEPGGridContainerModel.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/pvr/windows/GUIEPGGridContainerModel.cpp b/xbmc/pvr/windows/GUIEPGGridContainerModel.cpp index 81d4b31767..ab1bc30afb 100644 --- a/xbmc/pvr/windows/GUIEPGGridContainerModel.cpp +++ b/xbmc/pvr/windows/GUIEPGGridContainerModel.cpp @@ -461,7 +461,7 @@ int CGUIEPGGridContainerModel::GetNowBlock() const return GetBlock(CDateTime::GetUTCDateTime()) - GetPageNowOffset(); } -int CGUIEPGGridContainerModel::GetFirstEventBlock(const CPVREpgInfoTagPtr event) const +int CGUIEPGGridContainerModel::GetFirstEventBlock(const CPVREpgInfoTagPtr &event) const { const CDateTime eventStart = event->StartAsUTC(); int diff; @@ -479,7 +479,7 @@ int CGUIEPGGridContainerModel::GetFirstEventBlock(const CPVREpgInfoTagPtr event) return std::ceil(fBlockIndex); } -int CGUIEPGGridContainerModel::GetLastEventBlock(const CPVREpgInfoTagPtr event) const +int CGUIEPGGridContainerModel::GetLastEventBlock(const CPVREpgInfoTagPtr &event) const { // Last block of a tag is always the block calculated using event's end time, not rounded up. // Refer to CGUIEPGGridContainerModel::Refresh, where the model is created, for details! diff --git a/xbmc/pvr/windows/GUIEPGGridContainerModel.h b/xbmc/pvr/windows/GUIEPGGridContainerModel.h index c05961f663..6efc152b7c 100644 --- a/xbmc/pvr/windows/GUIEPGGridContainerModel.h +++ b/xbmc/pvr/windows/GUIEPGGridContainerModel.h @@ -92,8 +92,8 @@ namespace PVR CDateTime GetStartTimeForBlock(int block) const; int GetBlock(const CDateTime &datetime) const; - int GetFirstEventBlock(const CPVREpgInfoTagPtr event) const; - int GetLastEventBlock(const CPVREpgInfoTagPtr event) const; + int GetFirstEventBlock(const CPVREpgInfoTagPtr &event) const; + int GetLastEventBlock(const CPVREpgInfoTagPtr &event) const; private: void FreeItemsMemory(); |