Modified for TravisCI
This commit is contained in:
		
							parent
							
								
									494c0a9b60
								
							
						
					
					
						commit
						a8cce9e7e9
					
				@ -9,7 +9,6 @@
 | 
				
			|||||||
#include <cstdlib>
 | 
					#include <cstdlib>
 | 
				
			||||||
#include <fstream>
 | 
					#include <fstream>
 | 
				
			||||||
#include <iostream>
 | 
					#include <iostream>
 | 
				
			||||||
#include <memory>
 | 
					 | 
				
			||||||
#include <thread>
 | 
					#include <thread>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef Debug
 | 
					#ifdef Debug
 | 
				
			||||||
@ -109,8 +108,8 @@ void compress(const std::string &t_in_file, const char *t_out_file) {
 | 
				
			|||||||
  while (input_file.read(chunk.data(),
 | 
					  while (input_file.read(chunk.data(),
 | 
				
			||||||
                         static_cast<std::streamsize>(chunk.size()))) {
 | 
					                         static_cast<std::streamsize>(chunk.size()))) {
 | 
				
			||||||
    threads.emplace_back(nullptr, uvec{});
 | 
					    threads.emplace_back(nullptr, uvec{});
 | 
				
			||||||
    threads.back().first = std::make_unique<std::thread>(
 | 
					    threads.back().first = std::unique_ptr<std::thread>(
 | 
				
			||||||
        std::thread{lzw_compress, chunk, ref(threads.back().second)});
 | 
					        new std::thread{lzw_compress, chunk, ref(threads.back().second)});
 | 
				
			||||||
    assert(threads.back().first);
 | 
					    assert(threads.back().first);
 | 
				
			||||||
    if (threads.size() >= 8) {
 | 
					    if (threads.size() >= 8) {
 | 
				
			||||||
      join_and_write(threads, out);
 | 
					      join_and_write(threads, out);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user