Ignore:
Timestamp:
Aug 7, 2011, 4:30:08 PM (13 years ago)
Author:
イグトランス (egtra)
Message:

Typeクラスを単体テスト可能な状態へ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp

    r750 r820  
    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.