From 1158775084bfb5ae9a6382cb2e99b7bd3c5fafb7 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 24 Oct 2019 18:24:07 -0300 Subject: [PATCH] eina_mono: Initialize UNHANDLED_EXCEPTION inline Summary: fix CA2207 ref T8427 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true ninja test Reviewers: lauromoura, felipealmeida, brunobelo Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8427 Differential Revision: https://phab.enlightenment.org/D10463 --- src/bindings/mono/eina_mono/eina_error.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bindings/mono/eina_mono/eina_error.cs b/src/bindings/mono/eina_mono/eina_error.cs index ea73ee54f7..5c4ac9345b 100644 --- a/src/bindings/mono/eina_mono/eina_error.cs +++ b/src/bindings/mono/eina_mono/eina_error.cs @@ -41,7 +41,7 @@ public struct Error : IComparable /// Unhandled Exception error identifier. /// Since EFL 1.23. /// - public static readonly Error UNHANDLED_EXCEPTION; + public static readonly Error UNHANDLED_EXCEPTION = eina_error_msg_register("Unhandled C# exception occurred."); /// /// No error identifier. @@ -115,11 +115,6 @@ public struct Error : IComparable return "Eina.Error(" + code + ")"; } - static Error() - { - UNHANDLED_EXCEPTION = eina_error_msg_register("Unhandled C# exception occurred."); - } - [DllImport(efl.Libs.Eina)] static extern Error eina_error_msg_register(string msg); [DllImport(efl.Libs.Eina)] static extern Error eina_error_get(); [DllImport(efl.Libs.Eina)] static extern void eina_error_set(Error error);