Ignore:
Timestamp:
Mar 19, 2012, 1:59:48 AM (13 years ago)
Author:
イグトランス (egtra)
Message:

egtraブランチの内容をマージ。

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ab5.0/abdev

    • Property svn:ignore set to
      *.opensdf
      *.sdf
      *.suo
      *.user
      int
      ipch
      out
  • trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp

    r750 r828  
    2626}
    2727
    28 void AddSourceCode(const char *buffer){
    29     char *temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192);
    30     lstrcpy(temp,buffer);
    31 
    32     MakeMiddleCode( temp );
     28void AddSourceCode(const char *buffer)
     29{
     30    std::size_t size = std::strlen(buffer) + 8192;
     31    std::unique_ptr<char[]> temp(new char[size]);
     32    strcpy_s(temp.get(), size, buffer);
     33
     34    MakeMiddleCode(temp.get());
    3335
    3436    //最後尾に貼り付け
    35     compiler.GetObjectModule().GetSource().Addition( temp );
    36 
    37     HeapDefaultFree(temp);
     37    compiler.GetObjectModule().GetSource().Addition(temp.get());
    3838}
    3939
Note: See TracChangeset for help on using the changeset viewer.