mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-25 15:06:21 +02:00
removed depency to boost lexical cast and boost algorithm
This commit is contained in:
parent
c8e58f272f
commit
84f9dd2d7a
7 changed files with 26 additions and 8 deletions
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "common/log.h"
|
|
||||||
#include "clientConnection.h"
|
#include "clientConnection.h"
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
#include "common/snapException.h"
|
#include "common/snapException.h"
|
||||||
#include "message/hello.h"
|
#include "message/hello.h"
|
||||||
|
#include "common/log.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#define logD std::clog << kDbg
|
#define logD std::clog << kDbg
|
||||||
#define logO std::clog << kOut
|
#define logO std::clog << kOut
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -79,6 +80,26 @@ static inline std::string trim_copy(const std::string &s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems)
|
||||||
|
{
|
||||||
|
std::stringstream ss(s);
|
||||||
|
std::string item;
|
||||||
|
while (std::getline(ss, item, delim))
|
||||||
|
{
|
||||||
|
elems.push_back(item);
|
||||||
|
}
|
||||||
|
return elems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static std::vector<std::string> split(const std::string &s, char delim)
|
||||||
|
{
|
||||||
|
std::vector<std::string> elems;
|
||||||
|
split(s, delim, elems);
|
||||||
|
return elems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static std::string getHostName()
|
static std::string getHostName()
|
||||||
{
|
{
|
||||||
char hostname[1024];
|
char hostname[1024];
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "sampleFormat.h"
|
#include "sampleFormat.h"
|
||||||
|
#include "common/utils.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -58,7 +58,7 @@ string SampleFormat::getFormat() const
|
||||||
void SampleFormat::setFormat(const std::string& format)
|
void SampleFormat::setFormat(const std::string& format)
|
||||||
{
|
{
|
||||||
std::vector<std::string> strs;
|
std::vector<std::string> strs;
|
||||||
boost::split(strs, format, boost::is_any_of(":"));
|
strs = split(format, ':');
|
||||||
if (strs.size() == 3)
|
if (strs.size() == 3)
|
||||||
setFormat(
|
setFormat(
|
||||||
std::stoul(strs[0]),
|
std::stoul(strs[0]),
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "boost/lexical_cast.hpp"
|
|
||||||
#include "controlServer.h"
|
#include "controlServer.h"
|
||||||
#include "message/time.h"
|
#include "message/time.h"
|
||||||
#include "message/ack.h"
|
#include "message/ack.h"
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "oggEncoder.h"
|
#include "oggEncoder.h"
|
||||||
#include "common/log.h"
|
|
||||||
#include "common/snapException.h"
|
#include "common/snapException.h"
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
#include "common/log.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#define JSON_RPC_EXCEPTION_H
|
#define JSON_RPC_EXCEPTION_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include "json.hpp"
|
#include "json.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snapException.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue