Skip to content

Commit d21400f

Browse files
committed
Fix swap function lines in sdsl-lite patch
1 parent 531f159 commit d21400f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Rakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ def patch_sdsl_lite
7979
next if File.exist?(orig) # Already patched
8080

8181
content = File.read(file)
82-
patched = content.gsub(/tree\.m_select1(?!\w)/, 'tree.m_bv_select1')
83-
.gsub(/tree\.m_select0(?!\w)/, 'tree.m_bv_select0')
82+
# Fix the specific lines in swap function
83+
patched = content.gsub(/util::swap_support\(m_bv_select1, tree\.m_select1,/, 'util::swap_support(m_bv_select1, tree.m_bv_select1,')
84+
.gsub(/util::swap_support\(m_bv_select0, tree\.m_select0,/, 'util::swap_support(m_bv_select0, tree.m_bv_select0,')
8485

8586
if content != patched
8687
File.write(orig, content) # Backup original

0 commit comments

Comments
 (0)