Fixed warnings

This commit is contained in:
Kah Wei 2022-09-15 12:28:53 +08:00
parent e5b7742955
commit 2714503efa
6 changed files with 41 additions and 36 deletions

View File

@ -41,6 +41,11 @@ project "SHADE_Managed"
"SHADE_Engine"
}
disablewarnings
{
"4251"
}
defines
{
"NOMINMAX"

View File

@ -24,15 +24,6 @@ of DigiPen Institute of Technology is prohibited.
namespace SHADE
{
/*---------------------------------------------------------------------------------*/
/* Constructor */
/*---------------------------------------------------------------------------------*/
static EngineInterface::EngineInterface()
{
exceptionHandler = gcnew System::UnhandledExceptionEventHandler(unhandledExceptionHandler);
managedLibPath = System::Reflection::Assembly::GetExecutingAssembly()->Location->Replace("SHADE_Managed.dll", ManagedLibraryName + ".dll");
}
/*---------------------------------------------------------------------------------*/
/* Interop Static Functions */
/*---------------------------------------------------------------------------------*/
@ -99,6 +90,15 @@ namespace SHADE
SAFE_NATIVE_CALL_END_N("SHADE_Managed.EngineInterface")
}
/*---------------------------------------------------------------------------------*/
/* Constructor */
/*---------------------------------------------------------------------------------*/
static EngineInterface::EngineInterface()
{
exceptionHandler = gcnew System::UnhandledExceptionEventHandler(unhandledExceptionHandler);
managedLibPath = System::Reflection::Assembly::GetExecutingAssembly()->Location->Replace("SHADE_Managed.dll", ManagedLibraryName + ".dll");
}
/*---------------------------------------------------------------------------------*/
/* Helper Functions */
/*---------------------------------------------------------------------------------*/
@ -127,7 +127,7 @@ namespace SHADE
/*---------------------------------------------------------------------------------*/
/* Exception Handler Functions */
/*---------------------------------------------------------------------------------*/
void EngineInterface::unhandledExceptionHandler(System::Object^ sender, System::UnhandledExceptionEventArgs^ e)
void EngineInterface::unhandledExceptionHandler(System::Object^, System::UnhandledExceptionEventArgs^ e)
{
std::ostringstream oss;
oss << "[EngineInterface] Unhandled managed exception: "

View File

@ -33,11 +33,6 @@ namespace SHADE
/// </summary>
literal System::String^ ManagedLibraryName = "SHADE_Scripting";
/*-----------------------------------------------------------------------------*/
/* Constructor */
/*-----------------------------------------------------------------------------*/
static EngineInterface();
/*-----------------------------------------------------------------------------*/
/* Interop Static Functions */
/*-----------------------------------------------------------------------------*/
@ -68,7 +63,12 @@ namespace SHADE
/// </summary>
static void Exit();
private:
private:
/*-----------------------------------------------------------------------------*/
/* Constructor */
/*-----------------------------------------------------------------------------*/
static EngineInterface();
/*-----------------------------------------------------------------------------*/
/* Data Members */
/*-----------------------------------------------------------------------------*/

View File

@ -33,37 +33,37 @@ namespace SHADE
///<summary>
/// Shorthand for writing Vector2(0, -1).
///</summary>
static Vector2 Down = Vector2(0.0, -1.0);
static initonly Vector2 Down = Vector2(0.0, -1.0);
///<summary>
/// Shorthand for writing Vector2(-1, 0).
///</summary>
static Vector2 Left = Vector2(-1.0, 0.0);
static initonly Vector2 Left = Vector2(-1.0, 0.0);
///<summary>
/// Shorthand for writing Vector2(double.NegativeInfinity,
/// double.NegativeInfinity).
///</summary>
static Vector2 NegativeInfinity = Vector2(std::numeric_limits<double>::lowest(), std::numeric_limits<double>::lowest());
static initonly Vector2 NegativeInfinity = Vector2(std::numeric_limits<double>::lowest(), std::numeric_limits<double>::lowest());
///<summary>
/// Shorthand for writing Vector2(1, 1).
///</summary>
static Vector2 One = Vector2(1.0, 1.0);
static initonly Vector2 One = Vector2(1.0, 1.0);
///<summary>
/// Shorthand for writing Vector2(double.PositiveInfinity,
/// double.PositiveInfinity).
///</summary>
static Vector2 PositiveInfinity = Vector2(std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
static initonly Vector2 PositiveInfinity = Vector2(std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
///<summary>
/// Shorthand for writing Vector2(1, 0).
///</summary>
static Vector2 Right = Vector2(1.0, 0.0);
static initonly Vector2 Right = Vector2(1.0, 0.0);
///<summary>
/// Shorthand for writing Vector2(0, 1).
///</summary>
static Vector2 Up = Vector2(0.0, 1.0);
static initonly Vector2 Up = Vector2(0.0, 1.0);
///<summary>
/// Shorthand for writing Vector2(0, 0).
///</summary>
static Vector2 Zero = Vector2(0.0, 0.0);
static initonly Vector2 Zero = Vector2(0.0, 0.0);
#pragma endregion
/*-----------------------------------------------------------------------------*/

View File

@ -35,49 +35,49 @@ namespace SHADE
///<summary>
/// Shorthand for writing Vector3(0, 0, -1).
///</summary>
static const Vector3 Back = Vector3(0.0, 0.0, -1.0);
static initonly Vector3 Back = Vector3(0.0, 0.0, -1.0);
///<summary>
/// Shorthand for writing Vector3(0, -1, 0).
///</summary>
static const Vector3 Down = Vector3(0.0, -1.0, 0.0);
static initonly Vector3 Down = Vector3(0.0, -1.0, 0.0);
///<summary>
/// Shorthand for writing Vector3(0, 0, 1).
///</summary>
static const Vector3 Forward = Vector3(0.0, 0.0, 1.0);
static initonly Vector3 Forward = Vector3(0.0, 0.0, 1.0);
///<summary>
/// Shorthand for writing Vector3(-1, 0, 0).
///</summary>
static const Vector3 Left = Vector3(-1.0, 0.0, 0.0);
static initonly Vector3 Left = Vector3(-1.0, 0.0, 0.0);
///<summary>
/// Shorthand for writing Vector3(double.NegativeInfinity,
/// double.NegativeInfinity, double.NegativeInfinity).
///</summary>
static const Vector3 NegativeInfinity = Vector3(std::numeric_limits<double>::lowest(),
static initonly Vector3 NegativeInfinity = Vector3(std::numeric_limits<double>::lowest(),
std::numeric_limits<double>::lowest(),
std::numeric_limits<double>::lowest());
///<summary>
/// Shorthand for writing Vector3(1, 1, 1).
///</summary>
static const Vector3 One = Vector3(1.0, 1.0, 1.0);
static initonly Vector3 One = Vector3(1.0, 1.0, 1.0);
///<summary>
/// Shorthand for writing Vector3(double.PositiveInfinity,
/// double.PositiveInfinity, double.PositiveInfinity).
///</summary>
static const Vector3 PositiveInfinity = Vector3(std::numeric_limits<double>::max(),
static initonly Vector3 PositiveInfinity = Vector3(std::numeric_limits<double>::max(),
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max());
///<summary>
/// Shorthand for writing Vector3(1, 0, 0).
///</summary>
static const Vector3 Right = Vector3(1.0, 0.0, 0.0);
static initonly Vector3 Right = Vector3(1.0, 0.0, 0.0);
///<summary>
/// Shorthand for writing Vector3(0, 1, 0).
///</summary>
static const Vector3 Up = Vector3(0.0, 1.0, 0.0);
static initonly Vector3 Up = Vector3(0.0, 1.0, 0.0);
///<summary>
/// Shorthand for writing Vector3(0, 0, 0).
///</summary>
static const Vector3 Zero = Vector3(0.0, 0.0, 0.0);
static initonly Vector3 Zero = Vector3(0.0, 0.0, 0.0);
#pragma endregion
/*-----------------------------------------------------------------------------*/

View File

@ -29,7 +29,7 @@ namespace SHADE
/*---------------------------------------------------------------------------------*/
/* Helper Functions */
/*---------------------------------------------------------------------------------*/
System::Reflection::Assembly^ DisposableAssemblyLoadContext::Load(System::Reflection::AssemblyName^ assemblyName)
System::Reflection::Assembly^ DisposableAssemblyLoadContext::Load(System::Reflection::AssemblyName^)
{
return nullptr;
}