From 2e341240ca6881993ee0b919463387a521dc02d2 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 19 Nov 2019 15:38:56 +0100 Subject: [PATCH] src: Always return a value from non void function getSearchTypeName() (#761) getSearchTypeName() needs to always return std:wstring. We cover all cases because our switch contains all current possibilities for Search_Type. But the compiler will still warn/error on this, depending on system configuration. Regards https://github.com/CoatiSoftware/Sourcetrail/issues/758 --- src/lib/data/search/SearchMatch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/data/search/SearchMatch.cpp b/src/lib/data/search/SearchMatch.cpp index 0afe0341..12404dcb 100644 --- a/src/lib/data/search/SearchMatch.cpp +++ b/src/lib/data/search/SearchMatch.cpp @@ -33,6 +33,8 @@ std::wstring SearchMatch::getSearchTypeName(SearchType type) case SEARCH_FULLTEXT: return L"fulltext"; } + + return L"none"; } std::wstring SearchMatch::searchMatchesToString(const std::vector& matches)