mirror of
https://github.com/gabime/spdlog.git
synced 2025-05-01 04:33:54 +00:00
astyle+dos2unix
This commit is contained in:
parent
6a83c34426
commit
8494590fb3
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
find . -name "*\.h" -o -name "*\.cpp"|xargs astyle -A1
|
find . -name "*\.h" -o -name "*\.cpp"|xargs dos2unix
|
||||||
|
find . -name "*\.h" -o -name "*\.cpp"|xargs astyle -n -A1
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
logger my_logger ("my_logger", {null_sink});
|
logger my_logger ("my_logger", {null_sink});
|
||||||
|
|
||||||
std::string s(100, '0');
|
std::string s(100, '0');
|
||||||
const unsigned int howmany = 5000000;
|
const unsigned int howmany = 5000000;
|
||||||
auto start = system_clock::now();
|
auto start = system_clock::now();
|
||||||
for(unsigned int i = 0; i < howmany ; i++)
|
for(unsigned int i = 0; i < howmany ; i++)
|
||||||
my_logger.info() << s;
|
my_logger.info() << s;
|
||||||
//my_logger.info() << "Hello logger " << i;;
|
//my_logger.info() << "Hello logger " << i;;
|
||||||
|
|
||||||
//async->shutdown(seconds(3));
|
//async->shutdown(seconds(3));
|
||||||
auto delta = system_clock::now() - start;
|
auto delta = system_clock::now() - start;
|
||||||
|
@ -21,10 +21,10 @@ public:
|
|||||||
fast_buf():_stack_size(0) {}
|
fast_buf():_stack_size(0) {}
|
||||||
~fast_buf() {};
|
~fast_buf() {};
|
||||||
|
|
||||||
fast_buf(const bufpair_t& buf_to_copy):fast_buf()
|
fast_buf(const bufpair_t& buf_to_copy):fast_buf()
|
||||||
{
|
{
|
||||||
append(buf_to_copy);
|
append(buf_to_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
fast_buf(const fast_buf& other)
|
fast_buf(const fast_buf& other)
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
fast_buf& operator=(const fast_buf& other) = delete;
|
fast_buf& operator=(const fast_buf& other) = delete;
|
||||||
fast_buf& operator=(fast_buf&& other) = delete;
|
fast_buf& operator=(fast_buf&& other) = delete;
|
||||||
|
|
||||||
void append(const char* buf, std::size_t size)
|
void append(const char* buf, std::size_t size)
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ public:
|
|||||||
//Not enough stack space. Copy all to _v
|
//Not enough stack space. Copy all to _v
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_v.reserve(_stack_size+size);
|
_v.reserve(_stack_size+size);
|
||||||
if(_stack_size)
|
if(_stack_size)
|
||||||
_v.insert(_v.end(), _stack_buf.begin(), _stack_buf.begin() +_stack_size);
|
_v.insert(_v.end(), _stack_buf.begin(), _stack_buf.begin() +_stack_size);
|
||||||
_v.insert(_v.end(), buf, buf+size);
|
_v.insert(_v.end(), buf, buf+size);
|
||||||
@ -74,10 +74,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void append(const bufpair_t &buf)
|
void append(const bufpair_t &buf)
|
||||||
{
|
{
|
||||||
append(buf.first, buf.second);
|
append(buf.first, buf.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user