/[svn]/linuxsampler/trunk/src/common/optional.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/optional.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3513 by schoenebeck, Tue Sep 14 17:09:08 2010 UTC revision 3514 by schoenebeck, Sat May 25 17:22:08 2019 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2010 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2019 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 92  namespace LinuxSampler { Line 92  namespace LinuxSampler {
92                  return *this;                  return *this;
93              }              }
94    
95                bool operator ==(const optional& o) const {
96                    if (!initialized || !o.initialized)
97                        return initialized == o.initialized;
98                    return data == o.data;
99                }
100    
101                bool operator !=(const optional& o) const {
102                    return !(*this == o);
103                }
104    
105              const T& operator *() const throw (Exception) { return get(); }              const T& operator *() const throw (Exception) { return get(); }
106              T&       operator *()       throw (Exception) { return get(); }              T&       operator *()       throw (Exception) { return get(); }
107    

Legend:
Removed from v.3513  
changed lines
  Added in v.3514

  ViewVC Help
Powered by ViewVC