Use the empty method to check for emptiness

This commit is contained in:
Daniel Pfeifer
2016-10-30 18:27:35 +01:00
parent 6b90e2850c
commit c58c739da7
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode(
std::string installDir = this->IEGen->GetDestination();
os << "LOCAL_PATH := $(call my-dir)\n";
size_t numDotDot = cmSystemTools::CountChar(installDir.c_str(), '/');
numDotDot += (installDir.size() > 0) ? 1 : 0;
numDotDot += installDir.empty() ? 0 : 1;
std::string path;
for (size_t n = 0; n < numDotDot; n++) {
path += "/..";