Bläddra i källkod

Inlining method that was used only once

Source commit: c5ddd42debf2661beae413d7085511a82298c658
Martin Prikryl 2 år sedan
förälder
incheckning
b28836e3fc
2 ändrade filer med 13 tillägg och 24 borttagningar
  1. 13 22
      source/core/ScpFileSystem.cpp
  2. 0 2
      source/core/ScpFileSystem.h

+ 13 - 22
source/core/ScpFileSystem.cpp

@@ -658,17 +658,21 @@ void __fastcall TSCPFileSystem::ReadCommandOutput(int Params, const UnicodeStrin
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TSCPFileSystem::ExecCommand(const UnicodeString & Cmd, int Params,
-  const UnicodeString & CmdString)
+void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
 {
-  if (Params < 0)
-  {
-    Params = ecDefault;
-  }
+  FTerminal->TerminalError(FMTLOAD(INVALID_OUTPUT_ERROR, (Command, Output->Text)));
+}
+//---------------------------------------------------------------------------
+void __fastcall TSCPFileSystem::ExecCommand(TFSCommand Cmd, const TVarRec * args,
+  int size, int Params)
+{
+  if (Params < 0) Params = ecDefault;
+  UnicodeString FullCommand = FCommandSet->FullCommand(Cmd, args, size);
+  UnicodeString Command = FCommandSet->Command(Cmd, args, size);
 
   TOperationVisualizer Visualizer(FTerminal->UseBusyCursor);
 
-  SendCommand(Cmd);
+  SendCommand(Command);
 
   int COParams =
     coWaitForLastLine |
@@ -677,21 +681,8 @@ void __fastcall TSCPFileSystem::ExecCommand(const UnicodeString & Cmd, int Param
     FLAGMASK(FLAGSET(Params, ecReadProgress), coReadProgress) |
     FLAGMASK(FLAGSET(Params, ecIgnoreStdErr), coIgnoreStdErr);
 
-  ReadCommandOutput(COParams, &CmdString);
-}
-//---------------------------------------------------------------------------
-void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
-{
-  FTerminal->TerminalError(FMTLOAD(INVALID_OUTPUT_ERROR, (Command, Output->Text)));
-}
-//---------------------------------------------------------------------------
-void __fastcall TSCPFileSystem::ExecCommand(TFSCommand Cmd, const TVarRec * args,
-  int size, int Params)
-{
-  if (Params < 0) Params = ecDefault;
-  UnicodeString FullCommand = FCommandSet->FullCommand(Cmd, args, size);
-  UnicodeString Command = FCommandSet->Command(Cmd, args, size);
-  ExecCommand(FullCommand, Params, Command);
+  ReadCommandOutput(COParams, &FullCommand);
+
   if (Params & ecRaiseExcept)
   {
     Integer MinL = FCommandSet->MinLines[Cmd];

+ 0 - 2
source/core/ScpFileSystem.h

@@ -114,8 +114,6 @@ private:
   bool __fastcall IsLastLine(UnicodeString & Line);
   static bool __fastcall IsTotalListingLine(const UnicodeString Line);
   void __fastcall EnsureLocation();
-  void __fastcall ExecCommand(const UnicodeString & Cmd, int Params,
-    const UnicodeString & CmdString);
   void __fastcall ExecCommand(TFSCommand Cmd, const TVarRec * args = NULL,
     int size = 0, int Params = -1);
   void InvalidOutputError(const UnicodeString & Command);