Skip to content

Commit

Permalink
delete unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
poderosaproject committed Feb 11, 2024
1 parent eebde23 commit ac72184
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions SerialPort/SerialConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,6 @@ public ITerminalConnection EstablishConnection(IPoderosaMainWindow window, ITerm

internal class SerialPortUtil {
public static SerialTerminalConnection CreateNewSerialConnection(IPoderosaMainWindow window, SerialTerminalParam param, SerialTerminalSettings settings) {
bool successful = false;
FileStream strm = null;
try {
StringResource sr = SerialPortPlugin.Instance.Strings;
//Debug.WriteLine("OPENING COM"+param.Port);
Expand Down Expand Up @@ -598,7 +596,6 @@ public static SerialTerminalConnection CreateNewSerialConnection(IPoderosaMainWi
timeouts.WriteTotalTimeoutConstant = 100;
timeouts.WriteTotalTimeoutMultiplier = 100;
Win32Serial.SetCommTimeouts(ptr, ref timeouts);
successful = true;
SerialTerminalConnection r = new SerialTerminalConnection(param, settings, ptr);
return r;
}
Expand All @@ -610,10 +607,6 @@ public static SerialTerminalConnection CreateNewSerialConnection(IPoderosaMainWi
GUtil.Warning(Form.ActiveForm, ex.Message); //TODO 苦しい逃げ。IPoderosaFormを実装したベースクラスをCoreにでも持っていたほうがいいのか
return null;
}
finally {
if (!successful && strm != null)
strm.Close();
}
}
public static bool FillDCB(IntPtr handle, ref Win32Serial.DCB dcb) {
dcb.DCBlength = (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(Win32Serial.DCB)); //sizeofくらいunsafeでなくても使わせてくれよ
Expand Down

0 comments on commit ac72184

Please sign in to comment.