mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 19:22:25 +01:00
Use bulk vector::insert rather than back_inserter
This commit is contained in:
parent
4ec8d53e91
commit
394bc2b2cf
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "catch_context.h"
|
#include "catch_context.h"
|
||||||
|
|
||||||
#include <iterator>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -124,7 +123,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
void move( CompositeGenerator& other ) {
|
void move( CompositeGenerator& other ) {
|
||||||
std::copy( other.m_composed.begin(), other.m_composed.end(), std::back_inserter( m_composed ) );
|
m_composed.insert( m_composed.end(), other.m_composed.begin(), other.m_composed.end() );
|
||||||
m_totalSize += other.m_totalSize;
|
m_totalSize += other.m_totalSize;
|
||||||
other.m_composed.clear();
|
other.m_composed.clear();
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,10 @@
|
|||||||
#include "catch_compiler_capabilities.h"
|
#include "catch_compiler_capabilities.h"
|
||||||
#include "catch_ptr.hpp"
|
#include "catch_ptr.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iterator>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
@ -290,12 +289,12 @@ namespace TestCaseTracking {
|
|||||||
if( !filters.empty() ) {
|
if( !filters.empty() ) {
|
||||||
m_filters.push_back(""); // Root - should never be consulted
|
m_filters.push_back(""); // Root - should never be consulted
|
||||||
m_filters.push_back(""); // Test Case - not a section filter
|
m_filters.push_back(""); // Test Case - not a section filter
|
||||||
std::copy( filters.begin(), filters.end(), std::back_inserter( m_filters ) );
|
m_filters.insert( m_filters.end(), filters.begin(), filters.end() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void addNextFilters( std::vector<std::string> const& filters ) {
|
void addNextFilters( std::vector<std::string> const& filters ) {
|
||||||
if( filters.size() > 1 )
|
if( filters.size() > 1 )
|
||||||
std::copy( filters.begin()+1, filters.end(), std::back_inserter( m_filters ) );
|
m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user