[tidy] modernize-use-auto
This commit is contained in:
@@ -58,8 +58,8 @@ bool HeadlessBackend::hasDisplay() {
|
||||
void HeadlessBackend::createContext() {
|
||||
assert(!hasContext());
|
||||
|
||||
Display* xDisplay = display->attribute<Display*>();
|
||||
GLXFBConfig* fbConfigs = display->attribute<GLXFBConfig*>();
|
||||
auto* xDisplay = display->attribute<Display*>();
|
||||
auto* fbConfigs = display->attribute<GLXFBConfig*>();
|
||||
|
||||
// Try to create a legacy context.
|
||||
GLXContext glContext = glXCreateNewContext(xDisplay, fbConfigs[0], GLX_RGBA_TYPE, None, True);
|
||||
|
||||
@@ -27,7 +27,7 @@ HeadlessDisplay::Impl::Impl() {
|
||||
throw std::runtime_error("Failed to open X display.");
|
||||
}
|
||||
|
||||
const char *extensions = reinterpret_cast<const char *>(glXQueryServerString(xDisplay, DefaultScreen(xDisplay), GLX_EXTENSIONS));
|
||||
const auto *extensions = reinterpret_cast<const char *>(glXQueryServerString(xDisplay, DefaultScreen(xDisplay), GLX_EXTENSIONS));
|
||||
if (!extensions) {
|
||||
throw std::runtime_error("Cannot read GLX extensions.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user