mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Cherry-pick some cmake commits (#24720)
* Build system: Support new in cmake 3.17 Ninja Multi-Config generator (cherry picked from commit369b618d4f) * Build system: Fixed PCH with MSVC & Ninja generator (cherry picked from commitd669f46b6d) * Core: Fix clang 10 warnings (cherry picked from commit7272508cb4) # Conflicts: # src/common/Utilities/Util.h # src/server/bnetserver/REST/LoginRESTService.cpp # src/server/game/Entities/Object/Position.h # src/server/game/Entities/Player/Player.cpp # src/server/game/Guilds/GuildFinderMgr.h # src/server/game/Movement/Spline/MoveSplineFlag.h # src/server/shared/Dynamic/LinkedList.h * Build system: Set -Wno-deprecated-copy only for clang 10 (cherry picked from commit7fdeb259ba) * Core/Misc: GCC build and warning fixes (cherry picked from commit4d69cc1c56) # Conflicts: # src/common/Utilities/Util.cpp # src/server/database/Database/MySQLConnection.cpp # src/server/game/Battlefield/Zones/BattlefieldTB.cpp # src/server/game/DataStores/M2Stores.cpp # src/server/game/DungeonFinding/LFGMgr.cpp # src/server/game/DungeonFinding/LFGPlayerData.cpp # src/server/game/Entities/GameObject/GameObject.cpp # src/server/game/Entities/Item/Item.cpp # src/server/game/Entities/Object/Updates/UpdateFields.h # src/server/game/Entities/Player/Player.cpp # src/server/game/Entities/Player/RestMgr.cpp # src/server/game/Entities/Unit/Unit.cpp # src/server/game/Handlers/PetHandler.cpp # src/server/game/Server/Packets/GuildPackets.h # src/server/game/Spells/Auras/SpellAuraEffects.cpp # src/server/game/Spells/Auras/SpellAuras.cpp # src/server/game/Spells/Spell.cpp # src/server/game/Spells/SpellInfo.cpp # src/server/game/Spells/SpellMgr.cpp # src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp # src/server/scripts/Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp # src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp # src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp # src/server/scripts/Northrend/zone_sholazar_basin.cpp # src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp # src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp # src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp # src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp # src/tools/vmap4_extractor/gameobject_extract.cpp # src/tools/vmap4_extractor/model.cpp # src/tools/vmap4_extractor/vec3d.h * Build system: Print found git version when warning about it being too old (cherry picked from commit1ae72db201) * Build system: Removed hard requirement on BOOST_ROOT being set as environment variable, it can now be also passed as command line argument to cmake and fix compile warning with boost 1.73 (cherry picked from commit161944b764) # Conflicts: # dep/boost/CMakeLists.txt * Remove some code that was already removed from 335 and then cherry-picked into master Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -43,7 +43,10 @@ list(APPEND CMAKE_MODULE_PATH
|
||||
"${CMAKE_SOURCE_DIR}/dep/cotire/CMake")
|
||||
|
||||
# build in Release-mode by default if not explicitly set
|
||||
if( NOT CMAKE_BUILD_TYPE )
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
|
||||
set(CMAKE_DEFAULT_BUILD_TYPE "RelWithDebInfo" CACHE INTERNAL "")
|
||||
endif()
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(WITH_WARNINGS)
|
||||
target_compile_options(trinity-warning-interface
|
||||
@@ -13,6 +13,12 @@ if(WITH_WARNINGS)
|
||||
-Wfatal-errors
|
||||
-Wno-mismatched-tags
|
||||
-Woverloaded-virtual)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
|
||||
target_compile_options(trinity-warning-interface
|
||||
INTERFACE
|
||||
-Wno-deprecated-copy) # warning in g3d
|
||||
endif()
|
||||
|
||||
message(STATUS "Clang: All warnings enabled")
|
||||
endif()
|
||||
@@ -45,6 +51,7 @@ endif()
|
||||
|
||||
# -Wno-narrowing needed to suppress a warning in g3d
|
||||
# -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems.
|
||||
# -Wno-deprecated-copy needed to suppress a warning in g3d
|
||||
target_compile_options(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-Wno-narrowing
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
set(GCC_EXPECTED_VERSION 7.1.0)
|
||||
|
||||
@@ -35,6 +35,10 @@ if( WITH_WARNINGS )
|
||||
-Wfatal-errors
|
||||
-Woverloaded-virtual)
|
||||
|
||||
target_compile_options(trinity-warning-interface
|
||||
INTERFACE
|
||||
-Wno-deprecated-copy) # warning in g3d
|
||||
|
||||
message(STATUS "GCC: All warnings enabled")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
target_compile_options(trinity-compile-option-interface
|
||||
|
||||
@@ -4,7 +4,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
||||
|
||||
@@ -59,7 +59,7 @@ else()
|
||||
# while all make-like generators do (nmake, ninja)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
endif()
|
||||
|
||||
# multithreaded compiling on VS
|
||||
|
||||
@@ -41,6 +41,6 @@ else()
|
||||
message(STATUS "Git version too old : ${_GIT_VERSION}")
|
||||
message(FATAL_ERROR "
|
||||
Git was found but is OUTDATED - did you forget to install a recent version, or setting the path to it?
|
||||
Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}")
|
||||
Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}, found ${_GIT_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
if(WIN32)
|
||||
set(BOOST_DEBUG ON)
|
||||
set(BOOST_DEBUG ON)
|
||||
if(DEFINED ENV{BOOST_ROOT})
|
||||
set(BOOST_ROOT $ENV{BOOST_ROOT})
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
|
||||
@@ -29,7 +29,7 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
elseif(NOT DEFINED Boost_DIR AND NOT DEFINED BOOST_ROOT AND NOT DEFINED BOOSTROOT)
|
||||
message(FATAL_ERROR "No BOOST_ROOT environment variable could be found! Please make sure it is set and the points to your Boost installation.")
|
||||
endif()
|
||||
|
||||
@@ -85,7 +85,8 @@ target_compile_definitions(boost
|
||||
-DBOOST_SERIALIZATION_NO_LIB
|
||||
-DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
|
||||
-DBOOST_ASIO_NO_DEPRECATED
|
||||
-DBOOST_SYSTEM_USE_UTF8)
|
||||
-DBOOST_SYSTEM_USE_UTF8
|
||||
-DBOOST_BIND_NO_PLACEHOLDERS)
|
||||
|
||||
if (NOT boost_filesystem_copy_links_without_NO_SCOPED_ENUM)
|
||||
target_compile_definitions(boost
|
||||
|
||||
@@ -2259,12 +2259,19 @@ function (cotire_generate_target_script _language _configurations _target _targe
|
||||
set (${_targetConfigScriptVar} "${_targetCotireConfigScript}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
|
||||
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _prefixFileWasGenerated _hostFile)
|
||||
set (_sourceFiles ${ARGN})
|
||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
||||
# for Visual Studio and Intel, we attach the precompiled header compilation to the host file
|
||||
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
|
||||
if (_sourceFiles)
|
||||
# unlike MSBuild, Ninja does not automatically create the directory for /Fp file
|
||||
# so we have to do it ourselves to avoid C1083
|
||||
if (${CMAKE_GENERATOR} STREQUAL "Ninja Multi-Config")
|
||||
cotire_get_intermediate_dir(_baseDir)
|
||||
add_custom_command (OUTPUT "${_baseDir}/.mkdir" COMMAND ${CMAKE_COMMAND} -E touch "${_baseDir}/.mkdir")
|
||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_baseDir}/.mkdir")
|
||||
endif()
|
||||
set (_flags "")
|
||||
cotire_add_pch_compilation_flags(
|
||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||
@@ -2272,7 +2279,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
|
||||
set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}")
|
||||
# make object file generated from host file depend on prefix header
|
||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
||||
if (_prefixFileWasGenerated)
|
||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
||||
endif()
|
||||
# mark host file as cotired to prevent it from being used in another cotired target
|
||||
set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}")
|
||||
endif()
|
||||
@@ -2355,7 +2364,7 @@ function (cotire_setup_prefix_file_inclusion _language _target _prefixFile _pref
|
||||
if (_prefixFileWasGenerated)
|
||||
# make object files generated from source files depend on prefix header
|
||||
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function (cotire_get_first_set_property_value _propertyValueVar _type _object)
|
||||
@@ -2899,7 +2908,7 @@ function (cotire_process_target_language _language _configurations _target _whol
|
||||
if (_pchFile)
|
||||
# first file in _sourceFiles is passed as the host file
|
||||
cotire_setup_pch_file_compilation(
|
||||
${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
|
||||
${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_prefixFileWasGenerated} ${_sourceFiles})
|
||||
cotire_setup_pch_file_inclusion(
|
||||
${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
|
||||
endif()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "LogMessage.h"
|
||||
#include "StringFormat.h"
|
||||
#include "Util.h"
|
||||
|
||||
LogMessage::LogMessage(LogLevel _level, std::string const& _type, std::string&& _text)
|
||||
@@ -32,9 +33,7 @@ std::string LogMessage::getTimeStr(time_t time)
|
||||
{
|
||||
tm aTm;
|
||||
localtime_r(&time, &aTm);
|
||||
char buf[20];
|
||||
snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year + 1900, aTm.tm_mon + 1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
return std::string(buf);
|
||||
return Trinity::StringFormat("%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year + 1900, aTm.tm_mon + 1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
}
|
||||
|
||||
std::string LogMessage::getTimeStr() const
|
||||
|
||||
@@ -283,9 +283,7 @@ std::string TimeToTimestampStr(time_t t)
|
||||
// HH hour (2 digits 00-23)
|
||||
// MM minutes (2 digits 00-59)
|
||||
// SS seconds (2 digits 00-59)
|
||||
char buf[20];
|
||||
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
return std::string(buf);
|
||||
return Trinity::StringFormat("%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year + 1900, aTm.tm_mon + 1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
}
|
||||
|
||||
std::string TimeToHumanReadable(time_t t)
|
||||
|
||||
@@ -407,14 +407,6 @@ public:
|
||||
return !(*this == right);
|
||||
}
|
||||
|
||||
inline flag96& operator=(flag96 const& right)
|
||||
{
|
||||
part[0] = right.part[0];
|
||||
part[1] = right.part[1];
|
||||
part[2] = right.part[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline flag96 operator&(flag96 const& right) const
|
||||
{
|
||||
return flag96(part[0] & right.part[0], part[1] & right.part[1], part[2] & right.part[2]);
|
||||
|
||||
@@ -155,10 +155,8 @@ bool readCamera(M2Camera const* cam, uint32 buffSize, M2Header const* header, Ci
|
||||
uint32 timeDiffThis = posTimestamps[i] - lastTarget.timeStamp;
|
||||
float xDiff = nextTarget.locations.GetPositionX() - lastTarget.locations.GetPositionX();
|
||||
float yDiff = nextTarget.locations.GetPositionY() - lastTarget.locations.GetPositionY();
|
||||
float zDiff = nextTarget.locations.GetPositionZ() - lastTarget.locations.GetPositionZ();
|
||||
x = lastTarget.locations.GetPositionX() + (xDiff * (float(timeDiffThis) / float(timeDiffTarget)));
|
||||
y = lastTarget.locations.GetPositionY() + (yDiff * (float(timeDiffThis) / float(timeDiffTarget)));
|
||||
z = lastTarget.locations.GetPositionZ() + (zDiff * (float(timeDiffThis) / float(timeDiffTarget)));
|
||||
}
|
||||
float xDiff = x - thisCam.locations.GetPositionX();
|
||||
float yDiff = y - thisCam.locations.GetPositionY();
|
||||
@@ -203,10 +201,10 @@ void LoadM2Cameras(std::string const& dataPath)
|
||||
|
||||
// Get file size
|
||||
m2file.seekg(0, std::ios::end);
|
||||
std::streamoff const fileSize = m2file.tellg();
|
||||
std::streamoff fileSize = m2file.tellg();
|
||||
|
||||
// Reject if not at least the size of the header
|
||||
if (static_cast<uint32 const>(fileSize) < sizeof(M2Header))
|
||||
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
|
||||
{
|
||||
TC_LOG_ERROR("server.loading", "Camera file %s is damaged. File is smaller than header size", filename.string().c_str());
|
||||
m2file.close();
|
||||
@@ -240,7 +238,7 @@ void LoadM2Cameras(std::string const& dataPath)
|
||||
// Read header
|
||||
M2Header const* header = reinterpret_cast<M2Header const*>(buffer.data());
|
||||
|
||||
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32 const>(fileSize))
|
||||
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
|
||||
{
|
||||
TC_LOG_ERROR("server.loading", "Camera file %s is damaged. Camera references position beyond file end", filename.string().c_str());
|
||||
continue;
|
||||
|
||||
@@ -532,7 +532,6 @@ void GameObject::Update(uint32 diff)
|
||||
m_lootState = GO_READY; // for other GOis same switched without delay to GO_READY
|
||||
break;
|
||||
}
|
||||
// NO BREAK for switch (m_lootState)
|
||||
}
|
||||
/* fallthrough */
|
||||
case GO_READY:
|
||||
|
||||
@@ -73,7 +73,6 @@ namespace Movement
|
||||
|
||||
MoveSplineFlag() { raw() = 0; }
|
||||
MoveSplineFlag(uint32 f) { raw() = f; }
|
||||
MoveSplineFlag(MoveSplineFlag const& f) { raw() = f.raw(); }
|
||||
|
||||
// Constant interface
|
||||
|
||||
|
||||
@@ -504,9 +504,7 @@ public:
|
||||
Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30);
|
||||
Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30);
|
||||
|
||||
if (!bird || !crunchy)
|
||||
; // fall to EVENT_MISS
|
||||
else
|
||||
if (bird && crunchy)
|
||||
{
|
||||
shooter->CastSpell(bird, SPELL_MISS_BIRD_APPLE);
|
||||
bird->CastSpell(bird, SPELL_BIRD_FALL);
|
||||
@@ -517,7 +515,6 @@ public:
|
||||
crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(),
|
||||
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhaseMask(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
|
||||
/// @todo Make crunchy perform emote eat when he reaches the bird
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,12 +164,6 @@ class LinkedListHead
|
||||
{ // construct with node pointer _Pnode
|
||||
}
|
||||
|
||||
Iterator& operator=(Iterator const& _Right)
|
||||
{
|
||||
_Ptr = _Right._Ptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Iterator& operator=(const_pointer const& _Right)
|
||||
{
|
||||
_Ptr = pointer(_Right);
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
#include <cstdio>
|
||||
#include <limits>
|
||||
|
||||
Model::Model(std::string &filename) : filename(filename), vertices(0), indices(0)
|
||||
Model::Model(std::string &filename) : filename(filename), header(), vertices(nullptr), indices(nullptr)
|
||||
{
|
||||
memset(&header, 0, sizeof(header));
|
||||
}
|
||||
|
||||
bool Model::open()
|
||||
@@ -142,7 +141,7 @@ Vec3D fixCoordSystem(Vec3D const& v)
|
||||
|
||||
void Doodad::Extract(ADT::MDDF const& doodadDef, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile)
|
||||
{
|
||||
char tempname[512];
|
||||
char tempname[1036];
|
||||
sprintf(tempname, "%s/%s", szWorkDirWmo, ModelInstName);
|
||||
FILE* input = fopen(tempname, "r+b");
|
||||
|
||||
@@ -216,7 +215,7 @@ void Doodad::ExtractSet(WMODoodadData const& doodadData, ADT::MODF const& wmo, u
|
||||
}
|
||||
}
|
||||
|
||||
char tempname[512];
|
||||
char tempname[1036];
|
||||
sprintf(tempname, "%s/%s", szWorkDirWmo, ModelInstName);
|
||||
FILE* input = fopen(tempname, "r+b");
|
||||
if (!input)
|
||||
|
||||
@@ -28,15 +28,9 @@ public:
|
||||
|
||||
Vec3D(float x0 = 0.0f, float y0 = 0.0f, float z0 = 0.0f) : x(x0), y(y0), z(z0) { }
|
||||
|
||||
Vec3D(Vec3D const& v) : x(v.x), y(v.y), z(v.z) { }
|
||||
Vec3D(Vec3D const& v) = default;
|
||||
|
||||
Vec3D& operator=(Vec3D const& v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
z = v.z;
|
||||
return *this;
|
||||
}
|
||||
Vec3D& operator=(Vec3D const& v) = default;
|
||||
|
||||
Vec3D operator+(Vec3D const& v) const
|
||||
{
|
||||
@@ -151,14 +145,9 @@ public:
|
||||
|
||||
Vec2D(float x0 = 0.0f, float y0 = 0.0f) : x(x0), y(y0) { }
|
||||
|
||||
Vec2D(Vec2D const& v) : x(v.x), y(v.y) { }
|
||||
Vec2D(Vec2D const& v) = default;
|
||||
|
||||
Vec2D& operator=(Vec2D const& v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
return *this;
|
||||
}
|
||||
Vec2D& operator=(Vec2D const& v) = default;
|
||||
|
||||
Vec2D operator+(Vec2D const& v) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user