summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eina_mono/eina_binbuf.cs
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-04-02 16:51:05 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-04-02 16:57:52 +0200
commit0d37e8ff4989c2c95a392df67b23c889a8cd9406 (patch)
treec82b358784fa6589b4f8c179579d848b671a5432 /src/bindings/mono/eina_mono/eina_binbuf.cs
parent731db8b64403c06c36a27c6a73b13c4b04a9aacd (diff)
mono: fix space and brace warnings of StyleCop
Summary: The following warning rules of StyleCop are checked. Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011 Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513 Indentation is also applied. Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8485
Diffstat (limited to 'src/bindings/mono/eina_mono/eina_binbuf.cs')
-rw-r--r--src/bindings/mono/eina_mono/eina_binbuf.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bindings/mono/eina_mono/eina_binbuf.cs b/src/bindings/mono/eina_mono/eina_binbuf.cs
index 20a4c2d..24fdaee 100644
--- a/src/bindings/mono/eina_mono/eina_binbuf.cs
+++ b/src/bindings/mono/eina_mono/eina_binbuf.cs
@@ -3,7 +3,8 @@
3using System; 3using System;
4using System.Runtime.InteropServices; 4using System.Runtime.InteropServices;
5 5
6namespace Eina { 6namespace Eina
7{
7 8
8public class Binbuf : IDisposable 9public class Binbuf : IDisposable
9{ 10{
@@ -43,7 +44,7 @@ public class Binbuf : IDisposable
43 44
44 public int Length 45 public int Length
45 { 46 {
46 get { return (int) GetLength(); } 47 get { return (int)GetLength(); }
47 } 48 }
48 49
49 private void InitNew() 50 private void InitNew()
@@ -51,7 +52,9 @@ public class Binbuf : IDisposable
51 Handle = eina_binbuf_new(); 52 Handle = eina_binbuf_new();
52 Own = true; 53 Own = true;
53 if (Handle == IntPtr.Zero) 54 if (Handle == IntPtr.Zero)
55 {
54 throw new SEHException("Could not alloc binbuf"); 56 throw new SEHException("Could not alloc binbuf");
57 }
55 } 58 }
56 59
57 public Binbuf() 60 public Binbuf()
@@ -98,7 +101,8 @@ public class Binbuf : IDisposable
98 { 101 {
99 IntPtr h = Handle; 102 IntPtr h = Handle;
100 Handle = IntPtr.Zero; 103 Handle = IntPtr.Zero;
101 if (Own && h != IntPtr.Zero) { 104 if (Own && h != IntPtr.Zero)
105 {
102 eina_binbuf_free(Handle); 106 eina_binbuf_free(Handle);
103 } 107 }
104 } 108 }
@@ -180,7 +184,9 @@ public class Binbuf : IDisposable
180 { 184 {
181 var ptr = eina_binbuf_string_get(Handle); 185 var ptr = eina_binbuf_string_get(Handle);
182 if (ptr == IntPtr.Zero) 186 if (ptr == IntPtr.Zero)
187 {
183 return null; 188 return null;
189 }
184 190
185 var size = (int)(this.GetLength()); 191 var size = (int)(this.GetLength());
186 byte[] mArray = new byte[size]; 192 byte[] mArray = new byte[size];