This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I added "const int" field into a class. Then invoked "Generate getters". IDE generated getters with "const int" return type. Although not harmful, "const" is not needed here. It looks a bit funny. Class before modification: class PreprocessorDirectiveInfo { private: const int HashOffset; const int EodOffset; public: PreprocessorDirectiveInfo(const int HashOffset, const int EodOffset) : HashOffset(HashOffset), EodOffset(EodOffset) { } // "Insert code" here }; Geterated getters: const int GetEodOffset() const { return EodOffset; } const int GetHashOffset() const { return HashOffset; } Frankly, I'm not sure whether this is a P3, as there is no harm in this :)
compiler issues a warning for such methods: type qualifiers ignored on function return type [-Wignored-qualifiers]
(In reply to Vladimir Kvashin from comment #1) > compiler issues a warning for such methods: > type qualifiers ignored on function return type [-Wignored-qualifiers] I do not see compiler warnings. Please provide additional info about platform and tool collection.