mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Fix warnings on visual studio, including changing unsigned to std::size_t
This commit is contained in:
@@ -155,7 +155,7 @@ void EmitterState::EndedGroup(GroupType::value type) {
|
||||
}
|
||||
|
||||
// reset old settings
|
||||
unsigned lastIndent = (m_groups.empty() ? 0 : m_groups.top().indent);
|
||||
std::size_t lastIndent = (m_groups.empty() ? 0 : m_groups.top().indent);
|
||||
assert(m_curIndent >= lastIndent);
|
||||
m_curIndent -= lastIndent;
|
||||
|
||||
@@ -276,7 +276,7 @@ bool EmitterState::SetIntFormat(EMITTER_MANIP value, FmtScope::value scope) {
|
||||
}
|
||||
}
|
||||
|
||||
bool EmitterState::SetIndent(unsigned value, FmtScope::value scope) {
|
||||
bool EmitterState::SetIndent(std::size_t value, FmtScope::value scope) {
|
||||
if (value <= 1)
|
||||
return false;
|
||||
|
||||
@@ -284,7 +284,8 @@ bool EmitterState::SetIndent(unsigned value, FmtScope::value scope) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EmitterState::SetPreCommentIndent(unsigned value, FmtScope::value scope) {
|
||||
bool EmitterState::SetPreCommentIndent(std::size_t value,
|
||||
FmtScope::value scope) {
|
||||
if (value == 0)
|
||||
return false;
|
||||
|
||||
@@ -292,7 +293,8 @@ bool EmitterState::SetPreCommentIndent(unsigned value, FmtScope::value scope) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EmitterState::SetPostCommentIndent(unsigned value, FmtScope::value scope) {
|
||||
bool EmitterState::SetPostCommentIndent(std::size_t value,
|
||||
FmtScope::value scope) {
|
||||
if (value == 0)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user