Skip to content
Open
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Checks: >
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
Expand Down
6 changes: 4 additions & 2 deletions src/breadthFirstSearch/binaryBreadthFirstSearch_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ pgr_do_binaryBreadthFirstSearch(
std::ostringstream err;
std::ostringstream notice;
const char *hint = nullptr;
const char c_err_msg[] = "Graph Condition Failed: Graph should have at most two distinct non-negative edge costs! "
"If there are exactly two distinct edge costs, one of them must equal zero!";
const std::string c_err_msg =
"Graph Condition Failed: Graph should have at most two distinct "
"non-negative edge costs! If there are exactly two distinct edge "
"costs, one of them must equal zero!";

try {
pgassert(!(*log_msg));
Expand Down
13 changes: 8 additions & 5 deletions src/common/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <array>
#include <string>
#include <exception>

#include <iterator>

std::string get_backtrace() {
#ifdef __GLIBC__
Expand All @@ -50,11 +50,14 @@ std::string get_backtrace() {
char** funcNames = backtrace_symbols(trace.data(), trace_size);

std::string message = "\n*** Execution path***\n";
for (i = 0; i < trace_size; ++i) {
message += "[bt]" + static_cast<std::string>(funcNames[i]) + "\n";
if (funcNames == nullptr) {
message += "[bt] backtrace_symbols failed\n";
} else {
for (i = 0; i < trace_size; ++i) {
message += "[bt]" + static_cast<std::string>(funcNames[i]) + "\n";
}
free(funcNames);
}

free(funcNames);
return message;
#else
return "";
Expand Down