qualified a load of size_ts with std:: namespace (all those not from Clara)

This commit is contained in:
Phil Nash 2017-09-18 17:13:17 +01:00
parent 40209d1ae0
commit 8da0d0473b
19 changed files with 33 additions and 33 deletions

View file

@ -19,8 +19,8 @@ namespace Catch {
class BenchmarkLooper {
std::string m_name;
size_t m_count = 0;
size_t m_iterationsToRun = 1;
std::size_t m_count = 0;
std::size_t m_iterationsToRun = 1;
uint64_t m_resolution;
Timer m_timer;

View file

@ -20,7 +20,7 @@
#include <unistd.h>
#include <sys/sysctl.h>
namespace Catch{
namespace Catch {
// The following function is taken directly from the following technical note:
// http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html
@ -31,7 +31,7 @@
int mib[4];
struct kinfo_proc info;
size_t size;
std::size_t size;
// Initialize the flags so that, if sysctl fails for some bizarre
// reason, we get a predictable result.

View file

@ -105,7 +105,7 @@ namespace Catch {
TestRunStats::~TestRunStats() = default;
void IStreamingReporter::fatalErrorEncountered( StringRef name ) {}
void IStreamingReporter::fatalErrorEncountered( StringRef ) {}
bool IStreamingReporter::isMulti() const { return false; }
IReporterFactory::~IReporterFactory() = default;

View file

@ -163,7 +163,7 @@ namespace Catch {
};
struct BenchmarkStats {
BenchmarkInfo info;
size_t iterations;
std::size_t iterations;
uint64_t elapsedTimeInNanoseconds;
};

View file

@ -78,7 +78,7 @@ namespace Matchers {
// - then just call that directly
if (m_comparator.size() != v.size())
return false;
for (size_t i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
if (m_comparator[i] != v[i])
return false;
return true;

View file

@ -72,8 +72,8 @@ namespace Catch {
}
}
inline size_t registerTestMethods() {
size_t noTestMethods = 0;
inline std::size_t registerTestMethods() {
std::size_t noTestMethods = 0;
int noClasses = objc_getClassList( nullptr, 0 );
Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);

View file

@ -135,7 +135,7 @@ namespace Catch {
std::vector<SectionEndInfo> m_unfinishedSections;
std::vector<ITracker*> m_activeSections;
TrackerContext m_trackerContext;
size_t m_prevPassed = 0;
std::size_t m_prevPassed = 0;
bool m_shouldReportUnexpected = true;
};

View file

@ -18,7 +18,7 @@
namespace Catch {
template<typename WriterF, size_t bufferSize=256>
template<typename WriterF, std::size_t bufferSize=256>
class StreamBufImpl : public StreamBufBase {
char data[bufferSize];
WriterF m_writer;

View file

@ -25,7 +25,7 @@ namespace Catch {
class StringRef {
friend struct StringRefTestAccess;
using size_type = size_t;
using size_type = std::size_t;
char const* m_start;
size_type m_size;

View file

@ -131,7 +131,7 @@ namespace Catch {
std::string TestCaseInfo::tagsAsString() const {
std::string ret;
// '[' and ']' per tag
size_t full_size = 2 * tags.size();
std::size_t full_size = 2 * tags.size();
for (const auto& tag : tags) {
full_size += tag.size();
}

View file

@ -43,7 +43,7 @@ namespace Catch {
std::vector<TestCase> m_functions;
mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder;
mutable std::vector<TestCase> m_sortedFunctions;
size_t m_unnamedCount = 0;
std::size_t m_unnamedCount = 0;
std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised
};

View file

@ -45,7 +45,7 @@ namespace Catch {
template<typename T>
void addPattern() {
std::string token = subString();
for( size_t i = 0; i < m_escapeChars.size(); ++i )
for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
m_escapeChars.clear();
if( startsWith( token, "exclude:" ) ) {

View file

@ -20,7 +20,7 @@ namespace Catch {
uint64_t sum = 0;
static const uint64_t iterations = 1000000;
for( size_t i = 0; i < iterations; ++i ) {
for( std::size_t i = 0; i < iterations; ++i ) {
uint64_t ticks;
uint64_t baseTicks = getCurrentNanosecondsSinceEpoch();