Skip to content

Commit

Permalink
Wrap initialization to satisfy older compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jun 6, 2019
1 parent b6cfcc4 commit 70dd263
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pdal/util/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,15 @@ std::string Utils::escapeJSON(const std::string &str)
{
std::string s(str);

std::array<std::string, 35> replacements
{ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004",
"\\u0005", "\\u0006", "\\u0007", "\\u0008", "\\t",
"\\n", "\\b", "\\f", "\\r", "\\u000E",
"\\u000F", "\\u0010", "\\u0011", "\\0012", "\\u0013",
"\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018",
"\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D",
"\\u001E", "\\u001F", " ", "!", "\\\"" };
std::array<std::string, 35> replacements {
{ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004",
"\\u0005", "\\u0006", "\\u0007", "\\u0008", "\\t",
"\\n", "\\b", "\\f", "\\r", "\\u000E",
"\\u000F", "\\u0010", "\\u0011", "\\0012", "\\u0013",
"\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018",
"\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D",
"\\u001E", "\\u001F", " ", "!", "\\\"" }
};
for (std::string::size_type i = 0; i < s.size();)
{
char val = s[i];
Expand Down

0 comments on commit 70dd263

Please sign in to comment.