Exemple #1
0
	bool matches_pattern( const string& str, const string& pattern, const char* pattern_delim_chars )
	{
		std::vector<std::string> patterns = split_str( pattern, pattern_delim_chars );
		for ( auto p : patterns ) {
#ifdef FLUT_COMP_MSVC
			flut_assert_msg( strcmp( pattern_delim_chars, ";" ) == 0, "Pattern delimiter must be ';' for MSVC" );
			if ( PathMatchSpecEx( str.c_str(), p.c_str(), PMSF_NORMAL ) == S_OK )
				return true;
#else
			if ( fnmatch( p.c_str(), str.c_str(), FNM_NOESCAPE ) == 0 )
				return true;
#endif
		}
		return false;
	}
Exemple #2
0
		void resize_buffer() {
			flut_assert_msg( cur_frame == 0, "regular_ring_buffer can only be resized when empty" );
			data.resize( num_frames * this->channel_count() );
		}