Browse Source

Added const to SourceRange constructor parameters

merge-requests/37/head
eidheim 8 years ago
parent
commit
b242f8d6a7
  1. 2
      src/SourceRange.cc
  2. 2
      src/SourceRange.h

2
src/SourceRange.cc

@ -1,6 +1,6 @@
#include "SourceRange.h" #include "SourceRange.h"
clangmm::SourceRange::SourceRange(clangmm::SourceLocation &start, clangmm::SourceLocation &end) { clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) {
cx_range = clang_getRange(start.cx_location, end.cx_location); cx_range = clang_getRange(start.cx_location, end.cx_location);
} }

2
src/SourceRange.h

@ -9,7 +9,7 @@ namespace clangmm {
class SourceRange { class SourceRange {
public: public:
SourceRange(const CXSourceRange& cx_range) : cx_range(cx_range) {} SourceRange(const CXSourceRange& cx_range) : cx_range(cx_range) {}
SourceRange(SourceLocation &start, SourceLocation &end); SourceRange(const SourceLocation &start, const SourceLocation &end);
SourceLocation get_start() const; SourceLocation get_start() const;
SourceLocation get_end() const; SourceLocation get_end() const;
std::pair<clangmm::Offset, clangmm::Offset> get_offsets() const; std::pair<clangmm::Offset, clangmm::Offset> get_offsets() const;

Loading…
Cancel
Save