Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constification of methods #15

Merged
merged 2 commits into from Dec 29, 2015
Merged

constification of methods #15

merged 2 commits into from Dec 29, 2015

Commits on Sep 15, 2014

  1. const'ify argument to getDeviceIDFromName

    when using C++, we often deal with std::string rather than "char*"
    
    thus, the device-name will often be passed as "s.c_str()", which really
    is a "const char*".
    
    to avoid warnings, it would be good if videoInput::getDeviceIDFromName()
    would accept "const char*".
    
    note: this probably breaks ABI compatibility!
    in this case it might be better to overload this member:
      int videoInput::getDeviceIDFromName(const std::string&name);
    umlaeute committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    2f3b33f View commit details
    Browse the repository at this point in the history
  2. const'ify result of getDeviceName

    since the result of getDeviceName() is really a pointer to a static
    array, the caller should (must) never change these values.
    they should therefore declared "const".
    umlaeute committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    aa69a29 View commit details
    Browse the repository at this point in the history