From 22cb1cdbe5ad6747628dc7fa87b16bbe18cc6086 Mon Sep 17 00:00:00 2001 From: Martin Brazeau Date: Wed, 11 Aug 2021 14:39:15 +0100 Subject: [PATCH 1/2] cast return from size() to unsigned --- ncl/nxstaxablock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncl/nxstaxablock.cpp b/ncl/nxstaxablock.cpp index 10f2c8f..7c3420f 100644 --- a/ncl/nxstaxablock.cpp +++ b/ncl/nxstaxablock.cpp @@ -276,7 +276,7 @@ void NxsTaxaBlock::CheckCapitalizedTaxonLabel( if (dimNTax < ind) { NxsString e; - e << "Number of stored labels (" << taxLabels.size() << ") exceeds the NTax specified (" << dimNTax<<")."; + e << "Number of stored labels (" (unsigned)<< taxLabels.size() << ") exceeds the NTax specified (" << dimNTax<<")."; throw NxsException(e); } if (CapitalizedTaxLabelToNumber(s) != 0) From f5178302abddc24b8d8cb17cb149a9b646f579b3 Mon Sep 17 00:00:00 2001 From: Martin Brazeau Date: Wed, 11 Aug 2021 15:50:30 +0100 Subject: [PATCH 2/2] fix stupid typo of cast position --- CMakeLists.txt | 2 ++ ncl/nxstaxablock.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60db791..8fec137 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required (VERSION 3.1) +project(ncl) + if(MSVC) # Force to always compile with W4 if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") diff --git a/ncl/nxstaxablock.cpp b/ncl/nxstaxablock.cpp index 7c3420f..1fc40d3 100644 --- a/ncl/nxstaxablock.cpp +++ b/ncl/nxstaxablock.cpp @@ -276,7 +276,7 @@ void NxsTaxaBlock::CheckCapitalizedTaxonLabel( if (dimNTax < ind) { NxsString e; - e << "Number of stored labels (" (unsigned)<< taxLabels.size() << ") exceeds the NTax specified (" << dimNTax<<")."; + e << "Number of stored labels (" << (unsigned)taxLabels.size() << ") exceeds the NTax specified (" << dimNTax<<")."; throw NxsException(e); } if (CapitalizedTaxLabelToNumber(s) != 0)