Merge pull request #221 from andrewgaul/compare

Compare idiomatically
This commit is contained in:
Takeshi Nakatani 2015-08-12 23:41:24 +09:00
commit 64146f69a4

View File

@ -659,7 +659,7 @@ size_t S3fsCurl::HeaderCallback(void* data, size_t blockSize, size_t numBlocks,
// Force to lower, only "x-amz" // Force to lower, only "x-amz"
string lkey = key; string lkey = key;
transform(lkey.begin(), lkey.end(), lkey.begin(), static_cast<int (*)(int)>(std::tolower)); transform(lkey.begin(), lkey.end(), lkey.begin(), static_cast<int (*)(int)>(std::tolower));
if(lkey.substr(0, 5) == "x-amz"){ if(lkey.compare(0, 5, "x-amz") == 0){
key = lkey; key = lkey;
} }
string value; string value;