From 5b9ac3082b4f90e8645052692ed26decc9889ecb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 26 May 2020 21:25:29 +0530 Subject: [PATCH] Fix a couple of compiler warnings with MSVC --- src/calibre/srv/html_as_json.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/srv/html_as_json.cpp b/src/calibre/srv/html_as_json.cpp index 0dbf58d542..34c3c2fd55 100644 --- a/src/calibre/srv/html_as_json.cpp +++ b/src/calibre/srv/html_as_json.cpp @@ -244,10 +244,10 @@ class Serializer { inline int namespace_index(const char *ns, size_t nslen) { for (size_t i = 0; i < this->nsmap.size(); i++) { - if (namespaces_are_equal(this->nsmap[i].c_str(), ns, nslen)) return i; + if (namespaces_are_equal(this->nsmap[i].c_str(), ns, nslen)) return (int)i; } this->nsmap.push_back(std::string(ns, nslen)); - return this->nsmap.size() - 1; + return ((int)(this->nsmap.size())) - 1; } bool