mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-23 19:25:54 +00:00
Simplify enum parsing
This commit is contained in:
@@ -7,10 +7,9 @@ NSString* TextPathSideToString( enum TextPathSide fw )
|
||||
|
||||
enum TextPathSide TextPathSideFromString( NSString* s )
|
||||
{
|
||||
NSInteger i;
|
||||
NSString* fw;
|
||||
for (i = 0; fw = TextPathSideStrings[i], fw != nil; i++) {
|
||||
if ([fw isEqualToString:s]) {
|
||||
const NSUInteger l = sizeof(TextPathSideStrings) / sizeof(NSString*);
|
||||
for (NSUInteger i = 0; i < l; i++) {
|
||||
if ([s isEqualToString:TextPathSideStrings[i]]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user