Skip to content

Commit

Permalink
Merge pull request #24891 from thexai/stacks-warning
Browse files Browse the repository at this point in the history
stacks: fix Visual Studio warning
  • Loading branch information
thexai committed Mar 28, 2024
2 parents bba94b9 + 0be5aa4 commit 122a369
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xbmc/application/Application.cpp
Expand Up @@ -2264,7 +2264,7 @@ bool CApplication::PlayStack(CFileItem& item, bool bRestart)
if (!stackHelper->InitializeStack(item))
return false;

std::optional<int> startoffset = stackHelper->InitializeStackStartPartAndOffset(item);
std::optional<int64_t> startoffset = stackHelper->InitializeStackStartPartAndOffset(item);
if (!startoffset)
{
CLog::LogF(LOGERROR, "Failed to obtain start offset for stack {}. Aborting playback.",
Expand Down
3 changes: 2 additions & 1 deletion xbmc/application/ApplicationStackHelper.cpp
Expand Up @@ -81,7 +81,8 @@ bool CApplicationStackHelper::InitializeStack(const CFileItem & item)
return true;
}

std::optional<int> CApplicationStackHelper::InitializeStackStartPartAndOffset(const CFileItem& item)
std::optional<int64_t> CApplicationStackHelper::InitializeStackStartPartAndOffset(
const CFileItem& item)
{
CVideoDatabase dbs;
int64_t startoffset = 0;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/application/ApplicationStackHelper.h
Expand Up @@ -39,7 +39,7 @@ class CApplicationStackHelper : public IApplicationComponent
\param item the FileItem object that is the stack
\returns the part offset if available, nullopt in case of errors
*/
std::optional<int> InitializeStackStartPartAndOffset(const CFileItem& item);
std::optional<int64_t> InitializeStackStartPartAndOffset(const CFileItem& item);

/*!
\brief returns the current part number
Expand Down

0 comments on commit 122a369

Please sign in to comment.