Created
January 30, 2012 07:17
-
-
Save omo/1703025 to your computer and use it in GitHub Desktop.
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
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm | |
index abb528d..9c174f9 100644 | |
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm | |
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm | |
@@ -218,7 +218,7 @@ NSAttributedString* OmniboxPopupViewMac::MatchText( | |
font.GetNativeFont(), NSFontAttributeName, | |
ContentTextColor(), NSForegroundColorAttributeName, | |
nil]; | |
- NSString* rawEnDash = [NSString stringWithFormat:@" %C ", 0x2013]; | |
+ NSString* rawEnDash = [NSString stringWithFormat:@" %C ", static_cast<wchar_t>(0x2013)]; | |
NSAttributedString* enDash = | |
[[[NSAttributedString alloc] initWithString:rawEnDash | |
attributes:attributes] autorelease]; | |
diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm | |
index d539e46..4c11c20 100644 | |
--- a/chrome/common/child_process_logging_mac.mm | |
+++ b/chrome/common/child_process_logging_mac.mm | |
@@ -187,7 +187,7 @@ void SetCommandLine(const CommandLine* command_line) { | |
// Note the total number of switches, not including the exec path. | |
const CommandLine::StringVector& argv = command_line->argv(); | |
SetCrashKeyValue(kNumSwitchesKey, | |
- [NSString stringWithFormat:@"%d", argv.size() - 1]); | |
+ [NSString stringWithFormat:@"%d", static_cast<int>(argv.size() - 1)]); | |
size_t key_i = 0; | |
for (size_t i = 1; i < argv.size() && key_i < kMaxSwitches; ++i) { | |
diff --git a/webkit/plugins/npapi/plugin_web_event_converter_mac.mm b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm | |
index 4d58b28..d6bb9ca 100644 | |
--- a/webkit/plugins/npapi/plugin_web_event_converter_mac.mm | |
+++ b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm | |
@@ -210,10 +210,12 @@ bool CocoaPluginWebEventConverter::ConvertKeyboardEvent( | |
} | |
cocoa_event_.data.key.characters = reinterpret_cast<NPNSString*>( | |
- [NSString stringWithFormat:@"%S", key_event.text]); | |
+ [NSString stringWithFormat:@"%S", | |
+ reinterpret_cast<const wchar_t*>(key_event.text)]); | |
cocoa_event_.data.key.charactersIgnoringModifiers = | |
reinterpret_cast<NPNSString*>( | |
- [NSString stringWithFormat:@"%S", key_event.unmodifiedText]); | |
+ [NSString stringWithFormat:@"%S", | |
+ reinterpret_cast<const wchar_t*>(key_event.unmodifiedText)]); | |
if (key_event.modifiers & WebInputEvent::IsAutoRepeat) | |
cocoa_event_.data.key.isARepeat = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment