mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-12 00:26:41 +02:00
Make some functions const
This commit is contained in:
parent
a8d1769ca7
commit
d52b5f1e6a
2 changed files with 5 additions and 4 deletions
|
@ -44,14 +44,14 @@ ProcessStream::ProcessStream(PcmListener* pcmListener, boost::asio::io_context&
|
|||
}
|
||||
|
||||
|
||||
bool ProcessStream::fileExists(const std::string& filename)
|
||||
bool ProcessStream::fileExists(const std::string& filename) const
|
||||
{
|
||||
struct stat buffer;
|
||||
return (stat(filename.c_str(), &buffer) == 0);
|
||||
}
|
||||
|
||||
|
||||
std::string ProcessStream::findExe(const std::string& filename)
|
||||
std::string ProcessStream::findExe(const std::string& filename) const
|
||||
{
|
||||
/// check if filename exists
|
||||
if (fileExists(filename))
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <boost/process.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "posix_stream.hpp"
|
||||
#include "watchdog.hpp"
|
||||
|
@ -66,8 +67,8 @@ protected:
|
|||
virtual void onStderrMsg(const std::string& line);
|
||||
virtual void initExeAndPath(const std::string& filename);
|
||||
|
||||
bool fileExists(const std::string& filename);
|
||||
std::string findExe(const std::string& filename);
|
||||
bool fileExists(const std::string& filename) const;
|
||||
std::string findExe(const std::string& filename) const;
|
||||
|
||||
size_t wd_timeout_sec_;
|
||||
std::unique_ptr<Watchdog> watchdog_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue