Rename "template" variable to "name_template" (because "template" is a reserved word in C++)

This commit is contained in:
M374LX 2026-08-24 21:04:36 -03:00
parent 9ed5414484
commit 98f0e85b0f
2 changed files with 5 additions and 5 deletions

View file

@ -164,8 +164,8 @@ static void _glfwRegistryHandleGlobalWayland(void* userData,
{
_glfw.wl.decorationManager =
(struct zxdg_decoration_manager_v1*)
wl_registry_bind(registry, name,
&zxdg_decoration_manager_v1_interface, 1);
wl_registry_bind(registry, name,
&zxdg_decoration_manager_v1_interface, 1);
}
else if (strcmp(interface, "wp_viewporter") == 0)
{

View file

@ -96,7 +96,7 @@ static int _glfwCreateTmpfileCloexecWayland(char* tmpname)
*/
static int _glfwCreateAnonymousFileWayland(off_t size)
{
static const char template[] = "/glfw-shared-XXXXXX";
static const char name_template[] = "/glfw-shared-XXXXXX";
const char* path;
char* name;
int fd;
@ -126,9 +126,9 @@ static int _glfwCreateAnonymousFileWayland(off_t size)
return -1;
}
name = _glfw_calloc(strlen(path) + sizeof(template), 1);
name = (char*) _glfw_calloc(strlen(path) + sizeof(name_template), 1);
strcpy(name, path);
strcat(name, template);
strcat(name, name_template);
fd = _glfwCreateTmpfileCloexecWayland(name);
_glfw_free(name);