D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2020-01-29 Thread Tomaz Canabrava
tcanabrava abandoned this revision. REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D26128 To: tcanabrava, ervin Cc: ervin, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-23 Thread Kevin Ottens
ervin added inline comments. INLINE COMMENTS > tcanabrava wrote in kconfig_compiler.cpp:1122 > .contains adds way more readability than > std::find_if(std::begin(temporaryStringVector), > std::end(temporaryStringVector) != std::end(temporaryStringVector), so I > opted for this. You know this

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-23 Thread Tomaz Canabrava
tcanabrava added inline comments. INLINE COMMENTS > apol wrote in kconfig_compiler.cpp:1122 > If instead of creating a QVector you used an initializer list directly, you > could use std::find_if without having to initialize it entirely. Also you'd > be able to use QLatin1String which would

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-23 Thread Tomaz Canabrava
tcanabrava added a comment. In D26128#582304 , @ervin wrote: > This also has similarities with D26126 , has the same defects and missed opportunities for sharing. > > Beside I'm not sure what we're trying

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-23 Thread Kevin Ottens
ervin requested changes to this revision. ervin added a comment. This revision now requires changes to proceed. This also has similarities with D26126 , has the same defects and missed opportunities for sharing. Beside I'm not sure what we're trying to

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-22 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > kconfig_compiler.cpp:1122 > +// Types that `{}` are ok as return type for default value. > +if (QVector({ > +QLatin1String("stringlist"), If instead of creating a QVector you used an initializer list directly, you could use

D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

2019-12-20 Thread Tomaz Canabrava
tcanabrava created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. tcanabrava requested review of this revision. TEST PLAN Recompiled and run the unittests REPOSITORY R237 KConfig BRANCH simplifyDefaultValue REVISION DETAIL