Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: remoting/host/input_injector_x11.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/host/input_injector_x11.cc
diff --git a/remoting/host/input_injector_x11.cc b/remoting/host/input_injector_x11.cc
index 55690da30319b8511e4c5b33fe732d50e8e43db4..53e160451eba81490cb9c3139f88f890df510dd6 100644
--- a/remoting/host/input_injector_x11.cc
+++ b/remoting/host/input_injector_x11.cc
@@ -56,8 +56,8 @@ bool FindKeycodeForKeySym(Display* display,
// TODO(sergeyu): Is there a better way to find modifiers state?
for (size_t i = 0; i < arraysize(kModifiersToTry); ++i) {
unsigned long key_sym_with_mods;
- if (XkbLookupKeySym(
- display, *keycode, kModifiersToTry[i], NULL, &key_sym_with_mods) &&
+ if (XkbLookupKeySym(display, *keycode, kModifiersToTry[i], nullptr,
+ &key_sym_with_mods) &&
key_sym_with_mods == key_sym) {
*modifiers = kModifiersToTry[i];
return true;
@@ -230,7 +230,7 @@ InputInjectorX11::Core::Core(
latest_mouse_position_(-1, -1),
wheel_ticks_x_(0.0f),
wheel_ticks_y_(0.0f),
- display_(XOpenDisplay(NULL)),
+ display_(XOpenDisplay(nullptr)),
root_window_(BadValue),
saved_auto_repeat_enabled_(false) {
}
@@ -500,7 +500,7 @@ void InputInjectorX11::Core::InitMouseButtonMap() {
// Instead, try to work around it by reversing the mapping.
// Note that if a user has a global mapping that completely disables a button
// (by assigning 0 to it), we won't be able to inject it.
- int num_buttons = XGetPointerMapping(display_, NULL, 0);
+ int num_buttons = XGetPointerMapping(display_, nullptr, 0);
scoped_ptr<unsigned char[]> pointer_mapping(new unsigned char[num_buttons]);
num_buttons = XGetPointerMapping(display_, pointer_mapping.get(),
num_buttons);
@@ -556,7 +556,8 @@ void InputInjectorX11::Core::InitMouseButtonMap() {
return;
}
- int num_device_buttons = XGetDeviceButtonMapping(display_, device, NULL, 0);
+ int num_device_buttons =
+ XGetDeviceButtonMapping(display_, device, nullptr, 0);
scoped_ptr<unsigned char[]> button_mapping(new unsigned char[num_buttons]);
for (int i = 0; i < num_device_buttons; i++) {
button_mapping[i] = i + 1;
« no previous file with comments | « remoting/host/input_injector_mac.cc ('k') | remoting/host/installer/mac/uninstaller/remoting_uninstaller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698