summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-01-04 23:31:15 -0800
committerGrant Paul <chpwn@chpwn.com>2011-01-04 23:31:15 -0800
commit94511d30a0d4f173055292e80d156d8e58da2716 (patch)
treea3d1791e8f2720c8ae7aed09c00d9b1cdcfd4ef8 /UICaboodle
parentf6e1356137e494e0746becbfda851c8858de1c98 (diff)
parent9c8730d27cb4ca97a5034de527be90c975144c5e (diff)
Merge branch 'master' of saurik.com:cydia into url-tabbar
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.mm20
-rw-r--r--UICaboodle/UCPlatform.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 921e6aa..2abc02e 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -835,19 +835,13 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
[alert dismissWithClickedButtonIndex:-1 animated:YES];
} else if ([context isEqualToString:@"submit"]) {
- switch (button) {
- case 1:
- break;
-
- case 2:
- if (request_ != nil) {
- WebThreadLock();
- [webview_ loadRequest:request_];
- WebThreadUnlock();
- }
- break;
-
- _nodefault
+ if (button == [alert cancelButtonIndex]) {
+ } else if (button == [alert firstOtherButtonIndex]) {
+ if (request_ != nil) {
+ WebThreadLock();
+ [webview_ loadRequest:request_];
+ WebThreadUnlock();
+ }
}
[alert dismissWithClickedButtonIndex:-1 animated:YES];
diff --git a/UICaboodle/UCPlatform.h b/UICaboodle/UCPlatform.h
index 4f2169e..c241232 100644
--- a/UICaboodle/UCPlatform.h
+++ b/UICaboodle/UCPlatform.h
@@ -54,3 +54,9 @@ while (false)
default: \
_assume(false); \
throw;
+
+#define _likely(expr) \
+ __builtin_expect(expr, 1)
+
+#define _unlikely(expr) \
+ __builtin_expect(expr, 0)