Skip to content

Conversation

cvvergara
Copy link
Member

@cvvergara cvvergara commented Apr 25, 2025

Fixes #2869

Changes proposed in this pull request:

  • char* -> const char*

@pgRouting/admins

Summary by CodeRabbit

  • Documentation
  • Style
    • Improved const-correctness across multiple functions by updating input string parameters to be immutable, enhancing code safety and reliability.
  • Bug Fixes
    • No user-facing bug fixes included.
  • Chores
    • Updated translation metadata timestamps.

Copy link
Contributor

coderabbitai bot commented Apr 25, 2025

Walkthrough

This change updates the signatures of numerous C++ driver functions and related code in the pgRouting project to use const char* instead of char* for SQL query string parameters. This enforces const-correctness, ensuring that input SQL strings are not modified within these functions. The update is reflected in both header and implementation files across all relevant drivers and utility functions. Accompanying documentation, translation files, and release notes have also been updated to mention these enhancements and reference the associated issue. No logic, control flow, or exported behavior is otherwise altered.

Changes

Files/Paths Change Summary
NEWS.md, doc/src/release_notes.rst, locale/en/LC_MESSAGES/pgrouting_doc_strings.po, locale/pot/pgrouting_doc_strings.pot Documentation and translation updates: added release note for "Other enhancements" referencing #2869.
include/cpp_common/combinations.hpp, src/cpp_common/combinations.cpp Changed get_combinations parameter from char* to const char*.
include/drivers/..._driver.h, src/..._driver.cpp (all drivers: astar, bdAstar, bdDijkstra, bellman_ford, etc.) Changed all SQL string parameters (e.g., edges_sql, combinations_sql) from char* to const char* in function signatures and corresponding implementation files. Also updated local hint variables to const char* where applicable.
(All other driver header and source files, e.g., pickDeliver, trsp, tsp, withPoints, ksp, etc.) Same as above: updated SQL string parameters to const char* and adjusted local variables for const-correctness.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant DriverFunction
    Note over Caller,DriverFunction: Example: pgr_do_astar, pgr_do_dijkstra, etc.
    Caller->>DriverFunction: Call with const char* sql_query
    DriverFunction->>DriverFunction: Uses sql_query (read-only)
    DriverFunction-->>Caller: Returns result (does not modify sql_query)
Loading

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Use const char* for all SQL query parameters in driver functions (#2869)

Suggested labels

Code Cleanup

Suggested reviewers

  • robe2

Poem

A hop and a skip, with a nibble of code,
Const-correctness now lightens our load.
No more will queries be changed by mistake,
For const char* keeps them safe in its wake.
With every driver now tidy and neat,
This rabbit declares: the code is a treat!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@robe2 robe2 self-requested a review April 25, 2025 02:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
src/bellman_ford/bellman_ford_neg_driver.cpp (1)

119-119: ⚠️ Potential issue

Potential logic error (unrelated to PR changes)

There appears to be a logic error in the condition edges.size() + neg_edges.empty(). This adds a size to a boolean value, which may not behave as intended. The condition likely should be checking if both edge collections are empty.

-        if (edges.size() + neg_edges.empty()) {
+        if (edges.empty() && neg_edges.empty()) {
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6095575 and 654526d.

📒 Files selected for processing (107)
  • NEWS.md (1 hunks)
  • doc/src/release_notes.rst (1 hunks)
  • include/cpp_common/combinations.hpp (1 hunks)
  • include/drivers/allpairs/floydWarshall_driver.h (1 hunks)
  • include/drivers/allpairs/johnson_driver.h (1 hunks)
  • include/drivers/alpha_shape/alphaShape_driver.h (1 hunks)
  • include/drivers/astar/astar_driver.h (1 hunks)
  • include/drivers/bdAstar/bdAstar_driver.h (1 hunks)
  • include/drivers/bdDijkstra/bdDijkstra_driver.h (1 hunks)
  • include/drivers/bellman_ford/bellman_ford_driver.h (1 hunks)
  • include/drivers/bellman_ford/bellman_ford_neg_driver.h (1 hunks)
  • include/drivers/bellman_ford/edwardMoore_driver.h (1 hunks)
  • include/drivers/breadthFirstSearch/binaryBreadthFirstSearch_driver.h (1 hunks)
  • include/drivers/breadthFirstSearch/breadthFirstSearch_driver.h (1 hunks)
  • include/drivers/chinese/chinesePostman_driver.h (1 hunks)
  • include/drivers/circuits/hawickCircuits_driver.h (1 hunks)
  • include/drivers/coloring/bipartite_driver.h (1 hunks)
  • include/drivers/coloring/edgeColoring_driver.h (1 hunks)
  • include/drivers/coloring/sequentialVertexColoring_driver.h (1 hunks)
  • include/drivers/components/articulationPoints_driver.h (1 hunks)
  • include/drivers/components/biconnectedComponents_driver.h (1 hunks)
  • include/drivers/components/bridges_driver.h (1 hunks)
  • include/drivers/components/connectedComponents_driver.h (1 hunks)
  • include/drivers/components/makeConnected_driver.h (1 hunks)
  • include/drivers/components/strongComponents_driver.h (1 hunks)
  • include/drivers/contraction/contractGraph_driver.h (1 hunks)
  • include/drivers/contraction/contractionHierarchies_driver.h (1 hunks)
  • include/drivers/dagShortestPath/dagShortestPath_driver.h (1 hunks)
  • include/drivers/dijkstra/dijkstraVia_driver.h (1 hunks)
  • include/drivers/dijkstra/dijkstra_driver.h (1 hunks)
  • include/drivers/dominator/lengauerTarjanDominatorTree_driver.h (1 hunks)
  • include/drivers/driving_distance/driving_distance_driver.h (1 hunks)
  • include/drivers/driving_distance/driving_distance_withPoints_driver.h (1 hunks)
  • include/drivers/lineGraph/lineGraphFull_driver.h (1 hunks)
  • include/drivers/lineGraph/lineGraph_driver.h (1 hunks)
  • include/drivers/max_flow/edge_disjoint_paths_driver.h (1 hunks)
  • include/drivers/max_flow/max_flow_driver.h (1 hunks)
  • include/drivers/max_flow/maximum_cardinality_matching_driver.h (1 hunks)
  • include/drivers/max_flow/minCostMaxFlow_driver.h (1 hunks)
  • include/drivers/metrics/betweennessCentrality_driver.h (1 hunks)
  • include/drivers/mincut/stoerWagner_driver.h (1 hunks)
  • include/drivers/ordering/cuthillMckeeOrdering_driver.h (1 hunks)
  • include/drivers/pickDeliver/pickDeliverEuclidean_driver.h (1 hunks)
  • include/drivers/pickDeliver/pickDeliver_driver.h (1 hunks)
  • include/drivers/planar/boyerMyrvold_driver.h (1 hunks)
  • include/drivers/planar/isPlanar_driver.h (1 hunks)
  • include/drivers/spanningTree/kruskal_driver.h (1 hunks)
  • include/drivers/spanningTree/prim_driver.h (1 hunks)
  • include/drivers/spanningTree/randomSpanningTree_driver.h (1 hunks)
  • include/drivers/topologicalSort/topologicalSort_driver.h (1 hunks)
  • include/drivers/transitiveClosure/transitiveClosure_driver.h (1 hunks)
  • include/drivers/traversal/depthFirstSearch_driver.h (1 hunks)
  • include/drivers/trsp/trspVia_driver.h (1 hunks)
  • include/drivers/trsp/trspVia_withPoints_driver.h (1 hunks)
  • include/drivers/trsp/trsp_driver.h (1 hunks)
  • include/drivers/trsp/trsp_withPoints_driver.h (1 hunks)
  • include/drivers/tsp/TSP_driver.h (1 hunks)
  • include/drivers/tsp/euclideanTSP_driver.h (1 hunks)
  • include/drivers/withPoints/withPointsVia_driver.h (1 hunks)
  • include/drivers/withPoints/withPoints_driver.h (1 hunks)
  • include/drivers/yen/ksp_driver.h (1 hunks)
  • include/drivers/yen/turnRestrictedPath_driver.h (1 hunks)
  • include/drivers/yen/withPoints_ksp_driver.h (1 hunks)
  • locale/en/LC_MESSAGES/pgrouting_doc_strings.po (2 hunks)
  • locale/pot/pgrouting_doc_strings.pot (2 hunks)
  • src/allpairs/floydWarshall_driver.cpp (2 hunks)
  • src/allpairs/johnson_driver.cpp (2 hunks)
  • src/alpha_shape/alphaShape_driver.cpp (2 hunks)
  • src/astar/astar_driver.cpp (2 hunks)
  • src/bdAstar/bdAstar_driver.cpp (2 hunks)
  • src/bdDijkstra/bdDijkstra_driver.cpp (2 hunks)
  • src/bellman_ford/bellman_ford_driver.cpp (2 hunks)
  • src/bellman_ford/bellman_ford_neg_driver.cpp (2 hunks)
  • src/bellman_ford/edwardMoore_driver.cpp (2 hunks)
  • src/breadthFirstSearch/binaryBreadthFirstSearch_driver.cpp (2 hunks)
  • src/breadthFirstSearch/breadthFirstSearch_driver.cpp (2 hunks)
  • src/chinese/chinesePostman_driver.cpp (2 hunks)
  • src/circuits/hawickCircuits_driver.cpp (2 hunks)
  • src/coloring/bipartite_driver.cpp (2 hunks)
  • src/coloring/edgeColoring_driver.cpp (2 hunks)
  • src/coloring/sequentialVertexColoring_driver.cpp (2 hunks)
  • src/components/articulationPoints_driver.cpp (2 hunks)
  • src/components/biconnectedComponents_driver.cpp (2 hunks)
  • src/components/bridges_driver.cpp (2 hunks)
  • src/components/connectedComponents_driver.cpp (2 hunks)
  • src/components/makeConnected_driver.cpp (2 hunks)
  • src/components/strongComponents_driver.cpp (2 hunks)
  • src/contraction/contractGraph_driver.cpp (2 hunks)
  • src/contraction/contractionHierarchies_driver.cpp (2 hunks)
  • src/cpp_common/combinations.cpp (1 hunks)
  • src/dagShortestPath/dagShortestPath_driver.cpp (2 hunks)
  • src/dijkstra/dijkstraVia_driver.cpp (2 hunks)
  • src/dijkstra/dijkstra_driver.cpp (2 hunks)
  • src/dominator/lengauerTarjanDominatorTree_driver.cpp (2 hunks)
  • src/driving_distance/driving_distance_driver.cpp (2 hunks)
  • src/driving_distance/driving_distance_withPoints_driver.cpp (2 hunks)
  • src/ksp/ksp_driver.cpp (2 hunks)
  • src/ksp/turnRestrictedPath_driver.cpp (2 hunks)
  • src/ksp/withPoints_ksp_driver.cpp (2 hunks)
  • src/lineGraph/lineGraphFull_driver.cpp (2 hunks)
  • src/lineGraph/lineGraph_driver.cpp (2 hunks)
  • src/max_flow/edge_disjoint_paths_driver.cpp (2 hunks)
  • src/max_flow/max_flow_driver.cpp (3 hunks)
  • src/max_flow/maximum_cardinality_matching_driver.cpp (2 hunks)
  • src/max_flow/minCostMaxFlow_driver.cpp (2 hunks)
  • src/metrics/betweennessCentrality_driver.cpp (2 hunks)
  • src/mincut/stoerWagner_driver.cpp (2 hunks)
⛔ Files not processed due to max files limit (21)
  • src/ordering/cuthillMckeeOrdering_driver.cpp
  • src/pickDeliver/pickDeliver.c
  • src/pickDeliver/pickDeliverEuclidean_driver.cpp
  • src/pickDeliver/pickDeliver_driver.cpp
  • src/planar/boyerMyrvold_driver.cpp
  • src/planar/isPlanar_driver.cpp
  • src/spanningTree/kruskal_driver.cpp
  • src/spanningTree/prim.c
  • src/spanningTree/prim_driver.cpp
  • src/spanningTree/randomSpanningTree_driver.cpp
  • src/topologicalSort/topologicalSort_driver.cpp
  • src/transitiveClosure/transitiveClosure_driver.cpp
  • src/traversal/depthFirstSearch_driver.cpp
  • src/trsp/trspVia_driver.cpp
  • src/trsp/trspVia_withPoints_driver.cpp
  • src/trsp/trsp_driver.cpp
  • src/trsp/trsp_withPoints_driver.cpp
  • src/tsp/TSP_driver.cpp
  • src/tsp/euclideanTSP_driver.cpp
  • src/withPoints/withPointsVia_driver.cpp
  • src/withPoints/withPoints_driver.cpp
👮 Files not reviewed due to content moderation or server errors (1)
  • locale/en/LC_MESSAGES/pgrouting_doc_strings.po
🧰 Additional context used
🧠 Learnings (1)
include/drivers/contraction/contractionHierarchies_driver.h (1)
Learnt from: cvvergara
PR: pgRouting/pgrouting#2868
File: src/contraction/contractionHierarchies_driver.cpp:47-56
Timestamp: 2025-04-25T00:59:52.550Z
Learning: In pgRouting, driver functions like `pgr_contractionHierarchies` assume that callers within the project will pass valid non-null pointers, as these functions are only used internally with well-defined call patterns. Null checks on the pointers themselves (as opposed to their dereferenced values) are considered unnecessary since the caller is guaranteed to pass references to variables.
🧬 Code Graph Analysis (1)
src/max_flow/max_flow_driver.cpp (2)
include/cpp_common/alloc.hpp (2)
  • to_pg_msg (90-90)
  • to_pg_msg (91-91)
src/common/alloc.cpp (4)
  • to_pg_msg (34-42)
  • to_pg_msg (35-35)
  • to_pg_msg (44-47)
  • to_pg_msg (45-45)
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Ubuntu clang
  • GitHub Check: macos (macos-14)
  • GitHub Check: Check queries
  • GitHub Check: Check for changelog entry
  • GitHub Check: Ubuntu Boost (83)
  • GitHub Check: Ubuntu Boost (75)
  • GitHub Check: Ubuntu Boost (79)
  • GitHub Check: Ubuntu Boost (86)
  • GitHub Check: Ubuntu Boost (56)
  • GitHub Check: Ubuntu Boost (78)
  • GitHub Check: Ubuntu Boost (77)
  • GitHub Check: Ubuntu Boost (76)
  • GitHub Check: Ubuntu Boost (84)
  • GitHub Check: Ubuntu Boost (68)
🔇 Additional comments (144)
include/drivers/planar/boyerMyrvold_driver.h (1)

46-46: Great improvement to const-correctness!

Changing the function parameter from char* to const char* is a solid improvement that explicitly indicates this SQL query string is not modified within the function. This enforces const-correctness, which improves code safety and makes the API intent clearer to users.

include/drivers/pickDeliver/pickDeliver_driver.h (1)

49-51: Excellent use of const-correctness

The change from char* to const char* for the SQL query string parameters is a good improvement. This enforces that these input parameters won't be modified by the function, which:

  1. Prevents unintended modification of input strings
  2. Makes the API intent clearer
  3. Potentially enables compiler optimizations
  4. Aligns with modern C++ best practices
include/drivers/pickDeliver/pickDeliverEuclidean_driver.h (1)

49-50: Good implementation of const-correctness

The change from char* to const char* for these input SQL query string parameters is appropriate and consistent with the changes in other driver files. This properly enforces immutability of input strings and improves the safety of the API.

include/drivers/tsp/TSP_driver.h (1)

53-53: Approve change to const char*

Changing the parameter type from char* to const char* improves const-correctness, ensuring that the SQL query string passed to this function cannot be modified within the function. This is good practice in C++ and aligns with the PR objective of improving code safety.

include/drivers/tsp/euclideanTSP_driver.h (1)

52-52: Approve change to const char*

This change from char* to const char* enforces immutability of the input SQL query string, improving const-correctness. This is consistent with modern C++ best practices and matches the pattern applied across other drivers in this PR. The change helps prevent unintended modification of input parameters.

include/drivers/transitiveClosure/transitiveClosure_driver.h (1)

45-47: Enforce const-correctness on SQL input parameter
The change from char* to const char* for the first parameter correctly prevents modification of the input SQL string within pgr_do_transitiveClosure. This aligns with the PR objective to improve const-correctness across driver APIs.

include/drivers/ordering/cuthillMckeeOrdering_driver.h (1)

53-53: Parameter type change to enforce const-correctness.

The change from char* to const char* properly enforces that the SQL query string won't be modified within the function implementation, which is good practice for parameters that should be treated as immutable input.

include/drivers/max_flow/max_flow_driver.h (1)

62-63: Parameter types changed to enforce const-correctness.

Changing both SQL string parameters from char* to const char* properly enforces that the SQL query strings won't be modified within the function implementation. This enhances type safety and communicates the intended immutability of these parameters.

NEWS.md (1)

71-72: Documentation updated to reference const-correctness enhancements.

The NEWS file has been appropriately updated to document the const-correctness improvements, making reference to issue #2869. This properly informs users about the code enhancements in the 3.8.0 release.

doc/src/release_notes.rst (1)

100-101: Good addition to release notes.

The addition of issue #2869 to the C/C++ code enhancements section properly documents the const-correctness improvements being made in this PR.

include/cpp_common/combinations.hpp (1)

70-70: Proper use of const to enforce immutability.

Changing the parameter from char* to const char* correctly indicates that the function won't modify the SQL string passed to it. This improves type safety and makes the interface more expressive about its intentions.

include/drivers/allpairs/johnson_driver.h (1)

51-51: Good const-correctness improvement.

The modification of the parameter from char* to const char* enhances code safety by properly indicating that the input SQL string won't be modified within the function. This is a beneficial change that aligns with good C++ practices.

locale/pot/pgrouting_doc_strings.pot (2)

11-11: Updated timestamp for translation template.

The POT-Creation-Date has been updated to reflect when this translation template was regenerated.


3604-3606: New documentation entry for enhancement from PR.

This new entry adds documentation for issue #2869 under the "Other enhancements" section, which corresponds to the const char* modifications in driver code as mentioned in the PR objectives.

include/drivers/components/bridges_driver.h (1)

49-49: Good change: Improved const correctness

Changing the SQL query parameter from char* to const char* properly enforces that the input string won't be modified by the function. This improves type safety and makes the function's behavior more explicit.

include/drivers/coloring/bipartite_driver.h (1)

50-50: LGTM: Proper const qualification for SQL string

Changing the parameter type to const char* correctly indicates that the SQL query string is only read from and not modified within the function, following good C++ practices.

include/drivers/coloring/edgeColoring_driver.h (1)

48-48: Approved: Appropriate const correctness

Good change - adding const to the SQL string parameter type properly communicates to callers that this function won't modify the string passed to it.

include/drivers/allpairs/floydWarshall_driver.h (1)

52-52: Good improvement for const correctness

This change correctly applies const-qualification to the SQL query string parameter, ensuring immutability and preventing accidental modification of the input string.

include/drivers/components/makeConnected_driver.h (1)

48-48: Great improvement to const correctness!

Changing the parameter type from char* to const char* correctly enforces that this SQL query string won't be modified within the function implementation. This is an excellent practice that improves code safety and helps prevent accidental modification of input data.

include/drivers/mincut/stoerWagner_driver.h (1)

49-49: Correctly enforcing const-correctness

The change from char* to const char* properly indicates that the SQL query string is not modified within the function, which aligns with best practices for handling string input parameters in C++. This improvement enhances code quality and helps prevent unintended modifications.

include/drivers/topologicalSort/topologicalSort_driver.h (1)

47-47: Good use of const for immutable inputs

Changing to const char* correctly indicates that this SQL string parameter won't be modified by the function. This is a proper implementation of const-correctness and follows modern C++ best practices for API design.

include/drivers/components/strongComponents_driver.h (1)

48-48: Appropriate use of const qualifier

Proper modification from char* to const char* for the SQL query string parameter. This change maintains consistency with the other driver header files and correctly enforces that the input string won't be modified, improving both code safety and readability.

include/drivers/lineGraph/lineGraphFull_driver.h (1)

48-48: Positive improvement to function signature to enforce const-correctness

Changing the parameter type from char* to const char* is a good practice that ensures the SQL query string won't be modified within the function. This improves type safety and documents the intent clearly.

include/drivers/components/connectedComponents_driver.h (1)

48-48: Well-implemented const-correctness improvement

This change from char* to const char* for the SQL query parameter properly enforces that the string won't be modified by the function, which aligns with the PR's objective of improving code safety.

include/drivers/components/articulationPoints_driver.h (1)

51-51: Good change to enforce immutability of input string

Converting this parameter from char* to const char* is appropriate since SQL query strings shouldn't be modified by the function. This change is consistent with modern C++ best practices.

include/drivers/spanningTree/kruskal_driver.h (1)

62-62: Properly implemented const-correctness for multiple parameters

The change from char* to const char* for both the SQL query parameter (line 62) and the third parameter (line 65) correctly enforces immutability for these string inputs, enhancing type safety and API clarity.

Also applies to: 65-65

include/drivers/metrics/betweennessCentrality_driver.h (1)

52-52: Good change for const-correctness

Changing the first parameter type from char* to const char* improves type safety by explicitly indicating that the input SQL string parameter won't be modified within the function. This follows best practices for const-correctness in C++.

include/drivers/circuits/hawickCircuits_driver.h (1)

48-48: Good change for const-correctness

Changing the first parameter type from char* to const char* improves type safety by explicitly indicating that the input SQL string parameter won't be modified within the function. This follows best practices for const-correctness in C++.

include/drivers/chinese/chinesePostman_driver.h (1)

49-49: Good change for const-correctness

Changing the first parameter type from char* to const char* improves type safety by explicitly indicating that the input SQL string parameter won't be modified within the function. This follows best practices for const-correctness in C++.

include/drivers/alpha_shape/alphaShape_driver.h (1)

42-42: Good change for const-correctness

Changing the first parameter type from char* to const char* improves type safety by explicitly indicating that the input SQL string parameter won't be modified within the function. This follows best practices for const-correctness in C++.

include/drivers/planar/isPlanar_driver.h (1)

42-42: Good improvement to const-correctness!

Changing the parameter type from char* to const char* ensures that the SQL string passed to pgr_do_isPlanar cannot be modified within the function, which is the correct behavior since SQL query strings should typically be read-only inputs.

include/drivers/lineGraph/lineGraph_driver.h (1)

50-50: Well-implemented const-correctness enhancement

This change correctly updates the first parameter to const char*, indicating that the SQL query string passed to pgr_do_lineGraph will not be modified by the function. This is a good practice for parameters that should be treated as read-only inputs.

include/drivers/dominator/lengauerTarjanDominatorTree_driver.h (1)

51-51: Appropriate const-correctness implementation

Converting the SQL query parameter to const char* is the right approach here. This makes the intention clear that the input string should not be modified within the function implementation, which aligns with best practices for treating SQL queries as immutable inputs.

include/drivers/dijkstra/dijkstraVia_driver.h (1)

62-62: Correctly implemented const-correctness

Changing the parameter type to const char* properly enforces that the SQL query string will be treated as read-only, which is the expected behavior for such inputs. This change improves type safety and makes the function's intent clearer to callers.

include/drivers/coloring/sequentialVertexColoring_driver.h (1)

47-49: Excellent improvement to const-correctness!

Changing the parameter type from char* to const char* is appropriate since SQL query strings shouldn't be modified by the function. This promotes safer code, allows direct passing of string literals, and clearly communicates API contract.

include/drivers/components/biconnectedComponents_driver.h (1)

50-52: Good consistent application of const-correctness!

Changing the first parameter from char* to const char* is the right approach for immutable SQL query strings. This change maintains consistency with other driver functions and prevents accidental modification of input strings.

include/drivers/spanningTree/prim_driver.h (1)

62-67: Appropriate const-correctness applied to both string parameters!

The changes from char* to const char* for both string parameters (lines 63 and 66) are good improvements. This ensures that neither the SQL query string nor the other string parameter can be accidentally modified within the function implementation.

include/drivers/contraction/contractGraph_driver.h (1)

61-63: Well-implemented const-correctness!

Changing the SQL query string parameter from char* to const char* is appropriate and consistent with the pattern applied throughout the codebase. This enhances code safety by preventing unintended modification of the input string.

include/drivers/spanningTree/randomSpanningTree_driver.h (1)

61-61: Appropriate const-correctness improvement

Converting the SQL query parameter from char* to const char* properly enforces that the function won't modify the input string. This is a good practice that enhances type safety and makes the API contract clearer.

include/drivers/driving_distance/driving_distance_driver.h (1)

61-61: Sound const-correctness improvement

Converting the SQL query parameter from char* to const char* correctly enforces that the function won't modify the input string. This enhances type safety and clarifies the function's contract with the caller.

include/drivers/breadthFirstSearch/breadthFirstSearch_driver.h (1)

64-64: Proper const-correctness improvement

Converting the SQL query parameter from char* to const char* is an appropriate change that enforces immutability of the input string. This improves code safety and makes the function's interface more precise.

include/drivers/bdDijkstra/bdDijkstra_driver.h (1)

63-64: Well-implemented const-correctness for multiple parameters

Converting both SQL query parameters from char* to const char* properly enforces that these input strings won't be modified. This is consistent with good C++ practices and improves the API safety.

include/drivers/trsp/trsp_driver.h (1)

63-66: Appropriate use of const correctness for input SQL parameters

The change from char* to const char* for the first three parameters is a good improvement. This correctly enforces that these SQL query strings are read-only within the function, preventing accidental modifications and following best practices for const correctness in C/C++ programming.

include/drivers/max_flow/maximum_cardinality_matching_driver.h (1)

47-48: Appropriate const correctness for SQL query parameter

The change from char* to const char* for the SQL query parameter properly indicates that this string won't be modified within the function. This improves type safety and follows good C/C++ programming practices for const correctness.

include/drivers/traversal/depthFirstSearch_driver.h (1)

63-64: Proper const correctness applied to SQL query parameter

The modification from char* to const char* for the first parameter is appropriate. This enforces that the SQL query string won't be modified within the function, which follows good programming practices and improves code safety.

include/drivers/bellman_ford/bellman_ford_driver.h (1)

62-64: Correctly applied const correctness to SQL query parameters

The change from char* to const char* for the first two parameters is appropriate. This ensures that these SQL query strings are treated as read-only inputs within the function implementation, preventing unintended modifications and adhering to const correctness principles.

include/drivers/trsp/trspVia_driver.h (1)

60-61: Excellent const correctness improvement

The change from char* to const char* for SQL query strings is a welcome improvement, ensuring the function doesn't modify these input parameters and signaling this intent to callers.

include/drivers/bellman_ford/edwardMoore_driver.h (1)

62-63: Proper const correctness for SQL parameters

Converting the SQL query string parameters from char* to const char* is a good practice that enforces immutability of these inputs.

include/drivers/max_flow/edge_disjoint_paths_driver.h (1)

63-64: Good const-correctness for SQL strings

Changing the SQL query parameters from char* to const char* properly indicates these strings won't be modified within the function, improving type safety.

include/drivers/contraction/contractionHierarchies_driver.h (1)

61-61: Appropriate const-correctness for SQL parameter

Converting the SQL query string from char* to const char* properly enforces immutability of this input parameter. This change aligns with the pattern seen across the codebase in this PR.

include/drivers/max_flow/minCostMaxFlow_driver.h (1)

64-65: Parameter types correctly changed to const char*

Good change! Modifying these parameters from char* to const char* improves const-correctness by explicitly indicating that the SQL query strings are not modified within the function. This is a best practice in C++ that makes the code safer and more self-documenting.

include/drivers/bdAstar/bdAstar_driver.h (1)

62-63: Appropriate use of const char* for SQL parameters

Good job changing these parameters from char* to const char*. This enforces const-correctness by making it clear that the SQL query strings are read-only inputs that won't be modified by the function. This change matches the PR's objective of improving code safety.

include/drivers/yen/ksp_driver.h (1)

63-64: Correctly implemented const-correctness for SQL parameters

Good improvement! Changing these parameters from char* to const char* aligns with best practices in C++ by explicitly indicating that the SQL query strings are immutable inputs. This makes the function signature more accurate and prevents potential modification of the input strings.

include/drivers/dagShortestPath/dagShortestPath_driver.h (1)

64-65: Proper implementation of const-correctness

Excellent change! Using const char* instead of char* for these SQL query parameters enforces immutability of the input strings, which is the correct approach when the function does not need to modify the inputs. This improves type safety and aligns with modern C++ best practices.

src/allpairs/floydWarshall_driver.cpp (2)

45-45: Good improvement to const-correctness for SQL parameter

Changing edges_sql from char* to const char* is an appropriate enhancement since the function doesn't modify the SQL string. This enforces immutability and improves type safety.


57-57: Consistent update to maintain const-correctness

Updating the hint variable to const char* aligns with the parameter change and maintains consistent const-correctness throughout the function.

include/drivers/dijkstra/dijkstra_driver.h (1)

68-69: Appropriate const-correctness improvements in function declaration

Changing both SQL string parameters to const char* properly reflects that these input strings shouldn't be modified by the function. This is a good practice that enforces immutability in the function interface.

include/drivers/astar/astar_driver.h (1)

62-63: Good const-correctness enhancement for SQL parameters

Changing both SQL string parameters to const char* is appropriate since these are input-only parameters that shouldn't be modified. This change aligns with the project-wide initiative to improve const-correctness in driver interfaces.

src/cpp_common/combinations.cpp (1)

138-138: Appropriate const qualifier for combinations_sql parameter

The addition of const to the combinations_sql parameter correctly enforces that this input string won't be modified. The parameter is only used for reading in line 154, so this change improves type safety without affecting functionality.

include/drivers/withPoints/withPointsVia_driver.h (1)

63-65: Good improvement to const-correctness

Changing these parameter types from char* to const char* is a positive enhancement that ensures the SQL query strings cannot be modified within the function. This improves type safety and makes the API more explicit about its intentions.

include/drivers/breadthFirstSearch/binaryBreadthFirstSearch_driver.h (1)

63-64: Correctly enforcing immutability of input parameters

The change from char* to const char* correctly enforces that these SQL query strings are treated as read-only within the function implementation. This is consistent with best practices for API design and prevents accidental modification of input strings.

include/drivers/yen/turnRestrictedPath_driver.h (1)

52-53: Proper use of const for input-only parameters

Good change to mark these SQL string parameters as const char*. This clarifies the interface by indicating that these strings are not modified by the function, improving type safety without affecting functionality.

include/drivers/driving_distance/driving_distance_withPoints_driver.h (1)

65-67: Appropriate const-correctness improvement

Updating these parameters to const char* correctly enforces that the SQL strings are not modified by the function. This change is consistent with the pattern applied throughout the codebase and follows good C++ practices for parameter passing.

src/components/articulationPoints_driver.cpp (2)

47-47: Good change for const-correctness.

Changing edges_sql from char* to const char* correctly indicates that this function doesn't modify the input SQL string. This improves type safety and makes the function's intent clearer.


62-62: Appropriate matching type update.

Updating the hint variable from char* to const char* maintains type consistency with the now-const parameter. Since hint only stores a reference for error reporting and is never modified, this is the correct approach.

include/drivers/trsp/trsp_withPoints_driver.h (1)

61-65: Good const-correctness improvements for function signature.

Changing all five SQL string parameters from char* to const char* properly enforces immutability for these input arguments. This better communicates that these strings are inputs only and won't be modified by the function.

src/lineGraph/lineGraph_driver.cpp (2)

59-59: Good const-correctness update for input parameter.

Changing edges_sql from char* to const char* correctly indicates that this function treats the SQL string as immutable input. This improves type safety and aligns with modern C++ best practices.


74-74: Appropriate matching type update for internal variable.

Updating the hint variable to const char* maintains consistency with the parameter type. Since it's only used to store the SQL string for error reporting, marking it as const is the correct approach.

include/drivers/withPoints/withPoints_driver.h (1)

62-65: Good const-correctness improvements for function interface.

Changing all four SQL string parameters from char* to const char* properly enforces immutability for these input strings. This makes the function interface clearer and safer by preventing accidental modification of input data.

include/drivers/yen/withPoints_ksp_driver.h (1)

66-69: Improved const-correctness in function signature.

The conversion of the first four parameters from char* to const char* is a good practice. This change explicitly indicates that these SQL query string parameters are not modified within the function, which enhances type safety and provides better guarantees to callers.

src/components/strongComponents_driver.cpp (2)

48-48: Good change to const-correctness for input parameter.

Converting edges_sql to const char* is appropriate since this parameter represents an SQL query string that shouldn't be modified by the function.


63-63: Consistent update of hint variable to match parameter type.

Correctly updated the hint variable from char* to const char* to maintain type consistency with the parameter it references.

include/drivers/bellman_ford/bellman_ford_neg_driver.h (1)

62-64: Improved const-correctness in function signature.

The conversion of the first three parameters from char* to const char* is appropriate as these represent SQL query strings that shouldn't be modified by the function.

include/drivers/trsp/trspVia_withPoints_driver.h (1)

63-66: Enhanced const-correctness for input SQL parameters.

Converting the first four parameters from char* to const char* is a good practice since these SQL query strings shouldn't be modified by the function.

src/metrics/betweennessCentrality_driver.cpp (2)

44-44: Good use of const-correctness on input parameter

The change from char* to const char* for the edges_sql parameter appropriately enforces that the SQL query string should not be modified within the function, improving type safety.


56-56: Appropriate const declaration for hint variable

Changing the hint variable from char* to const char* maintains type consistency with the input parameter and properly reflects that this is an immutable pointer to string data.

src/coloring/sequentialVertexColoring_driver.cpp (2)

59-59: Good use of const-correctness on input parameter

The change from char* to const char* for the edges_sql parameter correctly reflects that this SQL string should not be modified within the function, improving type safety.


74-74: Appropriate const declaration for hint variable

Changing the hint variable from char* to const char* maintains type consistency with the input parameter and properly reflects that this is an immutable pointer to string data.

src/max_flow/maximum_cardinality_matching_driver.cpp (2)

50-50: Good use of const-correctness on input parameter

The change from char* to const char* for the edges_sql parameter correctly enforces that this SQL string should not be modified within the function.


67-67: Appropriate const declaration for hint variable

Changing the hint variable from char* to const char* maintains type consistency with the input parameter and properly reflects that this is an immutable pointer to string data.

src/mincut/stoerWagner_driver.cpp (2)

56-56: Good use of const-correctness on input parameter

The change from char* to const char* for the edges_sql parameter appropriately enforces that the SQL query string should not be modified within the function, improving type safety.


70-70: Appropriate const declaration for hint variable

Changing the hint variable from char* to const char* maintains type consistency with the input parameter and properly reflects that this is an immutable pointer to string data.

src/alpha_shape/alphaShape_driver.cpp (2)

66-66: Good use of const-correctness on input parameter

The change from char* to const char* for the edges_sql parameter correctly reflects that this SQL string should not be modified within the function, improving type safety.


82-82: Appropriate const declaration for hint variable

Changing the hint variable from char* to const char* maintains type consistency with the input parameter and properly reflects that this is an immutable pointer to string data.

src/components/connectedComponents_driver.cpp (1)

47-47: Enforce const-correctness for SQL input and hint pointer
The change from char* to const char* for the edges_sql parameter and the hint variable correctly enforces immutability of the input query string. Ensure the corresponding declaration in drivers/components/connectedComponents_driver.h has been updated to match this new signature.

Also applies to: 62-62

src/circuits/hawickCircuits_driver.cpp (1)

63-63: Apply const-correctness to input SQL and hint
Switching edges_sql and hint to const char* prevents unintended modifications to the query string. Please confirm that the header drivers/circuits/hawickCircuits_driver.h reflects this update.

Also applies to: 79-79

src/coloring/bipartite_driver.cpp (1)

48-48: Improve const-safety for SQL parameter and hint
Changing the edges_sql parameter and hint local to const char* is a correct const-correctness improvement. Verify that the signature in drivers/coloring/bipartite_driver.h is also updated accordingly.

Also applies to: 62-62

src/lineGraph/lineGraphFull_driver.cpp (1)

71-71: Enforce immutability of SQL string and hint
Updating edges_sql and hint to const char* properly signals that the SQL text is not modified. Ensure drivers/lineGraph/lineGraphFull_driver.h matches this signature change.

Also applies to: 84-84

src/components/biconnectedComponents_driver.cpp (1)

48-48: Apply const-correctness to input parameter and hint
The switch to const char* for edges_sql and the local hint variable correctly enforces immutability. Please confirm the header drivers/components/biconnectedComponents_driver.h has been updated as well.

Also applies to: 63-63

src/coloring/edgeColoring_driver.cpp (2)

41-41: Excellent use of const-correctness.

Changing the edges_sql parameter to const char* enforces immutability of the input SQL string, which is a good practice since this function doesn't modify the string.


56-56: Good alignment with parameter const-ness.

Updating the hint variable to const char* maintains consistent const-correctness with the input parameter. This ensures type safety throughout the function.

src/dominator/lengauerTarjanDominatorTree_driver.cpp (2)

49-49: Proper const-correctness applied.

The change to const char* for the edges_sql parameter is appropriate since the input SQL string is not modified within this function.


65-65: Consistent type safety implementation.

Changing the hint variable to const char* aligns with the parameter change and maintains type safety throughout the error handling flow.

src/allpairs/johnson_driver.cpp (2)

45-45: Good improvement to type safety.

Converting the edges_sql parameter to const char* correctly enforces that the input SQL string is not modified within this function.


56-56: Appropriate update for const-correctness.

The change of hint to const char* properly aligns with the parameter change and ensures type safety in error reporting.

src/components/bridges_driver.cpp (2)

47-47: Properly enforced const-correctness.

Changing the edges_sql parameter to const char* correctly signals that this function doesn't modify the input SQL string.


61-61: Consistent type safety across variables.

Updating the hint variable to const char* maintains const-correctness alignment with the function parameters and improves type safety.

src/chinese/chinesePostman_driver.cpp (2)

47-47: Enforce const-correctness on SQL parameter
Changing the edges_sql parameter from char * to const char * prevents accidental modification of the input SQL string and strengthens API safety.


61-61: Make hint pointer immutable
Updating the local hint variable to const char * aligns it with the immutable edges_sql and avoids unintended writes to the hint string.

src/components/makeConnected_driver.cpp (2)

45-45: Apply const-correctness to edges_sql
Switching the edges_sql parameter to const char * ensures that the SQL query string remains read-only within pgr_do_makeConnected.


61-61: Update hint to const char*
Changing hint to const char * maintains consistency with the immutable SQL input and prevents modification of the hint pointer.

src/breadthFirstSearch/breadthFirstSearch_driver.cpp (2)

59-59: Improve const-correctness for edges_sql
Refactoring edges_sql to const char * enforces immutability of the SQL string in pgr_do_breadthFirstSearch.


77-77: Make hint pointer const
Updating hint to const char * aligns it with the read-only SQL input and avoids accidental writes.

src/breadthFirstSearch/binaryBreadthFirstSearch_driver.cpp (2)

126-127: Enforce const on SQL input parameters
Changing both edges_sql and combinations_sql to const char * ensures neither of the input query strings can be modified within pgr_do_binaryBreadthFirstSearch.


147-147: Convert hint to const char*
Updating the hint variable to const char * matches the immutability of the SQL inputs and prevents unintended mutation.

src/driving_distance/driving_distance_driver.cpp (2)

48-48: Switch edges_sql to const char*
Updating edges_sql to a const char * parameter reinforces that the SQL string is not modified by pgr_do_drivingDistance.


67-67: Make hint immutable
Changing hint to const char * keeps the hint pointer consistent with the now read-only SQL input.

src/contraction/contractionHierarchies_driver.cpp (2)

49-49: Appropriate const-correctness update to parameter

The change to const char *edges_sql is correct as the function doesn't modify the SQL query string. This enforces const-correctness and improves type safety.


66-66: Appropriate const-correctness update to hint variable

The local hint variable is updated to const char * to maintain consistency with the function parameters. This is a good change as hint points to immutable SQL strings used only for error reporting.

src/max_flow/minCostMaxFlow_driver.cpp (2)

50-51: Good SQL parameter const-correctness improvement

Changing both SQL string parameters (edges_sql and combinations_sql) to const char * enforces that these input strings won't be modified by the function, which aligns with how they're actually used.


69-69: Appropriate const update to hint variable

The hint variable is properly updated to const char * to maintain type consistency with the function parameters it points to.

src/bellman_ford/edwardMoore_driver.cpp (2)

68-69: Proper const-correctness update to SQL parameters

Good change to both SQL string parameters, ensuring they're treated as immutable inputs as intended.


90-90: Consistent update to the hint pointer

The hint variable is correctly changed to const char * for consistency with the const parameters it references.

src/bellman_ford/bellman_ford_neg_driver.cpp (2)

68-70: Good const-correctness improvement to all SQL parameters

All three SQL string parameters are properly updated to const char *, which correctly enforces that these input strings won't be modified within the function.


92-92: Consistent hint variable update

The hint local variable is appropriately changed to const char * to align with the parameters it references.

src/bellman_ford/bellman_ford_driver.cpp (2)

68-69: Good improvement to const-correctness in function parameters

The change from char* to const char* for the SQL query parameters enhances type safety by explicitly indicating these strings won't be modified within the function.


90-90: Correct update to local hint variable

Changing hint to const char* maintains consistency with the function parameters and properly reflects the immutable nature of the string data it points to.

src/ksp/ksp_driver.cpp (2)

49-50: Good improvement to const-correctness in function parameters

The change from char* to const char* for the SQL query parameters enhances type safety by explicitly indicating these strings won't be modified within the function.


75-75: Correct update to local hint variable

Changing hint to const char* maintains consistency with the function parameters and properly reflects the immutable nature of the string data it points to.

src/bdDijkstra/bdDijkstra_driver.cpp (2)

83-84: Good improvement to const-correctness in function parameters

The change from char* to const char* for the SQL query parameters enhances type safety by explicitly indicating these strings won't be modified within the function.


105-105: Correct update to local hint variable

Changing hint to const char* maintains consistency with the function parameters and properly reflects the immutable nature of the string data it points to.

src/max_flow/edge_disjoint_paths_driver.cpp (2)

75-76: Good improvement to const-correctness in function parameters

The change from char* to const char* for the SQL query parameters enhances type safety by explicitly indicating these strings won't be modified within the function.


93-93: Correct update to local hint variable

Changing hint to const char* maintains consistency with the function parameters and properly reflects the immutable nature of the string data it points to.

src/contraction/contractGraph_driver.cpp (2)

137-137: Enforce const-correctness in SQL string parameter
Updating the edges_sql parameter to const char* prevents accidental modification of the input SQL. Please ensure the corresponding function declaration in contractGraph_driver.h is updated to match this change.


158-158: Use const char* for internal hint tracking
Changing the local hint variable to const char* aligns with the immutable nature of SQL strings passed into the function and avoids unnecessary casts.

src/dijkstra/dijkstra_driver.cpp (2)

107-108: Improve const-correctness on SQL inputs
Switching both edges_sql and combinations_sql to const char* enforces immutability of the SQL query strings. Confirm that the header declaration (dijkstra_driver.h) has been updated accordingly.


133-133: Local hint should be const char*
Updating the hint pointer to const char* correctly reflects that it refers to immutable message strings and enhances const-safety internally.

src/dagShortestPath/dagShortestPath_driver.cpp (2)

65-66: Enforce immutability on SQL string parameters
Changing both edges_sql and combinations_sql parameters to const char* is a safe const-correctness improvement. Make sure the header dagShortestPath_driver.h signature is in sync.


89-89: Declare internal hint as const char*
This update ensures that hint accurately represents a pointer to constant strings, improving type safety.

src/astar/astar_driver.cpp (2)

49-50: Convert SQL parameters to const char*
Updating edges_sql and combinations_sql to const char* prevents accidental data mutation and aligns with modern C++ best practices. Verify the corresponding header is updated.


72-72: Use const char* for hint
Reflecting the immutability of the message pointers by declaring hint as const char* enhances code clarity and safety.

src/driving_distance/driving_distance_withPoints_driver.cpp (2)

52-54: Apply const-correctness to SQL inputs
Updating edges_sql, points_sql, and edges_of_points_sql to const char* parameters enforces immutability of the SQL strings. Ensure the driver header is updated to match these signatures.


81-81: Declare hint as const char*
Changing the internal hint pointer to const char* aligns with its role as an immutable message reference and avoids mutable pointer types.

src/bdAstar/bdAstar_driver.cpp (2)

50-51: Good improvement of const-correctness for SQL query parameters.

The change from char* to const char* for SQL query parameters edges_sql and combinations_sql properly enforces immutability of these input strings, improving type safety.


73-73: Consistent const-correctness for hint variable.

Changing hint from char* to const char* maintains consistency with the parameter changes and properly reflects that the hint pointer references immutable string data.

src/ksp/turnRestrictedPath_driver.cpp (2)

82-83: Good improvement of const-correctness for SQL query parameters.

Properly changing edges_sql and restrictions_sql from char* to const char* enforces immutability of these input strings in the driver function signature.


112-112: Consistent const-correctness for hint variable.

The local hint variable is correctly updated to const char* to maintain consistency with the parameter types and accurately reflect its usage as a pointer to immutable string data.

src/dijkstra/dijkstraVia_driver.cpp (2)

93-93: Good improvement of const-correctness for SQL query parameter.

Changing edges_sql from char* to const char* properly enforces that the SQL query string won't be modified within the function.


114-114: Consistent const-correctness for hint variable.

Updating the hint variable to const char* maintains type consistency with the parameter changes and properly reflects its usage as a pointer to immutable string data.

src/max_flow/max_flow_driver.cpp (3)

48-49: Good improvement of const-correctness for SQL query parameters.

The change from char* to const char* for SQL query parameters edges_sql and combinations_sql properly enforces immutability of these input strings.


68-68: Consistent const-correctness for hint variable.

Changing hint from char* to const char* maintains consistency with the parameter types and accurately reflects its usage pattern.


108-108: Fixed inconsistent error message handling.

Good fix: The change from directly assigning edges_sql to using to_pg_msg(edges_sql) ensures proper memory allocation and consistent error message handling throughout the codebase.

src/ksp/withPoints_ksp_driver.cpp (2)

51-54: Excellent improvement to const-correctness

The parameter types have been updated from char* to const char* for SQL query strings, which properly enforces that these strings should not be modified by the function. This is a good C++ practice that improves type safety and documents the intended usage of these parameters.


83-83: LGTM: Appropriate const-correctness for hint variable

Changing hint to const char* correctly aligns with its usage in the code, as it's only used to point to constant string data and is never modified.

@cvvergara cvvergara merged commit 30c1aad into pgRouting:main Apr 25, 2025
26 checks passed
@cvvergara cvvergara deleted the change-to-const-char-v3.8 branch April 25, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drivers should use const char* on the queries sql
2 participants