diff options
| author | Mike Taves <mwtoews@gmail.com> | 2020-04-07 21:07:09 +1200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-04-07 22:01:10 +0200 |
| commit | 2eac355c7354547a7b1038fe3ebb661a1c7b302f (patch) | |
| tree | 38068aedfdd32599961344278ea2af5f3db3cea8 /src | |
| parent | 0853daaeb117c227db9c648785f3f81ef85956a3 (diff) | |
| download | PROJ-2eac355c7354547a7b1038fe3ebb661a1c7b302f.tar.gz PROJ-2eac355c7354547a7b1038fe3ebb661a1c7b302f.zip | |
Test GCC 4.8 and CMake 3.9; resolve a few shadowed declaration warnings
Diffstat (limited to 'src')
| -rw-r--r-- | src/filemanager.cpp | 14 | ||||
| -rw-r--r-- | src/filemanager.hpp | 2 | ||||
| -rw-r--r-- | src/grids.cpp | 10 | ||||
| -rw-r--r-- | src/iso19111/datum.cpp | 20 |
4 files changed, 23 insertions, 23 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp index d7c55fba..5904c4fb 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -70,7 +70,7 @@ NS_PROJ_START // --------------------------------------------------------------------------- -File::File(const std::string &name) : name_(name) {} +File::File(const std::string &filename) : name_(filename) {} // --------------------------------------------------------------------------- @@ -716,8 +716,8 @@ class FileStdio : public File { FileStdio &operator=(const FileStdio &) = delete; protected: - FileStdio(const std::string &name, PJ_CONTEXT *ctx, FILE *fp) - : File(name), m_ctx(ctx), m_fp(fp) {} + FileStdio(const std::string &filename, PJ_CONTEXT *ctx, FILE *fp) + : File(filename), m_ctx(ctx), m_fp(fp) {} public: ~FileStdio() override; @@ -796,8 +796,8 @@ class FileLegacyAdapter : public File { FileLegacyAdapter &operator=(const FileLegacyAdapter &) = delete; protected: - FileLegacyAdapter(const std::string &name, PJ_CONTEXT *ctx, PAFile fp) - : File(name), m_ctx(ctx), m_fp(fp) {} + FileLegacyAdapter(const std::string &filename, PJ_CONTEXT *ctx, PAFile fp) + : File(filename), m_ctx(ctx), m_fp(fp) {} public: ~FileLegacyAdapter() override; @@ -863,9 +863,9 @@ class FileApiAdapter : public File { FileApiAdapter &operator=(const FileApiAdapter &) = delete; protected: - FileApiAdapter(const std::string &name, PJ_CONTEXT *ctx, + FileApiAdapter(const std::string &filename, PJ_CONTEXT *ctx, PROJ_FILE_HANDLE *fp) - : File(name), m_ctx(ctx), m_fp(fp) {} + : File(filename), m_ctx(ctx), m_fp(fp) {} public: ~FileApiAdapter() override; diff --git a/src/filemanager.hpp b/src/filemanager.hpp index 233c657c..04bab901 100644 --- a/src/filemanager.hpp +++ b/src/filemanager.hpp @@ -78,7 +78,7 @@ class File { std::string name_; std::string readLineBuffer_{}; bool eofReadLine_ = false; - explicit File(const std::string &name); + explicit File(const std::string &filename); public: virtual PROJ_DLL ~File(); diff --git a/src/grids.cpp b/src/grids.cpp index c5fc6c74..58183e9e 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -96,9 +96,9 @@ bool ExtentAndRes::intersects(const ExtentAndRes &other) const { // --------------------------------------------------------------------------- -Grid::Grid(const std::string &name, int widthIn, int heightIn, +Grid::Grid(const std::string &nameIn, int widthIn, int heightIn, const ExtentAndRes &extentIn) - : m_name(name), m_width(widthIn), m_height(heightIn), m_extent(extentIn) {} + : m_name(nameIn), m_width(widthIn), m_height(heightIn), m_extent(extentIn) {} // --------------------------------------------------------------------------- @@ -479,7 +479,7 @@ GTiffGrid::GTiffGrid(PJ_CONTEXT *ctx, TIFF *hTIFF, BlockCache &cache, File *fp, std::string value; value.append(endTag + 1, endValue - (endTag + 1)); - std::string name; + std::string gridName; auto namePos = tag.find("name=\""); if (namePos == std::string::npos) break; @@ -488,7 +488,7 @@ GTiffGrid::GTiffGrid(PJ_CONTEXT *ctx, TIFF *hTIFF, BlockCache &cache, File *fp, const auto endQuote = tag.find('"', namePos); if (endQuote == std::string::npos) break; - name = tag.substr(namePos, endQuote - namePos); + gridName = tag.substr(namePos, endQuote - namePos); } const auto samplePos = tag.find("sample=\""); @@ -497,7 +497,7 @@ GTiffGrid::GTiffGrid(PJ_CONTEXT *ctx, TIFF *hTIFF, BlockCache &cache, File *fp, sample = atoi(tag.c_str() + samplePos + strlen("sample=\"")); } - m_metadata[std::pair<int, std::string>(sample, name)] = value; + m_metadata[std::pair<int, std::string>(sample, gridName)] = value; auto rolePos = tag.find("role=\""); if (rolePos != std::string::npos) { diff --git a/src/iso19111/datum.cpp b/src/iso19111/datum.cpp index 1dbe2cab..6f115908 100644 --- a/src/iso19111/datum.cpp +++ b/src/iso19111/datum.cpp @@ -203,10 +203,10 @@ void Datum::setAnchor(const util::optional<std::string> &anchor) { void Datum::setProperties( const util::PropertyMap &properties) // throw(InvalidValueTypeException) { - std::string publicationDate; - properties.getStringValue("PUBLICATION_DATE", publicationDate); - if (!publicationDate.empty()) { - d->publicationDate = common::DateTime::create(publicationDate); + std::string publicationDateResult; + properties.getStringValue("PUBLICATION_DATE", publicationDateResult); + if (!publicationDateResult.empty()) { + d->publicationDate = common::DateTime::create(publicationDateResult); } ObjectUsage::setProperties(properties); } @@ -1376,13 +1376,13 @@ bool GeodeticReferenceFrame::hasEquivalentNameToUsingAlias( if (dbContext) { if (!identifiers().empty()) { const auto &id = identifiers().front(); - auto aliases = + auto aliasesResult = dbContext->getAliases(*(id->codeSpace()), id->code(), nameStr(), "geodetic_datum", std::string()); const char *otherName = other->nameStr().c_str(); - for (const auto &alias : aliases) { + for (const auto &aliasResult : aliasesResult) { if (metadata::Identifier::isEquivalentName(otherName, - alias.c_str())) { + aliasResult.c_str())) { return true; } } @@ -1395,13 +1395,13 @@ bool GeodeticReferenceFrame::hasEquivalentNameToUsingAlias( return false; } - auto aliases = + auto aliasesResult = dbContext->getAliases(std::string(), std::string(), nameStr(), "geodetic_datum", std::string()); const char *otherName = other->nameStr().c_str(); - for (const auto &alias : aliases) { + for (const auto &aliasResult : aliasesResult) { if (metadata::Identifier::isEquivalentName(otherName, - alias.c_str())) { + aliasResult.c_str())) { return true; } } |
