mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
Use of std::move and added DEBUG ifdef
This commit is contained in:
parent
3bc8744b63
commit
7410e31230
@ -4,7 +4,7 @@
|
||||
|
||||
class TVehicleData final {
|
||||
public:
|
||||
TVehicleData(int ID, const std::string& Data);
|
||||
TVehicleData(int ID, std::string Data);
|
||||
~TVehicleData();
|
||||
|
||||
[[nodiscard]] bool IsInvalid() const { return mID == -1; }
|
||||
|
@ -1,12 +1,18 @@
|
||||
#include "VehicleData.h"
|
||||
|
||||
#include <utility>
|
||||
#include "Common.h"
|
||||
|
||||
TVehicleData::TVehicleData(int ID, const std::string& Data)
|
||||
TVehicleData::TVehicleData(int ID, std::string Data)
|
||||
: mID(ID)
|
||||
, mData(Data) {
|
||||
, mData(std::move(Data)) {
|
||||
#ifdef DEBUG
|
||||
debug("vehicle " + std::to_string(mID) + " constructed");
|
||||
#endif
|
||||
}
|
||||
|
||||
TVehicleData::~TVehicleData() {
|
||||
#ifdef DEBUG
|
||||
debug("vehicle " + std::to_string(mID) + " destroyed");
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user