diff --git a/CMakeLists.txt b/CMakeLists.txt index a1f5960f72..1e85ca3af2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -408,6 +408,8 @@ endif( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) if( MSVC ) # Disallow implicit linking for Boost add_definitions( -DBOOST_ALL_NO_LIB ) + # But allow it for the UUID so that it will link against bcrypt + add_definitions( -DBOOST_UUID_FORCE_AUTO_LINK ) # Disable MSVC's deprecation warnings add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS ) # Hide Windows's min() and max() macros diff --git a/common/common.cpp b/common/common.cpp index b4b4cf275e..be135284bb 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -51,10 +51,10 @@ static boost::uuids::string_generator stringGenerator; static boost::uuids::nil_generator nilGenerator; // Global nil reference -UUID niluuid( 0 ); +KUUID niluuid( 0 ); -UUID::UUID() : +KUUID::KUUID() : m_uuid( randomGenerator() ), m_cached_timestamp( 0 ) { @@ -73,7 +73,7 @@ UUID::UUID() : } -UUID::UUID( int null ) : +KUUID::KUUID( int null ) : m_uuid( nilGenerator() ), m_cached_timestamp( 0 ) { @@ -81,7 +81,7 @@ UUID::UUID( int null ) : } -UUID::UUID( const wxString& aString ) : +KUUID::KUUID( const wxString& aString ) : m_uuid(), m_cached_timestamp( 0 ) { @@ -117,7 +117,7 @@ UUID::UUID( const wxString& aString ) : } -UUID::UUID( timestamp_t aTimestamp ) +KUUID::KUUID( timestamp_t aTimestamp ) { m_cached_timestamp = aTimestamp; @@ -134,19 +134,19 @@ UUID::UUID( timestamp_t aTimestamp ) } -bool UUID::IsLegacyTimestamp() const +bool KUUID::IsLegacyTimestamp() const { return !m_uuid.data[8] && !m_uuid.data[9] && !m_uuid.data[10] && !m_uuid.data[11]; } -timestamp_t UUID::AsLegacyTimestamp() const +timestamp_t KUUID::AsLegacyTimestamp() const { return m_cached_timestamp; } -size_t UUID::Hash() const +size_t KUUID::Hash() const { size_t hash = 0; @@ -160,20 +160,20 @@ size_t UUID::Hash() const } -void UUID::Clone( const UUID& aUUID ) +void KUUID::Clone( const KUUID& aUUID ) { m_uuid = aUUID.m_uuid; m_cached_timestamp = aUUID.m_cached_timestamp; } -wxString UUID::AsString() const +wxString KUUID::AsString() const { return boost::uuids::to_string( m_uuid ); } -wxString UUID::AsLegacyTimestampString() const +wxString KUUID::AsLegacyTimestampString() const { return wxString::Format( "%8.8lX", (unsigned long) AsLegacyTimestamp() ); } diff --git a/common/project.cpp b/common/project.cpp index 598771c341..1324402c85 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -168,7 +168,7 @@ const wxString PROJECT::libTableName( const wxString& aLibTableName ) const } -const wxString PROJECT::GetSheetName( const UUID& aSheetID ) +const wxString PROJECT::GetSheetName( const KUUID& aSheetID ) { if( m_sheetNames.empty() ) { @@ -184,7 +184,7 @@ const wxString PROJECT::GetSheetName( const UUID& aSheetID ) wxArrayString tokens = wxSplit( entry, ':' ); if( tokens.size() == 2 ) - m_sheetNames[ UUID( tokens[0] ) ] = tokens[1]; + m_sheetNames[ KUUID( tokens[0] ) ] = tokens[1]; } } diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index 11b8a8f859..f935c71cd5 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -33,7 +33,7 @@ #include -void mapExistingAnnotation( std::map& aMap ) +void mapExistingAnnotation( std::map& aMap ) { SCH_SHEET_LIST sheets( g_RootSheet ); SCH_REFERENCE_LIST references; @@ -94,7 +94,7 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic, SCH_MULTI_UNIT_REFERENCE_MAP lockedComponents; // Map of previous annotation for building info messages - std::map previousAnnotation; + std::map previousAnnotation; // Test for and replace duplicate time stamps in components and sheets. Duplicate // time stamps can happen with old schematics, schematic conversions, or manual diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp index 6e440109fd..2b0e185964 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.cpp +++ b/eeschema/dialogs/dialog_fields_editor_global.cpp @@ -184,7 +184,7 @@ protected: // Data store // A map of compID : fieldSet, where fieldSet is a map of fieldName : fieldValue - std::map< UUID, std::map > m_dataStore; + std::map< KUUID, std::map > m_dataStore; public: @@ -269,7 +269,7 @@ public: } else // Other columns are either a single value or ROW_MULTI_ITEMS { - const UUID& compID = ref.GetComp()->m_Uuid; + const KUUID& compID = ref.GetComp()->m_Uuid; if( !m_dataStore.count( compID ) || !m_dataStore[ compID ].count( m_fieldNames[ aCol ] ) ) @@ -418,8 +418,8 @@ public: matchFound = true; } - const UUID& lhRefID = lhRef.GetComp()->m_Uuid; - const UUID& rhRefID = rhRef.GetComp()->m_Uuid; + const KUUID& lhRefID = lhRef.GetComp()->m_Uuid; + const KUUID& rhRefID = rhRef.GetComp()->m_Uuid; // Now check all the other columns. This must be done out of the dataStore // for the refresh button to work after editing. @@ -647,7 +647,7 @@ public: for( unsigned compRef = 0; compRef < m_componentRefs.GetCount(); ++ compRef ) { - const UUID& compId = m_componentRefs[ compRef ].GetComp()->m_Uuid; + const KUUID& compId = m_componentRefs[ compRef ].GetComp()->m_Uuid; wxString text = m_dataStore[ compId ][ column_label ]; width = std::max( width, GetTextSize( text, GetView() ).x ); } diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index d8004770a4..499d7ef51a 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -179,7 +179,7 @@ SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) : if( aComponent.m_part ) m_part.reset( new LIB_PART( *aComponent.m_part.get() ) ); - const_cast( m_Uuid ) = aComponent.m_Uuid; + const_cast( m_Uuid ) = aComponent.m_Uuid; m_transform = aComponent.m_transform; m_prefix = aComponent.m_prefix; diff --git a/eeschema/sch_item.cpp b/eeschema/sch_item.cpp index c0c07954d3..d3d9e39608 100644 --- a/eeschema/sch_item.cpp +++ b/eeschema/sch_item.cpp @@ -77,7 +77,7 @@ SCH_ITEM* SCH_ITEM::Duplicate( bool doClone ) const SCH_ITEM* newItem = (SCH_ITEM*) Clone(); if( !doClone ) - const_cast( newItem->m_Uuid ) = UUID(); + const_cast( newItem->m_Uuid ) = KUUID(); newItem->ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 08fdc501d8..bc412741fc 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -984,7 +984,7 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::loadSheet( LINE_READER& aReader ) { wxString text; parseUnquotedString( text, aReader, line ); - const_cast( sheet->m_Uuid ) = UUID( text ); + const_cast( sheet->m_Uuid ) = KUUID( text ); } else if( *line == 'F' ) // Sheet field. { @@ -1564,7 +1564,7 @@ SCH_COMPONENT* SCH_LEGACY_PLUGIN::loadComponent( LINE_READER& aReader ) wxString text; parseUnquotedString( text, aReader, line, &line ); - const_cast( component->m_Uuid ) = UUID( text ); + const_cast( component->m_Uuid ) = KUUID( text ); } else if( strCompare( "P", line, &line ) ) { diff --git a/eeschema/sch_reference_list.h b/eeschema/sch_reference_list.h index 7e93ac44cb..90b59f583a 100644 --- a/eeschema/sch_reference_list.h +++ b/eeschema/sch_reference_list.h @@ -60,7 +60,7 @@ class SCH_REFERENCE SCH_SHEET_PATH m_SheetPath; ///< The sheet path for this reference. bool m_IsNew; ///< True if not yet annotated. int m_SheetNum; ///< The sheet number for the reference. - UUID m_Uuid; ///< UUID of the component. + KUUID m_Uuid; ///< UUID of the component. EDA_TEXT* m_Value; ///< The component value of the reference. It is the ///< same for all instances. int m_NumRef; ///< The numeric part of the reference designator. diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 1078cd5276..7ea0962cbe 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1086,7 +1086,7 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps() // Reset to fully random UUID. This may lose reference, but better to be // deterministic about it rather than to have duplicate UUIDs with random // side-effects. - const_cast( item->m_Uuid ) = UUID(); + const_cast( item->m_Uuid ) = KUUID(); count++; } } diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 0240cd0534..7f07c48a1f 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -60,7 +60,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) : m_pos = aSheet.m_pos; m_size = aSheet.m_size; m_Layer = aSheet.m_Layer; - const_cast( m_Uuid ) = aSheet.m_Uuid; + const_cast( m_Uuid ) = aSheet.m_Uuid; m_showSheetName = aSheet.m_showSheetName; m_sheetNameSize = aSheet.m_sheetNameSize; m_showFileName = aSheet.m_showFileName; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 5be0ee713f..52b727e9bb 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1055,7 +1055,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) if( dropAnnotations ) { - const_cast( component->m_Uuid ) = UUID(); + const_cast( component->m_Uuid ) = KUUID(); // clear the annotation, but preserve the selected unit int unit = component->GetUnit(); @@ -1069,7 +1069,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) else { // Everything else gets a new UUID - const_cast( item->m_Uuid ) = UUID(); + const_cast( item->m_Uuid ) = KUUID(); } if( item->Type() == SCH_SHEET_T ) diff --git a/include/base_struct.h b/include/base_struct.h index 5a7e936426..2a8eeb0a6b 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -163,7 +163,7 @@ typedef unsigned STATUS_FLAGS; class EDA_ITEM : public KIGFX::VIEW_ITEM { public: - const UUID m_Uuid; + const KUUID m_Uuid; private: diff --git a/include/class_board_item.h b/include/class_board_item.h index 676560b5ef..92dd646153 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -165,7 +165,7 @@ public: BOARD_ITEM* Duplicate() const { EDA_ITEM* dupe = Clone(); - const_cast( dupe->m_Uuid ) = UUID(); + const_cast( dupe->m_Uuid ) = KUUID(); return static_cast( dupe ); } diff --git a/include/common.h b/include/common.h index 9dacc14357..a192fdf3c8 100644 --- a/include/common.h +++ b/include/common.h @@ -62,15 +62,15 @@ class REPORTER; */ typedef uint32_t timestamp_t; -class UUID +class KUUID { public: - UUID(); - UUID( int null ); - UUID( const wxString& aString ); - UUID( timestamp_t aTimestamp ); + KUUID(); + KUUID( int null ); + KUUID( const wxString& aString ); + KUUID( timestamp_t aTimestamp ); - void Clone( const UUID& aUUID ); + void Clone( const KUUID& aUUID ); size_t Hash() const; @@ -80,17 +80,17 @@ public: wxString AsString() const; wxString AsLegacyTimestampString() const; - bool operator==( UUID const& rhs) const + bool operator==( KUUID const& rhs) const { return m_uuid == rhs.m_uuid; } - bool operator!=( UUID const& rhs) const + bool operator!=( KUUID const& rhs) const { return m_uuid != rhs.m_uuid; } - bool operator<( UUID const& rhs) const + bool operator<( KUUID const& rhs) const { return m_uuid < rhs.m_uuid; } @@ -102,10 +102,10 @@ private: }; -extern UUID niluuid; +extern KUUID niluuid; -class UUID_PATH : public std::vector +class UUID_PATH : public std::vector { public: UUID_PATH() @@ -116,7 +116,7 @@ public: for( const wxString& pathStep : wxSplit( aString, '/' ) ) { if( !pathStep.empty() ) - emplace_back( UUID( pathStep ) ); + emplace_back( KUUID( pathStep ) ); } } @@ -124,7 +124,7 @@ public: { wxString path; - for( const UUID& pathStep : *this ) + for( const KUUID& pathStep : *this ) path += '/' + pathStep.AsString(); return path; diff --git a/include/project.h b/include/project.h index caa54738e5..f2e821a1bc 100644 --- a/include/project.h +++ b/include/project.h @@ -115,7 +115,7 @@ public: /** * Return the name of the sheet identified by the given UUID. */ - VTBL_ENTRY const wxString GetSheetName( const UUID& aSheetID ); + VTBL_ENTRY const wxString GetSheetName( const KUUID& aSheetID ); /** * Function FootprintLibTblName @@ -337,7 +337,7 @@ private: wxFileName m_project_name; ///< \/\.pro wxString m_pro_date_and_time; - std::map m_sheetNames; + std::map m_sheetNames; /// @see this::SetRString(), GetRString(), and enum RSTRING_T. wxString m_rstrings[RSTRING_COUNT]; diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 1c479b7317..05d8168bb1 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -546,8 +546,8 @@ public: double GetArea( int aPadding = 0 ) const; - UUID GetLink() const { return m_Link; } - void SetLink( const UUID& aLink ) { m_Link = aLink; } + KUUID GetLink() const { return m_Link; } + void SetLink( const KUUID& aLink ) { m_Link = aLink; } int GetPlacementCost180() const { return m_CntRot180; } void SetPlacementCost180( int aCost ) { m_CntRot180 = aCost; } @@ -708,7 +708,7 @@ private: UUID_PATH m_Path; // Path to associated symbol ([sheetUUID, .., symbolUUID]). timestamp_t m_LastEditTime; int m_arflag; // Use to trace ratsnest and auto routing. - UUID m_Link; // Temporary logical link used during editing + KUUID m_Link; // Temporary logical link used during editing int m_CntRot90; // Horizontal automatic placement cost ( 0..10 ). int m_CntRot180; // Vertical automatic placement cost ( 0..10 ). diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index 96d8b18b65..2538f21413 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -488,7 +488,7 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aDest->Models() = aSrc->Models(); // Linked list of 3D models. // Updating other parameters - const_cast( aDest->m_Uuid ) = aSrc->m_Uuid; + const_cast( aDest->m_Uuid ) = aSrc->m_Uuid; aDest->SetPath( aSrc->GetPath() ); aDest->CalculateBoundingBox(); diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index b233de0b5f..45efa7f9b9 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -826,7 +826,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew ) // and connexions are kept) // and the source_module (old module) is deleted pcbframe->Exchange_Module( source_module, newmodule, commit ); - const_cast( newmodule->m_Uuid ) = module_in_edit->GetLink(); + const_cast( newmodule->m_Uuid ) = module_in_edit->GetLink(); commit.Push( wxT( "Update module" ) ); } else // This is an insert command @@ -839,7 +839,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew ) pcbframe->PlaceModule( newmodule ); newmodule->SetPosition( wxPoint( 0, 0 ) ); viewControls->SetCrossHairCursorPosition( cursorPos, false ); - const_cast( newmodule->m_Uuid ) = UUID(); + const_cast( newmodule->m_Uuid ) = KUUID(); commit.Push( wxT( "Insert module" ) ); pcbframe->Raise(); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 5ae699ae48..11efb6b99b 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1236,7 +1236,7 @@ void LEGACY_PLUGIN::loadMODULE( MODULE* aModule ) aModule->SetPosition( wxPoint( pos_x, pos_y ) ); aModule->SetLayer( layer_id ); aModule->SetOrientation( orient ); - const_cast( aModule->m_Uuid ) = UUID( uuid ); + const_cast( aModule->m_Uuid ) = KUUID( uuid ); aModule->SetLastEditTime( edittime ); } @@ -1252,7 +1252,7 @@ void LEGACY_PLUGIN::loadMODULE( MODULE* aModule ) else if( TESTLINE( "Sc" ) ) // timestamp { char* uuid = strtok_r( (char*) line + SZ( "Sc" ), delims, (char**) &data ); - const_cast( aModule->m_Uuid ) = UUID( uuid ); + const_cast( aModule->m_Uuid ) = KUUID( uuid ); } else if( TESTLINE( "Op" ) ) // (Op)tions for auto placement @@ -1969,7 +1969,7 @@ void LEGACY_PLUGIN::loadPCB_LINE() dseg->SetAngle( angle ); // m_Angle break; case 3: - const_cast( dseg->m_Uuid ) = UUID( data ); + const_cast( dseg->m_Uuid ) = KUUID( data ); break; case 4: STATUS_FLAGS state; @@ -2152,7 +2152,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() char* vJustify = strtok_r( NULL, delims, (char**) &data ); pcbtxt->SetMirrored( !notMirrored ); - const_cast( pcbtxt->m_Uuid ) = UUID( uuid ); + const_cast( pcbtxt->m_Uuid ) = KUUID( uuid ); pcbtxt->SetItalic( !strcmp( style, "Italic" ) ); if( hJustify ) @@ -2274,7 +2274,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) case PCB_VIA_T: newTrack = new VIA( m_board ); break; } - const_cast( newTrack->m_Uuid ) = UUID( uuid ); + const_cast( newTrack->m_Uuid ) = KUUID( uuid ); newTrack->SetPosition( wxPoint( start_x, start_y ) ); newTrack->SetEnd( wxPoint( end_x, end_y ) ); @@ -2471,7 +2471,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( ReadDelimitedText( buf, data, sizeof(buf) ) > (int) sizeof(buf) ) THROW_IO_ERROR( "ZInfo netname too long" ); - const_cast( zc->m_Uuid ) = UUID( uuid ); + const_cast( zc->m_Uuid ) = KUUID( uuid ); // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) @@ -2745,7 +2745,7 @@ void LEGACY_PLUGIN::loadDIMENSION() char* uuid = strtok_r( (char*) data, delims, (char**) &data ); dim->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); - const_cast( dim->m_Uuid ) = UUID( uuid ); + const_cast( dim->m_Uuid ) = KUUID( uuid ); dim->SetShape( shape ); } @@ -2914,7 +2914,7 @@ void LEGACY_PLUGIN::loadPCB_TARGET() wxPoint( pos_x, pos_y ), size, width ); m_board->Add( t, ADD_MODE::APPEND ); - const_cast( t->m_Uuid ) = UUID( uuid ); + const_cast( t->m_Uuid ) = KUUID( uuid ); } } diff --git a/pcbnew/netlist_reader/kicad_netlist_reader.cpp b/pcbnew/netlist_reader/kicad_netlist_reader.cpp index 4cb746cbff..f7e78e0696 100644 --- a/pcbnew/netlist_reader/kicad_netlist_reader.cpp +++ b/pcbnew/netlist_reader/kicad_netlist_reader.cpp @@ -299,7 +299,7 @@ void KICAD_NETLIST_PARSER::parseComponent() wxString library; wxString name; UUID_PATH path; - UUID uuid; + KUUID uuid; // The token comp was read, so the next data is (ref P1) while( (token = NextTok()) != T_RIGHT ) @@ -373,7 +373,7 @@ void KICAD_NETLIST_PARSER::parseComponent() case T_tstamp: NeedSYMBOLorNUMBER(); - uuid = UUID( FROM_UTF8( CurText() ) ); + uuid = KUUID( FROM_UTF8( CurText() ) ); NeedRIGHT(); break; diff --git a/pcbnew/netlist_reader/pcb_netlist.cpp b/pcbnew/netlist_reader/pcb_netlist.cpp index e8fa649c6a..3fc23c96fa 100644 --- a/pcbnew/netlist_reader/pcb_netlist.cpp +++ b/pcbnew/netlist_reader/pcb_netlist.cpp @@ -88,7 +88,7 @@ void COMPONENT::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) wxString path; - for( const UUID& pathStep : m_path ) + for( const KUUID& pathStep : m_path ) path += '/' + pathStep.AsString(); aOut->Print( nl+1, "(timestamp %s)\n", aOut->Quotew( path ).c_str() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_component.h b/pcbnew/pcad2kicadpcb_plugin/pcb_component.h index f734700ba8..2f4e6a870a 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_component.h +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_component.h @@ -52,7 +52,7 @@ public: char m_objType; int m_PCadLayer; PCB_LAYER_ID m_KiCadLayer; - UUID m_uuid; + KUUID m_uuid; int m_positionX; int m_positionY; int m_rotation; diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 1bebd74e5e..3cf32f2e9f 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2036,7 +2036,7 @@ DRAWSEGMENT* PCB_PARSER::parseDRAWSEGMENT( bool aAllowCirclesZeroWidth ) case T_tstamp: NextTok(); - const_cast( segment->m_Uuid ) = UUID( CurStr() ); + const_cast( segment->m_Uuid ) = KUUID( CurStr() ); break; case T_status: @@ -2114,7 +2114,7 @@ TEXTE_PCB* PCB_PARSER::parseTEXTE_PCB() case T_tstamp: NextTok(); - const_cast( text->m_Uuid ) = UUID( CurStr() ); + const_cast( text->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; @@ -2166,7 +2166,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() case T_tstamp: NextTok(); - const_cast( dimension->m_Uuid ) = UUID( CurStr() ); + const_cast( dimension->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; @@ -2176,7 +2176,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() dimension->Text() = *text; // The text is part of the dimension and shares its uuid - const_cast( dimension->Text().m_Uuid ) = dimension->m_Uuid; + const_cast( dimension->Text().m_Uuid ) = dimension->m_Uuid; // Fetch other dimension properties out of the text item dimension->SetPosition( text->GetTextPos() ); @@ -2385,7 +2385,7 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments ) case T_tstamp: NextTok(); - const_cast( module->m_Uuid ) = UUID( CurStr() ); + const_cast( module->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; @@ -2815,7 +2815,7 @@ EDGE_MODULE* PCB_PARSER::parseEDGE_MODULE() case T_tstamp: NextTok(); - const_cast( segment->m_Uuid ) = UUID( CurStr() ); + const_cast( segment->m_Uuid ) = KUUID( CurStr() ); break; case T_status: @@ -3398,7 +3398,7 @@ TRACK* PCB_PARSER::parseTRACK() case T_tstamp: NextTok(); - const_cast( track->m_Uuid ) = UUID( CurStr() ); + const_cast( track->m_Uuid ) = KUUID( CurStr() ); break; case T_status: @@ -3482,7 +3482,7 @@ VIA* PCB_PARSER::parseVIA() case T_tstamp: NextTok(); - const_cast( via->m_Uuid ) = UUID( CurStr() ); + const_cast( via->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; @@ -3570,7 +3570,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent ) case T_tstamp: NextTok(); - const_cast( zone->m_Uuid ) = UUID( CurStr() ); + const_cast( zone->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; @@ -3999,7 +3999,7 @@ PCB_TARGET* PCB_PARSER::parsePCB_TARGET() case T_tstamp: NextTok(); - const_cast( target->m_Uuid ) = UUID( CurStr() ); + const_cast( target->m_Uuid ) = KUUID( CurStr() ); NeedRIGHT(); break; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 36dd4fb8e5..a943ade880 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -965,7 +965,7 @@ int SELECTION_TOOL::selectNet( const TOOL_EVENT& aEvent ) void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetID ) { - UUID uuid( aSheetID ); + KUUID uuid( aSheetID ); std::list modList; // store all modules that are on that sheet @@ -974,7 +974,7 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetID ) if( module == nullptr ) continue; - for( const UUID& pathStep : module->GetPath() ) + for( const KUUID& pathStep : module->GetPath() ) { if( pathStep == uuid ) {