Skip to content

Commit

Permalink
Remove syntax checking for make_shared and vector
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 authored and MRtrixBot committed Nov 30, 2023
1 parent bf33a98 commit 09ba0fe
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions check_syntax
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ for f in $(find cmd core src -type f -name '*.h' -o -name '*.cpp' | $grep -v '_m
# remove quoted strings:
cat .check_syntax2.tmp | perl -pe 's/(")(\\"|.)*?"//g' > .check_syntax.tmp

# detect any instances of std::vector:
res="$res"$(
cat .check_syntax.tmp | \
# match for the parts we're interested in and output just the bits that match:
$grep -Po '(?<!::)std::vector\b'
)


# detect any instances of std::make_shared:
res="$res"$(
cat .check_syntax.tmp | \
# match for the parts we're interested in and output just the bits that match:
$grep -Po '(?<!::)std::make_shared\b'
)

# detect any instances of "using namespace std;":
res="$res"$(
Expand Down Expand Up @@ -126,8 +112,6 @@ else
echo "" >> $LOG
echo "Please check the following syntax requirements:
- Add MEMALIGN() or NOMEMALIGN macro to any class declarations identified above;
- Replace all occurrences of std::vector<> with MR::vector<> (or just vector<>);
- Avoid use of std::make_shared();
- Replace all instances of std::abs() with MR::abs() (or just abs());
- Replace all instances of %zu in print() calls with PRI_SIZET." >> $LOG
exit 1
Expand Down

0 comments on commit 09ba0fe

Please sign in to comment.