fix compile warning about unused get_download_gz_file()

get_download_gz_file() is not used when HAS_REMOTE_API=0, and causes:

warning: 'std::__cxx11::string date::get_download_gz_file(const string&)' defined but not used [-Wunused-function]

Wrap get_download_gz_file() inside #ifdef to remove the warning.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
This commit is contained in:
Tomi Valkeinen
2017-04-30 09:17:34 +03:00
committed by Howard Hinnant
parent ec7db09085
commit 44f6dfc58e

2
tz.cpp
View File

@@ -269,6 +269,7 @@ get_install()
return ref;
}
#if HAS_REMOTE_API
static
std::string
get_download_gz_file(const std::string& version)
@@ -276,6 +277,7 @@ get_download_gz_file(const std::string& version)
auto file = get_install() + version + ".tar.gz";
return file;
}
#endif // HAS_REMOTE_API
// These can be used to reduce the range of the database to save memory
CONSTDATA auto min_year = date::year::min();