-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with the getFontWidth rapid deprecatation (#131)
`font.getStringWidth` was deprecated between juce 801 and 802 in favor of a function which doesn't exist in 801 or earlier. Deal with this particular choice by adding a version-switching function and using it.
- Loading branch information
Showing
8 changed files
with
93 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/perl | ||
|
||
|
||
use File::Find; | ||
use File::Basename; | ||
|
||
find( | ||
{ | ||
wanted => \&findfiles, | ||
}, | ||
'include' | ||
); | ||
|
||
|
||
find( | ||
{ | ||
wanted => \&findfiles, | ||
}, | ||
'src' | ||
); | ||
|
||
sub findfiles | ||
{ | ||
$f = $File::Find::name; | ||
if ($f =~ m/StyleSheet\.h$/) | ||
{ | ||
return; | ||
} | ||
|
||
if ($f =~ m/\.cpp$/ || $f =~ m/\.h$/) | ||
{ | ||
print $f . " \n"; | ||
$q = basename($f); | ||
|
||
open (IN, "< $q") || die "Cant open $q from $f"; | ||
open (OUT, "> $q.bak"); | ||
while(<IN>) | ||
{ | ||
if (m/getStringWidth/) | ||
{ | ||
print; | ||
s/([^\s\{]+)\.getStringWidth\(/SST_STRING_WIDTH_INT\($1, /; | ||
print; | ||
#die; | ||
} | ||
print OUT; | ||
|
||
} | ||
close(IN); | ||
close(OUT); | ||
system("mv ${q}.bak ${q}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters