Skip to content

Commit

Permalink
fix ambiguity with snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Sep 21, 2015
1 parent 6fcfc84 commit 3959f63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/simulator/simulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ All rights reserved.
#include <stdio.h>
#include <stdarg.h>

namespace sim {
namespace sim { namespace aux {
inline int snprintf(char* buf, int len, char const* fmt, ...)
{
va_list lp;
Expand All @@ -42,7 +42,7 @@ inline int snprintf(char* buf, int len, char const* fmt, ...)
if (ret < 0) { buf[len-1] = 0; ret = len-1; }
return ret;
}
}
}}
#endif

#if defined BOOST_ASIO_HAS_STD_CHRONO
Expand Down
2 changes: 2 additions & 0 deletions src/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ using boost::system::error_code;

namespace sim
{
using namespace aux;

std::string send_response(int code, char const* status_message
, int len, char const** extra_header)
{
Expand Down
2 changes: 2 additions & 0 deletions src/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ typedef sim::chrono::high_resolution_clock::duration duration;

namespace sim
{
using namespace aux;

queue::queue(asio::io_service& ios
, int bandwidth
, chrono::high_resolution_clock::duration propagation_delay
Expand Down

0 comments on commit 3959f63

Please sign in to comment.