astyle+dos2unix
This commit is contained in:
		@@ -1,4 +1,5 @@
 | 
			
		||||
#!/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});
 | 
			
		||||
 | 
			
		||||
	std::string s(100, '0');
 | 
			
		||||
	const unsigned int howmany = 5000000;
 | 
			
		||||
    std::string s(100, '0');
 | 
			
		||||
    const unsigned int howmany = 5000000;
 | 
			
		||||
    auto start = system_clock::now();
 | 
			
		||||
    for(unsigned int i = 0; i < howmany ; i++)
 | 
			
		||||
		my_logger.info() << s;
 | 
			
		||||
        //my_logger.info() << "Hello logger " << i;;
 | 
			
		||||
        my_logger.info() << s;
 | 
			
		||||
    //my_logger.info() << "Hello logger " << i;;
 | 
			
		||||
 | 
			
		||||
    //async->shutdown(seconds(3));
 | 
			
		||||
    auto delta = system_clock::now() - start;
 | 
			
		||||
 
 | 
			
		||||
@@ -21,10 +21,10 @@ public:
 | 
			
		||||
    fast_buf():_stack_size(0) {}
 | 
			
		||||
    ~fast_buf() {};
 | 
			
		||||
 | 
			
		||||
	fast_buf(const bufpair_t& buf_to_copy):fast_buf()
 | 
			
		||||
	{
 | 
			
		||||
		append(buf_to_copy);
 | 
			
		||||
	}
 | 
			
		||||
    fast_buf(const bufpair_t& buf_to_copy):fast_buf()
 | 
			
		||||
    {
 | 
			
		||||
        append(buf_to_copy);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fast_buf(const fast_buf& other)
 | 
			
		||||
    {
 | 
			
		||||
@@ -46,7 +46,7 @@ public:
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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)
 | 
			
		||||
    {
 | 
			
		||||
@@ -66,7 +66,7 @@ public:
 | 
			
		||||
            //Not enough stack space. Copy all to _v
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
				_v.reserve(_stack_size+size);
 | 
			
		||||
                _v.reserve(_stack_size+size);
 | 
			
		||||
                if(_stack_size)
 | 
			
		||||
                    _v.insert(_v.end(), _stack_buf.begin(), _stack_buf.begin() +_stack_size);
 | 
			
		||||
                _v.insert(_v.end(), buf, buf+size);
 | 
			
		||||
@@ -74,10 +74,10 @@ public:
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	void append(const bufpair_t &buf)
 | 
			
		||||
	{
 | 
			
		||||
		append(buf.first, buf.second);
 | 
			
		||||
	}
 | 
			
		||||
    void append(const bufpair_t &buf)
 | 
			
		||||
    {
 | 
			
		||||
        append(buf.first, buf.second);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void clear()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user