mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Fix warnings on visual studio, including changing unsigned to std::size_t
This commit is contained in:
@@ -66,23 +66,23 @@ bool Emitter::SetMapFormat(EMITTER_MANIP value) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool Emitter::SetIndent(unsigned n) {
|
||||
bool Emitter::SetIndent(std::size_t n) {
|
||||
return m_pState->SetIndent(n, FmtScope::Global);
|
||||
}
|
||||
|
||||
bool Emitter::SetPreCommentIndent(unsigned n) {
|
||||
bool Emitter::SetPreCommentIndent(std::size_t n) {
|
||||
return m_pState->SetPreCommentIndent(n, FmtScope::Global);
|
||||
}
|
||||
|
||||
bool Emitter::SetPostCommentIndent(unsigned n) {
|
||||
bool Emitter::SetPostCommentIndent(std::size_t n) {
|
||||
return m_pState->SetPostCommentIndent(n, FmtScope::Global);
|
||||
}
|
||||
|
||||
bool Emitter::SetFloatPrecision(unsigned n) {
|
||||
bool Emitter::SetFloatPrecision(std::size_t n) {
|
||||
return m_pState->SetFloatPrecision(n, FmtScope::Global);
|
||||
}
|
||||
|
||||
bool Emitter::SetDoublePrecision(unsigned n) {
|
||||
bool Emitter::SetDoublePrecision(std::size_t n) {
|
||||
return m_pState->SetDoublePrecision(n, FmtScope::Global);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ void Emitter::PrepareTopNode(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::FlowSeqPrepareNode(EmitterNodeType::value child) {
|
||||
const unsigned lastIndent = m_pState->LastIndent();
|
||||
const std::size_t lastIndent = m_pState->LastIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
if (m_stream.comment())
|
||||
@@ -341,8 +341,8 @@ void Emitter::FlowSeqPrepareNode(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::BlockSeqPrepareNode(EmitterNodeType::value child) {
|
||||
const unsigned curIndent = m_pState->CurIndent();
|
||||
const unsigned nextIndent = curIndent + m_pState->CurGroupIndent();
|
||||
const std::size_t curIndent = m_pState->CurIndent();
|
||||
const std::size_t nextIndent = curIndent + m_pState->CurGroupIndent();
|
||||
|
||||
if (child == EmitterNodeType::None)
|
||||
return;
|
||||
@@ -392,7 +392,7 @@ void Emitter::FlowMapPrepareNode(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::FlowMapPrepareLongKey(EmitterNodeType::value child) {
|
||||
const unsigned lastIndent = m_pState->LastIndent();
|
||||
const std::size_t lastIndent = m_pState->LastIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
if (m_stream.comment())
|
||||
@@ -423,7 +423,7 @@ void Emitter::FlowMapPrepareLongKey(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::FlowMapPrepareLongKeyValue(EmitterNodeType::value child) {
|
||||
const unsigned lastIndent = m_pState->LastIndent();
|
||||
const std::size_t lastIndent = m_pState->LastIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
if (m_stream.comment())
|
||||
@@ -451,7 +451,7 @@ void Emitter::FlowMapPrepareLongKeyValue(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::FlowMapPrepareSimpleKey(EmitterNodeType::value child) {
|
||||
const unsigned lastIndent = m_pState->LastIndent();
|
||||
const std::size_t lastIndent = m_pState->LastIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
if (m_stream.comment())
|
||||
@@ -482,7 +482,7 @@ void Emitter::FlowMapPrepareSimpleKey(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::FlowMapPrepareSimpleKeyValue(EmitterNodeType::value child) {
|
||||
const unsigned lastIndent = m_pState->LastIndent();
|
||||
const std::size_t lastIndent = m_pState->LastIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
if (m_stream.comment())
|
||||
@@ -530,7 +530,7 @@ void Emitter::BlockMapPrepareNode(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::BlockMapPrepareLongKey(EmitterNodeType::value child) {
|
||||
const unsigned curIndent = m_pState->CurIndent();
|
||||
const std::size_t curIndent = m_pState->CurIndent();
|
||||
const std::size_t childCount = m_pState->CurGroupChildCount();
|
||||
|
||||
if (child == EmitterNodeType::None)
|
||||
@@ -563,7 +563,7 @@ void Emitter::BlockMapPrepareLongKey(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::BlockMapPrepareLongKeyValue(EmitterNodeType::value child) {
|
||||
const unsigned curIndent = m_pState->CurIndent();
|
||||
const std::size_t curIndent = m_pState->CurIndent();
|
||||
|
||||
if (child == EmitterNodeType::None)
|
||||
return;
|
||||
@@ -589,7 +589,7 @@ void Emitter::BlockMapPrepareLongKeyValue(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::BlockMapPrepareSimpleKey(EmitterNodeType::value child) {
|
||||
const unsigned curIndent = m_pState->CurIndent();
|
||||
const std::size_t curIndent = m_pState->CurIndent();
|
||||
const std::size_t childCount = m_pState->CurGroupChildCount();
|
||||
|
||||
if (child == EmitterNodeType::None)
|
||||
@@ -617,8 +617,8 @@ void Emitter::BlockMapPrepareSimpleKey(EmitterNodeType::value child) {
|
||||
}
|
||||
|
||||
void Emitter::BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child) {
|
||||
const unsigned curIndent = m_pState->CurIndent();
|
||||
const unsigned nextIndent = curIndent + m_pState->CurGroupIndent();
|
||||
const std::size_t curIndent = m_pState->CurIndent();
|
||||
const std::size_t nextIndent = curIndent + m_pState->CurGroupIndent();
|
||||
|
||||
if (!m_pState->HasBegunNode()) {
|
||||
m_stream << ":";
|
||||
@@ -642,7 +642,7 @@ void Emitter::BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child) {
|
||||
|
||||
// SpaceOrIndentTo
|
||||
// . Prepares for some more content by proper spacing
|
||||
void Emitter::SpaceOrIndentTo(bool requireSpace, unsigned indent) {
|
||||
void Emitter::SpaceOrIndentTo(bool requireSpace, std::size_t indent) {
|
||||
if (m_stream.comment())
|
||||
m_stream << "\n";
|
||||
if (m_stream.col() > 0 && requireSpace)
|
||||
@@ -709,11 +709,11 @@ Emitter& Emitter::Write(const std::string& str) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
unsigned Emitter::GetFloatPrecision() const {
|
||||
std::size_t Emitter::GetFloatPrecision() const {
|
||||
return m_pState->GetFloatPrecision();
|
||||
}
|
||||
|
||||
unsigned Emitter::GetDoublePrecision() const {
|
||||
std::size_t Emitter::GetDoublePrecision() const {
|
||||
return m_pState->GetDoublePrecision();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user