Pointer cleanup (#242)

- Made greater use of smart pointers, eliminating many instances of manual memory management
- Do not use pointers at all for many non-polymorphic classes
- Assorted other code cleanup
This commit is contained in:
Jaye Evins
2025-10-31 16:11:28 -04:00
committed by GitHub
parent fd10d88be5
commit 8c8e447336
159 changed files with 3364 additions and 4045 deletions
+5 -5
View File
@@ -29,16 +29,16 @@ namespace glabels
///
/// Constructor
///
RollTemplatePath::RollTemplatePath( const model::Template* tmplate )
RollTemplatePath::RollTemplatePath( const model::Template& tmplate )
{
if ( !tmplate->isRoll() )
if ( !tmplate.isRoll() )
{
qWarning() << "Not a \"Roll\" template type.";
}
model::Distance x0 = (tmplate->pageWidth() - tmplate->rollWidth()) / 2.0;
model::Distance w = tmplate->rollWidth();
model::Distance h = tmplate->pageHeight();
model::Distance x0 = (tmplate.pageWidth() - tmplate.rollWidth()) / 2.0;
model::Distance w = tmplate.rollWidth();
model::Distance h = tmplate.pageHeight();
model::Distance c = 0.07*h;
model::Distance b = 0.03*h;