Skip to content

Commit 409636b

Browse files
authored
Merge pull request #470 from giraf-fe/master
remove nested namespace definitions to maintain compatibility with C++11
2 parents 4bc3730 + d3f6073 commit 409636b

1 file changed

Lines changed: 20 additions & 12 deletions

File tree

RtAudio.h

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
#include <functional>
8686
#include <memory>
8787

88-
namespace rt::audio {
88+
namespace rt {
89+
namespace audio {
8990

9091
/*! \typedef typedef unsigned long RtAudioFormat;
9192
\brief RtAudio data format type.
@@ -650,7 +651,8 @@ class RTAUDIO_DLL_PUBLIC RtAudio
650651
std::shared_ptr<RtApi> rtapi_;
651652
};
652653

653-
}
654+
} // namespace audio
655+
} // namespace rt
654656

655657
// Operating system dependent thread functionality.
656658
#if defined(_MSC_VER)
@@ -662,22 +664,24 @@ class RTAUDIO_DLL_PUBLIC RtAudio
662664
#include <process.h>
663665
#include <stdint.h>
664666

665-
inline namespace rt {
666-
inline namespace audio {
667+
namespace rt {
668+
namespace audio {
667669
typedef uintptr_t ThreadHandle;
668670
typedef CRITICAL_SECTION StreamMutex;
669-
}
670-
}
671+
} // namespace audio
672+
} // namespace rt
671673

672674
#else
673675

674676
// Using pthread library for various flavors of unix.
675677
#include <pthread.h>
676678

677-
namespace rt::audio {
679+
namespace rt {
680+
namespace audio {
678681
typedef pthread_t ThreadHandle;
679682
typedef pthread_mutex_t StreamMutex;
680-
}
683+
} // namespace audio
684+
} // namespace rt
681685

682686
#endif
683687

@@ -690,7 +694,8 @@ namespace rt::audio {
690694

691695
#endif
692696

693-
namespace rt::audio {
697+
namespace rt {
698+
namespace audio {
694699

695700
// This global structure type is used to pass callback information
696701
// between the private RtAudio stream structure and global callback
@@ -750,15 +755,17 @@ class S24 {
750755
};
751756
#pragma pack(pop)
752757

753-
}
758+
} // namespace audio
759+
} // namespace rt
754760

755761
#if defined( HAVE_GETTIMEOFDAY )
756762
#include <sys/time.h>
757763
#endif
758764

759765
#include <sstream>
760766

761-
namespace rt::audio {
767+
namespace rt {
768+
namespace audio {
762769

763770
class RTAUDIO_DLL_PUBLIC RtApi
764771
{
@@ -945,7 +952,8 @@ inline void RtAudio :: setStreamTime( double time ) { return rtapi_->setStreamTi
945952
inline void RtAudio :: setErrorCallback( RtAudioErrorCallback errorCallback ) { rtapi_->setErrorCallback( errorCallback ); }
946953
inline void RtAudio :: showWarnings( bool value ) { rtapi_->showWarnings( value ); }
947954

948-
}
955+
} // namespace audio
956+
} // namespace rt
949957

950958
#endif
951959

0 commit comments

Comments
 (0)