inexorgame / vulkan-renderer

A new 3D game engine for Linux and Windows using C++20 and Vulkan API 1.3, in very early but ongoing development
https://inexor.org
MIT License
777 stars 34 forks source link

[collision] Fix implicit lambda capture of 'this' using [=] which is deprecated in C++20 #466

Closed IAmNotHanni closed 2 years ago

IAmNotHanni commented 2 years ago

I fixed this:

command-pool-refactoring/vulkan-renderer/src/vulkan-renderer/world/collision.cpp:28:37:
warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
   28 |     const auto adjust_coordinates = [=](const glm::vec3 pos) {
      |                                     ^
command-pool-refactoring/vulkan-renderer/src/vulkan-renderer/world/collision.cpp:28:37:
note: add explicit ‘this’ or ‘*this’ capture

I can really recommend this ebook btw: https://leanpub.com/cpplambda