mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-02 02:41:49 +02:00
moved compatibility stuff into compat.h
This commit is contained in:
parent
d0a22c0d3c
commit
87b1857d8a
2 changed files with 6 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "clientConnection.h"
|
#include "clientConnection.h"
|
||||||
#include "common/utils.h"
|
#include "common/compat.h"
|
||||||
#include "common/snapException.h"
|
#include "common/snapException.h"
|
||||||
#include "message/hello.h"
|
#include "message/hello.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
@ -57,7 +57,7 @@ void ClientConnection::socketRead(void* _to, size_t _bytes)
|
||||||
void ClientConnection::start()
|
void ClientConnection::start()
|
||||||
{
|
{
|
||||||
tcp::resolver resolver(io_service_);
|
tcp::resolver resolver(io_service_);
|
||||||
tcp::resolver::query query(tcp::v4(), host_, utl::to_string(port_), asio::ip::resolver_query_base::numeric_service);
|
tcp::resolver::query query(tcp::v4(), host_, cpt::to_string(port_), asio::ip::resolver_query_base::numeric_service);
|
||||||
auto iterator = resolver.resolve(query);
|
auto iterator = resolver.resolve(query);
|
||||||
logO << "Connecting\n";
|
logO << "Connecting\n";
|
||||||
socket_.reset(new tcp::socket(io_service_));
|
socket_.reset(new tcp::socket(io_service_));
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "sampleFormat.h"
|
#include "sampleFormat.h"
|
||||||
|
#include "common/compat.h"
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
||||||
|
@ -61,9 +62,9 @@ void SampleFormat::setFormat(const std::string& format)
|
||||||
strs = split(format, ':');
|
strs = split(format, ':');
|
||||||
if (strs.size() == 3)
|
if (strs.size() == 3)
|
||||||
setFormat(
|
setFormat(
|
||||||
utl::stoul(strs[0]),
|
cpt::stoul(strs[0]),
|
||||||
utl::stoul(strs[1]),
|
cpt::stoul(strs[1]),
|
||||||
utl::stoul(strs[2]));
|
cpt::stoul(strs[2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue