Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
New GDX release 7.11.9

See merge request devel/gdx!85
  • Loading branch information
0x17 committed Oct 24, 2024
2 parents 9928f55 + a51cac3 commit d856f79
Show file tree
Hide file tree
Showing 10 changed files with 181 additions and 255 deletions.
3 changes: 3 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- 7.11.9:
- Made gdxOpenRead not lock the file (from being deleted) on Windows.
- Removed unnecessary dependency on "dladdr" as requested in GitHub issue.
- 7.11.8:
- Added C++ port of GDX utilities gdxdiff, gdxdump, and gdxmerge.
- 7.11.7:
Expand Down
7 changes: 5 additions & 2 deletions src/gdlib/gmacro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ bool TGAMSMacro::Define( const std::string &p, int &LUsed )
}
Body.clear();
LUsed = static_cast<int>( p.length() );
// fake trailing blank
Rdr.pr.push_back( ' ' );
return AddToBody( Rdr.pr );
}

Expand All @@ -342,8 +344,9 @@ bool TGAMSMacro::AddToBody( const std::string &p )

TPWriter Wrt;
Wrt.StoreStr( Body );
const auto L = static_cast<int>( p.length() );
const TPReader Rdr { p };
//no trailing blank
const auto L = static_cast<int>( p.length() ) - 1;
const TPReader Rdr { p.substr(0, L) };
const bool res { Rdr.ChFromEnd( 0 ) == '\\' };
if( !res ) Wrt.StoreTrimStr( p );
else
Expand Down
7 changes: 7 additions & 0 deletions src/gdlib/gmsheapnew.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ class THeapMgr final
return new(XGetMem<T>()) T {};
}

// Use perfect forwarding for arguments to T's constructor
template<typename T, typename... Args>
inline T *XGetMemCreat( Args &&...args )
{
return new( XGetMem<T>() ) T( std::forward<Args>( args )... );
}

void *XGetMemNC( int Size );
void *XAllocMem( int Size );

Expand Down
4 changes: 4 additions & 0 deletions src/gdlib/nlcodebase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "nlcodebase.h"

namespace gdlib::nlcodebase {
}
10 changes: 10 additions & 0 deletions src/gdlib/nlcodebase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

namespace gdlib::nlcodebase {

class TNLInstStoreBase {
public:
bool NLCodeEmitted {};
};

}
Loading

0 comments on commit d856f79

Please sign in to comment.