mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Converted indexing to std::size_t, and fixed the Node templated overloads to properly index any index type (determining what is an index type is a bit of a hack - it should be is_convertible<T, std::size_t> (I think), but I just explicitly wrote down a list)
This commit is contained in:
@@ -136,13 +136,13 @@ namespace YAML
|
||||
|
||||
// post-processing
|
||||
if(params.trimTrailingSpaces) {
|
||||
unsigned pos = scalar.find_last_not_of(' ');
|
||||
std::size_t pos = scalar.find_last_not_of(' ');
|
||||
if(pos < scalar.size())
|
||||
scalar.erase(pos + 1);
|
||||
}
|
||||
|
||||
if(params.chomp <= 0) {
|
||||
unsigned pos = scalar.find_last_not_of('\n');
|
||||
std::size_t pos = scalar.find_last_not_of('\n');
|
||||
if(params.chomp == 0 && pos + 1 < scalar.size())
|
||||
scalar.erase(pos + 2);
|
||||
else if(params.chomp == -1 && pos < scalar.size())
|
||||
|
Reference in New Issue
Block a user