Fix warnings on visual studio, including changing unsigned to std::size_t

This commit is contained in:
Jesse Beder
2015-01-24 14:38:22 -06:00
parent ad712c4f2d
commit 0c8a539361
12 changed files with 66 additions and 58 deletions

View File

@@ -7,25 +7,27 @@
#pragma once
#endif
#include "yaml-cpp/ostream_wrapper.h"
#include <iostream>
#include <cstddef>
#include "yaml-cpp/ostream_wrapper.h"
namespace YAML {
struct Indentation {
Indentation(unsigned n_) : n(n_) {}
unsigned n;
Indentation(std::size_t n_) : n(n_) {}
std::size_t n;
};
inline ostream_wrapper& operator<<(ostream_wrapper& out,
const Indentation& indent) {
for (unsigned i = 0; i < indent.n; i++)
for (std::size_t i = 0; i < indent.n; i++)
out << ' ';
return out;
}
struct IndentTo {
IndentTo(unsigned n_) : n(n_) {}
unsigned n;
IndentTo(std::size_t n_) : n(n_) {}
std::size_t n;
};
inline ostream_wrapper& operator<<(ostream_wrapper& out,