mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 516385 - Only use as much space as needed for PDOMCPPAliasTemplate and PDOMCPPAliasTemplateInstance records
Change-Id: Ib8e0de13c49f715806d8c29cb4e8cf07182d5f50
This commit is contained in:
parent
1594835cc6
commit
a0aeb9153d
3 changed files with 6 additions and 5 deletions
|
@ -284,10 +284,11 @@ public class PDOM extends PlatformObject implements IPDOM {
|
|||
* CDT 9.3 development (versions not supported on the 9.2.x branch)
|
||||
* 207.0 - Store a caller record for macro reference names.
|
||||
* 208.0 - Trigger index rebuild to rebuild corrupted binding reference lists, bug 399147.
|
||||
* 209.0 - Alias templates and their instances take up more space than required, bug 516385.
|
||||
*/
|
||||
private static final int MIN_SUPPORTED_VERSION= version(208, 0);
|
||||
private static final int MAX_SUPPORTED_VERSION= version(208, Short.MAX_VALUE);
|
||||
private static final int DEFAULT_VERSION = version(208, 0);
|
||||
private static final int MIN_SUPPORTED_VERSION= version(209, 0);
|
||||
private static final int MAX_SUPPORTED_VERSION= version(209, Short.MAX_VALUE);
|
||||
private static final int DEFAULT_VERSION = version(209, 0);
|
||||
|
||||
private static int version(int major, int minor) {
|
||||
return (major << 16) + minor;
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
*/
|
||||
class PDOMCPPAliasTemplate extends PDOMCPPBinding implements ICPPAliasTemplate, IPDOMCPPTemplateParameterOwner {
|
||||
private static final int ALIASED_TYPE_SIZE = Database.TYPE_SIZE;
|
||||
private static final int TEMPLATE_PARAMS_SIZE = PDOMCPPTemplateTemplateParameter.RECORD_SIZE;
|
||||
private static final int TEMPLATE_PARAMS_SIZE = Database.PTR_SIZE;
|
||||
@SuppressWarnings("hiding")
|
||||
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + ALIASED_TYPE_SIZE + TEMPLATE_PARAMS_SIZE;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class PDOMCPPAliasTemplateInstance extends PDOMCPPTypedef implements ICPPAliasTe
|
|||
private static final int TEMPLATE_DEFINITION_OFFSET = PDOMCPPTypedef.RECORD_SIZE;
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
protected static final int RECORD_SIZE = TEMPLATE_DEFINITION_OFFSET + Database.TYPE_SIZE;
|
||||
protected static final int RECORD_SIZE = TEMPLATE_DEFINITION_OFFSET + Database.PTR_SIZE;
|
||||
|
||||
private volatile ICPPAliasTemplate fTemplateDefinition;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue