Skip to content

Commit

Permalink
OcdFileImport: Review incorporation
Browse files Browse the repository at this point in the history
  • Loading branch information
dl3sdo committed Nov 19, 2024
1 parent e363653 commit 2d1add8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/fileformats/ocd_file_import.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2013-2022, 2024 Kai Pastor
* Copyright 2017-2024 Libor Pecháček
* Copyright 2021-2024 Matthias Kühlewein
* Copyright 2017-2020, 2024 Libor Pecháček
* Copyright 2021-2022, 2024 Matthias Kühlewein
*
* Some parts taken from file_format_oc*d8{.h,_p.h,cpp} which are
* Copyright 2012 Pete Curtis
Expand Down Expand Up @@ -114,9 +114,9 @@ OcdFileImport::OcdImportedPathObject::~OcdImportedPathObject() = default;
OcdFileImport::OcdFileImport(const QString& path, Map* map, MapView* view)
: Importer { path, map, view }
, custom_8bit_encoding { codecFromSettings() }
, graphic_objects_hidden(false)
, layout_objects_hidden(false)
, image_objects_displaymode(0)
, graphic_objects_hidden { false }
, layout_objects_hidden { false }
, image_objects_displaymode { 0 }
{
if (!custom_8bit_encoding)
{
Expand Down Expand Up @@ -2091,9 +2091,9 @@ Symbol* OcdFileImport::getSpecialObjectSymbol(const O& ocd_object)
int num_colors = map->getNumColors();
for (int i = 0; i < num_colors; ++i)
{
auto map_cymk = map->getColor(i)->getCmyk();
if (map_cymk == cmyk) // actually a fuzzy comparision
return const_cast<MapColor*>(map->getColor(i));
const auto* map_color = map->getColor(i);
if (map_color->getCmyk() == cmyk) // actually a fuzzy comparision
return const_cast<MapColor*>(map_color);
}
auto new_color = new MapColor(tr("Imported layout or image object"), num_colors);
new_color->setCmyk(cmyk);
Expand Down
10 changes: 5 additions & 5 deletions src/fileformats/ocd_file_import.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2023 Kai Pastor
* Copyright 2013-2018, 2024 Kai Pastor
*
* Some parts taken from file_format_oc*d8{.h,_p.h,cpp} which are
* Copyright 2012 Pete Curtis
Expand Down Expand Up @@ -31,8 +31,8 @@
#include <QByteArray>
#include <QCoreApplication>
#include <QHash>
#include <QSet>
#include <QLocale>
#include <QSet>
#include <QString>

#include "core/map_coord.h"
Expand Down Expand Up @@ -85,7 +85,7 @@ class OcdFileImport : public Importer
QString unnumbered_text;
};

// Helper classes that provide to core classes' protected members
// Helper classes that provide access to core classes' protected members

class OcdImportedAreaSymbol : public AreaSymbol
{
Expand Down Expand Up @@ -302,9 +302,9 @@ class OcdFileImport : public Importer
/** Drop the symbol's custom icon if it can be reproduced by Mapper.
*
* Mapper normally generates symbol icons in the required size, but OCD
* format carries user-defined rastern icons. These imported low resolution
* format carries user-defined raster icons. These imported low resolution
* icons needs to be kept and used only if they are really different from
* the default icons generatored by Mapper.
* the default icons generated by Mapper.
*/
template< class OcdBaseSymbol >
void dropRedundantIcon(Symbol* symbol, const OcdBaseSymbol& ocd_base_symbol);
Expand Down

0 comments on commit 2d1add8

Please sign in to comment.