Global Metrics
path: .metrics.halstead.level
old: 0.1484375
new: 0.03970452446906741
path: .metrics.halstead.time
old: 129.91131233981125
new: 2316.0900516194033
path: .metrics.halstead.n1
old: 8.0
new: 19.0
path: .metrics.halstead.volume
old: 347.1067876579332
new: 1655.2665742875513
path: .metrics.halstead.estimated_program_length
old: 104.71062275542812
new: 314.0400072076183
path: .metrics.halstead.vocabulary
old: 27.0
new: 62.0
path: .metrics.halstead.length
old: 73.0
new: 278.0
path: .metrics.halstead.effort
old: 2338.4036221166025
new: 41689.620929149256
path: .metrics.halstead.purity_ratio
old: 1.4343920925401112
new: 1.1296403136964688
path: .metrics.halstead.n2
old: 19.0
new: 43.0
path: .metrics.halstead.N2
old: 32.0
new: 114.0
path: .metrics.halstead.difficulty
old: 6.7368421052631575
new: 25.186046511627907
path: .metrics.halstead.N1
old: 41.0
new: 164.0
path: .metrics.halstead.bugs
old: 0.058725275379725966
new: 0.40077200391326495
path: .metrics.nexits.sum
old: 0.0
new: 2.0
path: .metrics.nexits.average
old: 0.0
new: 0.4
path: .metrics.nargs.average
old: 14.0
new: 0.6
path: .metrics.nargs.sum
old: 14.0
new: 3.0
path: .metrics.cyclomatic.average
old: 1.0
new: 1.125
path: .metrics.cyclomatic.sum
old: 2.0
new: 9.0
path: .metrics.mi.mi_original
old: 76.42633586418862
new: 54.0946805347691
path: .metrics.mi.mi_sei
old: 81.1471788860995
new: 42.62314287251221
path: .metrics.mi.mi_visual_studio
old: 44.69376366326819
new: 31.63431610220415
path: .metrics.loc.blank
old: 2.0
new: 17.0
path: .metrics.loc.ploc
old: 19.0
new: 56.0
path: .metrics.loc.lloc
old: 3.0
new: 13.0
path: .metrics.loc.sloc
old: 51.0
new: 111.0
path: .metrics.loc.cloc
old: 30.0
new: 38.0
path: .metrics.nom.functions
old: 1.0
new: 5.0
path: .metrics.nom.total
old: 1.0
new: 5.0
Spaces Data
Minimal test - lines (24, 66)
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: 0.0
new: 0.3333333333333333
path: .spaces[0].metrics.loc.lloc
old: 3.0
new: 1.0
path: .spaces[0].metrics.loc.cloc
old: 10.0
new: 11.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 7.0
path: .spaces[0].metrics.loc.ploc
old: 15.0
new: 25.0
path: .spaces[0].metrics.loc.sloc
old: 23.0
new: 43.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 3.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 3.0
path: .spaces[0].metrics.nargs.sum
old: 14.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 14.0
new: 0.3333333333333333
path: .spaces[0].metrics.halstead.effort
old: 2330.539119760573
new: 8950.709124378141
path: .spaces[0].metrics.halstead.time
old: 129.47439554225406
new: 497.26161802100785
path: .spaces[0].metrics.halstead.bugs
old: 0.05859353184639198
new: 0.1436978844904874
path: .spaces[0].metrics.halstead.N2
old: 28.0
new: 52.0
path: .spaces[0].metrics.halstead.n1
old: 8.0
new: 13.0
path: .spaces[0].metrics.halstead.volume
old: 312.1257749679339
new: 635.5533106067319
path: .spaces[0].metrics.halstead.vocabulary
old: 23.0
new: 37.0
path: .spaces[0].metrics.halstead.length
old: 69.0
new: 122.0
path: .spaces[0].metrics.halstead.difficulty
old: 7.466666666666667
new: 14.083333333333334
path: .spaces[0].metrics.halstead.n2
old: 15.0
new: 24.0
path: .spaces[0].metrics.halstead.N1
old: 41.0
new: 70.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.1971501294801128
new: 1.2962689865011634
path: .spaces[0].metrics.halstead.estimated_program_length
old: 82.60335893412778
new: 158.14481635314195
path: .spaces[0].metrics.halstead.level
old: 0.13392857142857142
new: 0.07100591715976332
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 4.0
path: .spaces[0].metrics.mi.mi_original
old: 90.10928129828456
new: 75.58517905696422
path: .spaces[0].metrics.mi.mi_visual_studio
old: 52.6954861393477
new: 44.2018590976399
path: .spaces[0].metrics.mi.mi_sei
old: 97.0459913087443
new: 69.04279193526021
Code
class nsTLiteralString : public mozilla::detail::nsTStringRepr {
public:
typedef nsTLiteralString self_type;
#ifdef __clang__
// bindgen w/ clang 3.9 at least chokes on a typedef, but using is okay.
using typename mozilla::detail::nsTStringRepr::base_string_type;
#else
// On the other hand msvc chokes on the using statement. It seems others
// don't care either way so we lump them in here.
typedef typename mozilla::detail::nsTStringRepr::base_string_type
base_string_type;
#endif
typedef typename base_string_type::char_type char_type;
typedef typename base_string_type::size_type size_type;
typedef typename base_string_type::DataFlags DataFlags;
typedef typename base_string_type::ClassFlags ClassFlags;
public:
/**
* constructor
*/
template
explicit constexpr nsTLiteralString(const char_type (&aStr)[N])
: nsTLiteralString(aStr, N - 1) {}
/**
* For compatibility with existing code that requires const ns[C]String*.
* Use sparingly. If possible, rewrite code to use const ns[C]String&
* and the implicit cast will just work.
*/
MOZ_LIFETIME_BOUND const nsTString& AsString() const {
return *reinterpret_cast*>(this);
}
MOZ_LIFETIME_BOUND operator const nsTString&() const { return AsString(); }
template
struct raw_type {
typedef N* type;
};