1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
Files
winscp/source/core/NamedObjs.h
Martin Prikryl 3f4e41fee0 Clang imposed changes that should be noop and have no effect on classic compiler
Mostly:
– incorrectly identified uninitialized variables
– explicit static global variables
– const, sign and down casts and safety
– typename use
– semicolon after function implementation
– unused variables, fields, arguments and macros
– field initialization order
– exact include filename case
– redundant in code macros already defined at project level

(cherry picked from commit f7f00c631e)

Source commit: 90ad9390853aba308abe73cf02e0281238c53c87
2025-03-13 16:46:26 +01:00

53 lines
1.8 KiB
C++

//---------------------------------------------------------------------------
#ifndef NamedObjsH
#define NamedObjsH
#include <System.hpp>
#include <Contnrs.hpp>
//---------------------------------------------------------------------------
class TNamedObjectList;
class TNamedObject : public TPersistent
{
public:
__property UnicodeString Name = { read = FName, write = SetName };
__property bool Hidden = { read = FHidden };
__fastcall TNamedObject() {}
bool __fastcall IsSameName(const UnicodeString & Name);
virtual int __fastcall Compare(TNamedObject * Other);
__fastcall TNamedObject(UnicodeString aName);
void __fastcall MakeUniqueIn(TNamedObjectList * List);
private:
UnicodeString FName;
bool FHidden;
void __fastcall SetName(UnicodeString value);
};
//---------------------------------------------------------------------------
class TNamedObjectList : public TObjectList
{
private:
int __fastcall GetCount();
int __fastcall GetCountIncludingHidden();
virtual void __fastcall Notify(void *Ptr, TListNotification Action);
protected:
int FHiddenCount;
bool FControlledAdd;
void __fastcall Recount();
public:
static const UnicodeString HiddenPrefix;
bool AutoSort;
__fastcall TNamedObjectList();
void __fastcall AlphaSort();
int __fastcall Add(TObject * AObject);
virtual TNamedObject * __fastcall AtObject(Integer Index);
TNamedObject * __fastcall FindByName(const UnicodeString & Name);
__property int Count = { read = GetCount };
__property int CountIncludingHidden = { read = GetCountIncludingHidden };
};
//---------------------------------------------------------------------------
int __fastcall NamedObjectSortProc(void * Item1, void * Item2);
//---------------------------------------------------------------------------
#endif