refactor: use If in place of switch that looks for single case
This commit is contained in:
parent
eae089d3ec
commit
138ede0536
1 changed files with 2 additions and 6 deletions
|
|
@ -48,14 +48,10 @@ XWindowsClipboard::XWindowsClipboard(Display *display, Window window, ClipboardI
|
||||||
m_atomGDKSelection = XInternAtom(m_display, "GDK_SELECTION", False);
|
m_atomGDKSelection = XInternAtom(m_display, "GDK_SELECTION", False);
|
||||||
|
|
||||||
// set selection atom based on clipboard id
|
// set selection atom based on clipboard id
|
||||||
switch (id) {
|
if (id == kClipboardClipboard) {
|
||||||
case kClipboardClipboard:
|
|
||||||
m_selection = XInternAtom(m_display, "CLIPBOARD", False);
|
m_selection = XInternAtom(m_display, "CLIPBOARD", False);
|
||||||
break;
|
} else {
|
||||||
|
|
||||||
default:
|
|
||||||
m_selection = XA_PRIMARY;
|
m_selection = XA_PRIMARY;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add converters, most desired first
|
// add converters, most desired first
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue