From 3484198ade25e8d5e212fa160961660c41c8cd97 Mon Sep 17 00:00:00 2001 From: "M. Petra Baranski" Date: Tue, 19 Feb 2019 02:43:09 +0100 Subject: [PATCH] appveyor - use debug --- appveyor.yml | 2 +- include/maddy/blockparser.h | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c45d392..e8842c3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,4 +12,4 @@ build: project: $(APPVEYOR_BUILD_FOLDER)\tmp\$(APPVEYOR_PROJECT_NAME).sln test_script: - - cmd: ctest -VV -C "Release" + - cmd: ctest -VV -C "Debug" diff --git a/include/maddy/blockparser.h b/include/maddy/blockparser.h index 5aeed5f..9df4fa6 100644 --- a/include/maddy/blockparser.h +++ b/include/maddy/blockparser.h @@ -157,24 +157,26 @@ protected: { bool hasMetNonSpace = false; - uint32_t indentation = std::count_if( - line.begin(), - line.end(), - [&hasMetNonSpace](unsigned char c) - { - if (hasMetNonSpace) + uint32_t indentation = static_cast( + std::count_if( + line.begin(), + line.end(), + [&hasMetNonSpace](unsigned char c) { + if (hasMetNonSpace) + { + return false; + } + + if (std::isspace(c)) + { + return true; + } + + hasMetNonSpace = true; return false; } - - if (std::isspace(c)) - { - return true; - } - - hasMetNonSpace = true; - return false; - } + ) ); return indentation;