Giter VIP home page Giter VIP logo

Comments (5)

krs-world avatar krs-world commented on August 30, 2024

Taken care of most of these(in constructors, mostly), except template type members, which are difficult to initialize -- there seems to be lots of discussions on this on stack overflow.

from bridges-cxx.

dcarmer avatar dcarmer commented on August 30, 2024

As I understand it, a class' default constructor is always called, but this isn't true for built in types, as they may be anything. For example int a; will likely leave a=0, but it isn't guaranteed. But if a "constructor" is called, for example int a=int(); it will explicitly be default value initialized.

This applies to template parameters as well: E e = E(); and K key = K();

from bridges-cxx.

krs-world avatar krs-world commented on August 30, 2024

template param initializations fixed.. dont see the uninitialized variables in ElementVisualizer or LinkVisualizer.

from bridges-cxx.

dcarmer avatar dcarmer commented on August 30, 2024

ElementVisualizer doesn't default initialize the "key" value, but this isnt really a problem as there is no getfunction.

LinkVisualizer doesn't default initialize the "weight" value, and because there is a getfunction, this will lead to an empty string being set and returned for weight, if it isn't set before a get call, which would be problematic.

The others look good though.

from bridges-cxx.

krs-world avatar krs-world commented on August 30, 2024

Good catch, will fix (linkvisualizer)..

 -- krs

On 11/17/15 3:58 PM, Dakota Carmer wrote:

ElementVisualizer doesn't default initialize the "key" value, but this
isnt really a problem as there is no getfunction.

LinkVisualizer doesn't default initialize the "weight" value, and
because there is a getfunction, this will lead to an empty string
being set and returned for weight, if it isn't set before a get call,
which would be problematic.

The others look good though.


Reply to this email directly or view it on GitHub
#4 (comment).

Kalpathi Subramanian Ph: 704 687 8579
Associate Professor Email: [email protected]
Dept of Computer Science Web:http://webpages.uncc.edu/~krs
The University of North Carolina
Charlotte, NC 28202-0001

from bridges-cxx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.