mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-07 03:37:50 +00:00
Simplify inline function removal during source/function parsing
- If inlines are included, we don't do anything since they are disguised already as normal functions - If inlines are NOT included, we remove anything that has inline in it
This commit is contained in:
@@ -236,13 +236,8 @@ class CMockHeaderParser
|
||||
src_lines.delete_if {|line| !(line =~ /(?:^|\s+)(?:extern)\s+/).nil?} # remove extern functions
|
||||
end
|
||||
|
||||
if (@treat_inlines == :include)
|
||||
src_lines.each {
|
||||
|src_line|
|
||||
src_line.gsub!(/^inline/, "") # Remove "inline" so that they are 'normal' functions
|
||||
}
|
||||
else
|
||||
src_lines.delete_if {|line| !(line =~ /(?:^|\s+)(?:inline)\s+/).nil?} # remove inline functions
|
||||
unless (@treat_inlines == :include)
|
||||
src_lines.delete_if {|line| !(line =~ /(?:^|\s+)(?:inline)\s+/).nil?} # remove inline functions
|
||||
end
|
||||
|
||||
src_lines.delete_if {|line| line.empty? } #drop empty lines
|
||||
|
||||
Reference in New Issue
Block a user