1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +02:00

Replace Optional with std::optional

This commit is contained in:
Desour
2023-06-11 22:55:36 +02:00
committed by sfan5
parent 34ad551efc
commit e700182f44
15 changed files with 39 additions and 198 deletions

View File

@ -698,7 +698,7 @@ void Camera::drawNametags()
Nametag *Camera::addNametag(scene::ISceneNode *parent_node,
const std::string &text, video::SColor textcolor,
Optional<video::SColor> bgcolor, const v3f &pos)
std::optional<video::SColor> bgcolor, const v3f &pos)
{
Nametag *nametag = new Nametag(parent_node, text, textcolor, bgcolor, pos);
m_nametags.push_back(nametag);

View File

@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <plane3d.h>
#include <array>
#include <list>
#include "util/Optional.h"
#include <optional>
class LocalPlayer;
struct MapDrawControl;
@ -41,13 +41,13 @@ struct Nametag
scene::ISceneNode *parent_node;
std::string text;
video::SColor textcolor;
Optional<video::SColor> bgcolor;
std::optional<video::SColor> bgcolor;
v3f pos;
Nametag(scene::ISceneNode *a_parent_node,
const std::string &text,
const video::SColor &textcolor,
const Optional<video::SColor> &bgcolor,
const std::optional<video::SColor> &bgcolor,
const v3f &pos):
parent_node(a_parent_node),
text(text),
@ -201,7 +201,7 @@ public:
Nametag *addNametag(scene::ISceneNode *parent_node,
const std::string &text, video::SColor textcolor,
Optional<video::SColor> bgcolor, const v3f &pos);
std::optional<video::SColor> bgcolor, const v3f &pos);
void removeNametag(Nametag *nametag);