Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/rapidcsv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* rapidcsv.h
*
* URL: https://github.com/d99kris/rapidcsv
* Version: 8.96
* Version: 8.97
*
* Copyright (C) 2017-2026 Kristofer Berggren
* All rights reserved.
Expand Down Expand Up @@ -1456,7 +1456,8 @@ namespace rapidcsv
{
mData.resize(rowIdx + 1);
}
auto& row = mData[rowIdx];

std::vector<std::string>& row = mData[rowIdx];
if (dataColumnIdx >= row.size())
{
row.resize(dataColumnIdx + 1);
Expand Down Expand Up @@ -1527,7 +1528,8 @@ namespace rapidcsv
{
mData.resize(dataRowIdx + 1);
}
auto& row = mData[dataRowIdx];

std::vector<std::string>& row = mData[dataRowIdx];
if (mLabelParams.mRowNameIdx >= static_cast<int>(row.size()))
{
row.resize(static_cast<size_t>(mLabelParams.mRowNameIdx) + 1);
Expand Down Expand Up @@ -1892,7 +1894,9 @@ namespace rapidcsv
str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](unsigned char ch) { return !isspace(ch); }));

// rtrim
str.erase(std::find_if(str.rbegin(), str.rend(), [](unsigned char ch) { return !isspace(ch); }).base(), str.end());
str.erase(std::find_if(str.rbegin(), str.rend(), [](unsigned char ch) {
return !isspace(ch);
}).base(), str.end());

return str;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ptest001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ptest002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test003.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test004.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test005.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test006.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test007.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test008.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test009.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test010.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test011.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test012.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test013.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test014.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test015.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test016.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test017.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test018.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test019.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test020.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test021.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test022.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test023.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test024.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test025.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test026.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test027.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test028.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test029.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test030.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test031.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test032.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test033.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test034.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test035.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test036.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test037.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test038.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main()
}
catch (const std::exception& ex)
{
std::cout << ex.what() << std::endl;
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}

Expand Down
Loading
Loading