diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
mmm a / libs / filamentjs / tests / test_parquet . js <nl> ppp b / libs / filamentjs / tests / test_parquet . js <nl> class App { <nl> const ao = Filament . createTextureFromPng ( Filament . assets [ ' floor_ao_roughness_metallic . png ' ] , engine ) ; <nl> const basecolor = Filament . createTextureFromPng ( Filament . assets [ ' floor_basecolor . png ' ] , engine ) ; <nl> const normal = Filament . createTextureFromPng ( Filament . assets [ ' floor_normal . png ' ] , engine ) ; <nl> - matinstance . setTextureParameter ( " aoRoughnessMetallic " , ao , sampler ) <nl> + matinstance . setTextureParameter ( ' aoRoughnessMetallic ' , ao , sampler ) <nl> matinstance . setTextureParameter ( " baseColor " , basecolor , sampler ) <nl> matinstance . setTextureParameter ( " normal " , normal , sampler ) <nl> <nl>
Update libs / filamentjs / tests / test_parquet . js
google/filament
934b75e68b09b3636dd38e2d2e3f2e9dce843095
2018-10-26T17:30:44Z
mmm a / PowerEditor / src / Notepad_plus . cpp <nl> ppp b / PowerEditor / src / Notepad_plus . cpp <nl> bool Notepad_plus : : doOpen ( const char * fileName , bool isReadOnly ) <nl> char longFileName [ MAX_PATH ] ; <nl> : : GetFullPathName ( fileName , MAX_PATH , longFileName , NULL ) ; <nl> <nl> - / / printInt ( getCurrentView ( ) ) ; <nl> if ( switchToFile ( longFileName ) ) <nl> { <nl> if ( _pTrayIco ) <nl> bool Notepad_plus : : doOpen ( const char * fileName , bool isReadOnly ) <nl> } <nl> } <nl> <nl> + / / if file2open matches the ext of user defined session file ext , then it ' ll be opened as a session <nl> + char fncp [ MAX_PATH ] ; <nl> + strcpy ( fncp , longFileName ) ; <nl> + char * pExt = PathFindExtension ( fncp ) ; <nl> + const char * definedSessionExt = NppParameters : : getInstance ( ) - > getNppGUI ( ) . _definedSessionExt . c_str ( ) ; <nl> + if ( strcmp ( pExt , definedSessionExt ) ) <nl> + { <nl> + return fileLoadSession ( longFileName ) ; <nl> + } <nl> <nl> Utf8_16_Read UnicodeConvertor ; <nl> <nl> void Notepad_plus : : getCurrentOpenedFiles ( Session & session ) <nl> _subEditView . activateDocAt ( currentDocIndex ) ; <nl> } <nl> <nl> - void Notepad_plus : : fileLoadSession ( const char * fn ) <nl> + bool Notepad_plus : : fileLoadSession ( const char * fn ) <nl> { <nl> + bool result = false ; <nl> const char * sessionFileName = NULL ; <nl> if ( fn = = NULL ) <nl> { <nl> void Notepad_plus : : fileLoadSession ( const char * fn ) <nl> if ( ( NppParameters : : getInstance ( ) ) - > loadSession ( session2Load , sessionFileName ) ) <nl> { <nl> isAllSuccessful = loadSession ( session2Load ) ; <nl> + result = true ; <nl> } <nl> if ( ! isAllSuccessful ) <nl> ( NppParameters : : getInstance ( ) ) - > writeSession ( session2Load , sessionFileName ) ; <nl> } <nl> + return result ; <nl> } <nl> <nl> <nl> mmm a / PowerEditor / src / Notepad_plus . h <nl> ppp b / PowerEditor / src / Notepad_plus . h <nl> class Notepad_plus : public Window { <nl> <nl> void getCurrentOpenedFiles ( Session & session ) ; <nl> <nl> - void fileLoadSession ( const char * fn = NULL ) ; <nl> + bool fileLoadSession ( const char * fn = NULL ) ; <nl> const char * fileSaveSession ( size_t nbFile , char * * fileNames , const char * sessionFile2save ) ; <nl> const char * fileSaveSession ( size_t nbFile = 0 , char * * fileNames = NULL ) ; <nl> <nl> mmm a / PowerEditor / src / Parameters . cpp <nl> ppp b / PowerEditor / src / Parameters . cpp <nl> void NppParameters : : feedGUIParameters ( TiXmlNode * node ) <nl> if ( element - > Attribute ( " autoCAction " , & i ) ) <nl> _nppGUI . _autocStatus = ( NppGUI : : AutocStatus ) i ; <nl> } <nl> + else if ( ! strcmp ( nm , " sessionExt " ) ) <nl> + { <nl> + TiXmlNode * n = childNode - > FirstChild ( ) ; <nl> + if ( n ) <nl> + { <nl> + val = n - > Value ( ) ; <nl> + if ( val ) <nl> + _nppGUI . _definedSessionExt = val ; <nl> + } <nl> + } <nl> } <nl> + <nl> } <nl> <nl> void NppParameters : : feedScintillaParam ( bool whichOne , TiXmlNode * node ) <nl> void NppParameters : : writeGUIParams ( ) <nl> bool URLExist = false ; <nl> bool globalOverrideExist = false ; <nl> bool autocExist = false ; <nl> + bool sessionExtExist = false ; <nl> <nl> TiXmlNode * dockingParamNode = NULL ; <nl> <nl> void NppParameters : : writeGUIParams ( ) <nl> pStr = _nppGUI . _globalOverride . enableUnderLine ? " yes " : " no " ; <nl> element - > SetAttribute ( " underline " , pStr ) ; <nl> } <nl> - <nl> - if ( ! strcmp ( nm , " auto - completion " ) ) <nl> + else if ( ! strcmp ( nm , " auto - completion " ) ) <nl> { <nl> autocExist = true ; <nl> element - > SetAttribute ( " autoCAction " , _nppGUI . _autocStatus ) ; <nl> } <nl> + else if ( ! strcmp ( nm , " sessionExt " ) ) <nl> + { <nl> + sessionExtExist = true ; <nl> + TiXmlNode * n = childNode - > FirstChild ( ) ; <nl> + if ( n ) <nl> + n - > SetValue ( _nppGUI . _definedSessionExt . c_str ( ) ) ; <nl> + else <nl> + childNode - > InsertEndChild ( TiXmlText ( _nppGUI . _definedSessionExt . c_str ( ) ) ) ; <nl> + } <nl> } <nl> <nl> if ( ! autoDetectionExist ) <nl> void NppParameters : : writeGUIParams ( ) <nl> GUIConfigElement - > SetAttribute ( " name " , " langsExcluded " ) ; <nl> writeExcludedLangList ( GUIConfigElement ) ; <nl> } <nl> + <nl> if ( ! printSettingExist ) <nl> { <nl> TiXmlElement * GUIConfigElement = ( GUIRoot - > InsertEndChild ( TiXmlElement ( " GUIConfig " ) ) ) - > ToElement ( ) ; <nl> void NppParameters : : writeGUIParams ( ) <nl> / / Rase tout <nl> GUIRoot - > RemoveChild ( dockingParamNode ) ; <nl> } <nl> + <nl> + if ( ! sessionExtExist ) <nl> + { <nl> + / / const char * pStr = bVal ? " yes " : " no " ; <nl> + TiXmlElement * GUIConfigElement = ( GUIRoot - > InsertEndChild ( TiXmlElement ( " GUIConfig " ) ) ) - > ToElement ( ) ; <nl> + GUIConfigElement - > SetAttribute ( " name " , " sessionExt " ) ; <nl> + GUIConfigElement - > InsertEndChild ( TiXmlText ( _nppGUI . _definedSessionExt . c_str ( ) ) ) ; <nl> + } <nl> + <nl> insertDockingParamNode ( GUIRoot ) ; <nl> <nl> } <nl> mmm a / PowerEditor / src / Parameters . h <nl> ppp b / PowerEditor / src / Parameters . h <nl> struct NppGUI <nl> _splitterPos ( POS_HORIZOTAL ) , _userDefineDlgStatus ( UDD_DOCKED ) , _tabSize ( 8 ) , \ <nl> _tabReplacedBySpace ( false ) , _fileAutoDetection ( cdEnabled ) , _checkHistoryFiles ( true ) , \ <nl> _isMaximized ( false ) , _isMinimizedToTray ( false ) , _rememberLastSession ( true ) , _backup ( bak_none ) , _useDir ( false ) , \ <nl> - _doTaskList ( true ) , _maitainIndent ( true ) , _saveOpenKeepInSameDir ( false ) , _styleMRU ( true ) , _styleURL ( 0 ) , _autocStatus ( autoc_none ) { <nl> + _doTaskList ( true ) , _maitainIndent ( true ) , _saveOpenKeepInSameDir ( false ) , _styleMRU ( true ) , _styleURL ( 0 ) , <nl> + _autocStatus ( autoc_none ) , _definedSessionExt ( " " ) { <nl> _appPos . left = 0 ; <nl> _appPos . top = 0 ; <nl> _appPos . right = 700 ; <nl> struct NppGUI <nl> GlobalOverride _globalOverride ; <nl> enum AutocStatus { autoc_none , autoc_func , autoc_word } ; <nl> AutocStatus _autocStatus ; <nl> + string _definedSessionExt ; <nl> } ; <nl> <nl> struct ScintillaViewParams <nl>
[ NEW_FEATURE ] Add the session file ext association feature ( not yet finish ) .
notepad-plus-plus/notepad-plus-plus
27d6d9b280d37595f11496de929df0e39702fe09
2007-10-23T20:46:13Z
mmm a / tensorflow / lite / BUILD <nl> ppp b / tensorflow / lite / BUILD <nl> <nl> load ( " / / tensorflow : tensorflow . bzl " , " if_not_windows " , " tf_cc_test " ) <nl> - load ( " / / tensorflow / lite : build_def . bzl " , " if_tflite_experimental_runtime " , " tflite_cc_shared_object " , " tflite_copts " , " tflite_experimental_runtime_linkopts " ) <nl> + load ( " / / tensorflow / lite : build_def . bzl " , " tflite_cc_shared_object " , " tflite_copts " ) <nl> load ( " / / tensorflow / lite : special_rules . bzl " , " tflite_portable_test_suite " ) <nl> load ( " / / tensorflow : tensorflow . bzl " , " get_compatible_with_portable " ) <nl> <nl> config_setting ( <nl> } , <nl> ) <nl> <nl> - config_setting ( <nl> - name = " tflite_experimental_runtime_eager " , <nl> - values = { " define " : " tflite_experimental_runtime = eager " } , <nl> - visibility = [ " / / visibility : public " ] , <nl> - ) <nl> - <nl> - config_setting ( <nl> - name = " tflite_experimental_runtime_non_eager " , <nl> - values = { " define " : " tflite_experimental_runtime = non - eager " } , <nl> - visibility = [ " / / visibility : public " ] , <nl> - ) <nl> - <nl> config_setting ( <nl> name = " tf_lite_static_memory " , <nl> values = { <nl> cc_library ( <nl> hdrs = FRAMEWORK_LIB_HDRS , <nl> compatible_with = get_compatible_with_portable ( ) , <nl> copts = tflite_copts ( ) + TFLITE_DEFAULT_COPTS , <nl> - defines = if_tflite_experimental_runtime ( <nl> - if_eager = [ " TFLITE_EXPERIMENTAL_RUNTIME_EAGER " ] , <nl> - if_non_eager = [ " TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER " ] , <nl> - if_none = [ ] , <nl> - ) , <nl> deps = [ <nl> - " : framework_lib " , <nl> " : allocation " , <nl> " : arena_planner " , <nl> " : external_cpu_backend_context " , <nl> + " : framework_lib " , <nl> " : graph_info " , <nl> " : memory_planner " , <nl> " : minimal_logging " , <nl> cc_library ( <nl> " / / tensorflow / lite / experimental / resource " , <nl> " / / tensorflow / lite / nnapi : nnapi_implementation " , <nl> " / / tensorflow / lite / schema : schema_fbs " , <nl> - ] + tflite_experimental_runtime_linkopts ( ) , <nl> + ] , <nl> ) <nl> <nl> cc_library ( <nl> mmm a / tensorflow / lite / build_def . bzl <nl> ppp b / tensorflow / lite / build_def . bzl <nl> def gen_model_coverage_test ( src , model_name , data , failure_type , tags , size = " m <nl> ] + flex_dep ( target_op_sets ) , <nl> ) <nl> <nl> - def if_tflite_experimental_runtime ( if_eager , if_non_eager , if_none = [ ] ) : <nl> - return select ( { <nl> - " / / tensorflow / lite : tflite_experimental_runtime_eager " : if_eager , <nl> - " / / tensorflow / lite : tflite_experimental_runtime_non_eager " : if_non_eager , <nl> - " / / conditions : default " : if_none , <nl> - } ) <nl> - <nl> - def tflite_experimental_runtime_linkopts ( if_eager = [ ] , if_non_eager = [ ] , if_none = [ ] ) : <nl> - return if_tflite_experimental_runtime ( <nl> - if_eager = [ <nl> - # " / / tensorflow / lite / experimental / tf_runtime : eager_interpreter " , <nl> - # " / / tensorflow / lite / experimental / tf_runtime : eager_model " , <nl> - # " / / tensorflow / lite / experimental / tf_runtime : subgraph " , <nl> - ] + if_eager , <nl> - if_non_eager = [ <nl> - # " / / tensorflow / lite / experimental / tf_runtime : interpreter " , <nl> - # " / / tensorflow / lite / experimental / tf_runtime : model " , <nl> - ] + if_non_eager , <nl> - if_none = [ ] + if_none , <nl> - ) <nl> - <nl> def tflite_custom_cc_library ( <nl> name , <nl> models = [ ] , <nl> mmm a / tensorflow / lite / core / subgraph . cc <nl> ppp b / tensorflow / lite / core / subgraph . cc <nl> limitations under the License . <nl> <nl> namespace tflite { <nl> <nl> - namespace impl { <nl> - <nl> namespace { <nl> <nl> struct TfLiteQuantizationDeleter { <nl> TfLiteStatus Subgraph : : SetCustomAllocationForTensor ( <nl> return kTfLiteOk ; <nl> } <nl> <nl> - } / / namespace impl <nl> - <nl> } / / namespace tflite <nl> mmm a / tensorflow / lite / core / subgraph . h <nl> ppp b / tensorflow / lite / core / subgraph . h <nl> limitations under the License . <nl> # include " tensorflow / lite / memory_planner . h " <nl> # include " tensorflow / lite / util . h " <nl> <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - # include " tensorflow / lite / experimental / tf_runtime / public / subgraph . h " <nl> - # endif <nl> - <nl> namespace tflite { <nl> <nl> - namespace impl { <nl> - <nl> / / Forward declare since NNAPIDelegate uses Interpreter . <nl> class NNAPIDelegate ; <nl> <nl> class Subgraph { <nl> resource : : ResourceMap * resources_ = nullptr ; <nl> } ; <nl> <nl> - } / / namespace impl <nl> - <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - using Subgraph = tflrt : : Subgraph ; <nl> - # else <nl> - using Subgraph = impl : : Subgraph ; <nl> - # endif <nl> - <nl> } / / namespace tflite <nl> # endif / / TENSORFLOW_LITE_CORE_SUBGRAPH_H_ <nl> mmm a / tensorflow / lite / delegates / interpreter_utils . h <nl> ppp b / tensorflow / lite / delegates / interpreter_utils . h <nl> limitations under the License . <nl> <nl> namespace tflite { <nl> namespace delegates { <nl> - # if ! TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> class InterpreterUtils { <nl> public : <nl> / / / Invokes an interpreter with automatic fallback from delegation to CPU . <nl> class InterpreterUtils { <nl> / / / WARNING : This is an experimental API and subject to change . <nl> static TfLiteStatus InvokeWithCPUFallback ( Interpreter * interpreter ) ; <nl> } ; <nl> - # endif / / ! TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> } / / namespace delegates <nl> } / / namespace tflite <nl> <nl> mmm a / tensorflow / lite / experimental / tflite_api_dispatcher / BUILD <nl> ppp b / tensorflow / lite / experimental / tflite_api_dispatcher / BUILD <nl> <nl> - load ( " / / tensorflow / lite : build_def . bzl " , " if_tflite_experimental_runtime " , " tflite_experimental_runtime_linkopts " ) <nl> - <nl> package ( <nl> default_visibility = [ " / / tensorflow : internal " ] , <nl> licenses = [ " notice " ] , # Apache 2 . 0 <nl> package ( <nl> cc_library ( <nl> name = " tflite_api_dispatcher " , <nl> hdrs = [ " tflite_api_dispatcher . h " ] , <nl> - defines = if_tflite_experimental_runtime ( <nl> - if_eager = [ " TFLITE_EXPERIMENTAL_RUNTIME_EAGER " ] , <nl> - if_non_eager = [ " TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER " ] , <nl> - if_none = [ ] , <nl> - ) , <nl> deps = [ <nl> " / / tensorflow / lite : framework_lib " , <nl> - ] + tflite_experimental_runtime_linkopts ( ) , <nl> + ] , <nl> ) <nl> <nl> cc_library ( <nl> cc_library ( <nl> deps = [ <nl> " : tflite_api_dispatcher " , <nl> " / / tensorflow / lite : framework_lib " , <nl> - ] + tflite_experimental_runtime_linkopts ( <nl> - if_eager = [ <nl> - # " / / tensorflow / lite / experimental / tf_runtime / opdef : tflrt_opdefs " , <nl> - # " / / tensorflow / lite / experimental / tf_runtime / tfrt_ops : tfrt_tflite_ops_alwayslink " , <nl> - ] , <nl> - if_non_eager = [ <nl> - # " / / tensorflow / lite / experimental / tf_runtime / tfrt_kernels : tfrt_tflite_interpreter_alwayslink " , <nl> - # " / / third_party / tf_runtime : basic_kernels_alwayslink " , <nl> - ] , <nl> - ) , <nl> + ] , <nl> ) <nl> mmm a / tensorflow / lite / experimental / tflite_api_dispatcher / tflite_api_dispatcher . h <nl> ppp b / tensorflow / lite / experimental / tflite_api_dispatcher / tflite_api_dispatcher . h <nl> limitations under the License . <nl> # ifndef TENSORFLOW_LITE_EXPERIMENTAL_TFLITE_API_DISPATCHER_TFLITE_API_DISPATCHER_H_ <nl> # define TENSORFLOW_LITE_EXPERIMENTAL_TFLITE_API_DISPATCHER_TFLITE_API_DISPATCHER_H_ <nl> <nl> - # ifndef TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - # define TFLITE_EXPERIMENTAL_RUNTIME_EAGER ( 0 ) <nl> - # endif <nl> - <nl> - # ifndef TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER <nl> - # define TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER ( 0 ) <nl> - # endif <nl> - <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER & & TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER <nl> - # error \ <nl> - " TFLITE_EXPERIMENTAL_RUNTIME_EAGER and " \ <nl> - " TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER should not both be true . " <nl> + # ifndef TFLITE_EXPERIMENTAL_RUNTIME <nl> + # define TFLITE_EXPERIMENTAL_RUNTIME ( 0 ) <nl> # endif <nl> <nl> / / Import the relevant interpreter and model files . <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - # include " tensorflow / lite / experimental / tf_runtime / lib / eager_model . h " <nl> - # include " tensorflow / lite / experimental / tf_runtime / public / eager_interpreter . h " <nl> - # elif TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER <nl> + # if TFLITE_EXPERIMENTAL_RUNTIME <nl> # include " tensorflow / lite / experimental / tf_runtime / lib / model . h " <nl> # include " tensorflow / lite / experimental / tf_runtime / public / interpreter . h " <nl> # else <nl> limitations under the License . <nl> namespace tflite_api_dispatcher { <nl> <nl> / / Use the correct interpreter . <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - using Interpreter = tflrt : : EagerInterpreter ; <nl> - using InterpreterBuilder = tflrt : : EagerTfLiteInterpreterBuilderAPI ; <nl> - using TfLiteModel = tflite : : FlatBufferModel ; <nl> - using TfLiteVerifier = tflite : : TfLiteVerifier ; <nl> - # elif TFLITE_EXPERIMENTAL_RUNTIME_NON_EAGER <nl> + # if TFLITE_EXPERIMENTAL_RUNTIME <nl> using Interpreter = tflrt : : TfLiteInterpreterAPI ; <nl> using InterpreterBuilder = tflrt : : TfLiteInterpreterBuilderAPI ; <nl> using TfLiteModel = tflrt : : BEFModel ; <nl> mmm a / tensorflow / lite / interpreter . cc <nl> ppp b / tensorflow / lite / interpreter . cc <nl> static_assert ( sizeof ( TfLiteFloat16 ) = = sizeof ( uint16_t ) , <nl> <nl> namespace tflite { <nl> <nl> - namespace impl { <nl> - <nl> namespace { <nl> <nl> / / Gets the current TfLiteQuantization from the legacy TfLiteQuantizationParams . <nl> Profiler * Interpreter : : GetProfiler ( ) { <nl> return primary_subgraph ( ) . GetProfiler ( ) ; <nl> } <nl> <nl> - } / / namespace impl <nl> - <nl> } / / namespace tflite <nl> mmm a / tensorflow / lite / interpreter . h <nl> ppp b / tensorflow / lite / interpreter . h <nl> limitations under the License . <nl> # include " tensorflow / lite / stderr_reporter . h " <nl> # include " tensorflow / lite / type_to_tflitetype . h " <nl> <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - # include " tensorflow / lite / experimental / tf_runtime / public / eager_interpreter . h " <nl> - # endif <nl> - <nl> namespace tflite { <nl> <nl> class InterpreterTest ; <nl> namespace delegates { <nl> class InterpreterUtils ; / / Class for friend declarations . <nl> } / / namespace delegates <nl> <nl> - namespace impl { <nl> - <nl> / / / An interpreter for a graph of nodes that input and output from tensors . <nl> / / / Each node of the graph processes a set of input tensors and produces a <nl> / / / set of output Tensors . All inputs / output tensors are referenced by index . <nl> class Interpreter { <nl> std : : vector < TfLiteDelegatePtr > lazy_delegate_providers_ ; <nl> } ; <nl> <nl> - } / / namespace impl <nl> - <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - using Interpreter = tflrt : : EagerInterpreter ; <nl> - # else <nl> - using Interpreter = impl : : Interpreter ; <nl> - # endif <nl> - <nl> } / / namespace tflite <nl> # endif / / TENSORFLOW_LITE_INTERPRETER_H_ <nl> mmm a / tensorflow / lite / interpreter_builder . cc <nl> ppp b / tensorflow / lite / interpreter_builder . cc <nl> TFLITE_ATTRIBUTE_WEAK Interpreter : : TfLiteDelegatePtr AcquireFlexDelegate ( ) { <nl> return Interpreter : : TfLiteDelegatePtr ( nullptr , [ ] ( TfLiteDelegate * ) { } ) ; <nl> } <nl> <nl> - namespace impl { <nl> - <nl> InterpreterBuilder : : InterpreterBuilder ( const FlatBufferModel & model , <nl> const OpResolver & op_resolver ) <nl> : model_ ( model . GetModel ( ) ) , <nl> TfLiteStatus InterpreterBuilder : : operator ( ) ( <nl> return kTfLiteOk ; <nl> } <nl> <nl> - } / / namespace impl <nl> - <nl> } / / namespace tflite <nl> mmm a / tensorflow / lite / interpreter_builder . h <nl> ppp b / tensorflow / lite / interpreter_builder . h <nl> limitations under the License . <nl> <nl> namespace tflite { <nl> <nl> - namespace impl { <nl> - <nl> / / / Build an interpreter capable of interpreting ` model ` . <nl> / / / <nl> / / / ` model ` : A model whose lifetime must be at least as long as any <nl> class InterpreterBuilder { <nl> int num_fp32_tensors_ = 0 ; <nl> } ; <nl> <nl> - } / / namespace impl <nl> - <nl> } / / namespace tflite <nl> <nl> # endif / / TENSORFLOW_LITE_INTERPRETER_BUILDER_H_ <nl> mmm a / tensorflow / lite / model . h <nl> ppp b / tensorflow / lite / model . h <nl> limitations under the License . <nl> # ifndef TENSORFLOW_LITE_MODEL_H_ <nl> # define TENSORFLOW_LITE_MODEL_H_ <nl> <nl> - # include " tensorflow / lite / model_builder . h " <nl> - <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - # include " tensorflow / lite / experimental / tf_runtime / lib / eager_model . h " <nl> - # else <nl> # include " tensorflow / lite / interpreter_builder . h " <nl> - # endif <nl> - <nl> - namespace tflite { <nl> - <nl> - # if TFLITE_EXPERIMENTAL_RUNTIME_EAGER <nl> - using InterpreterBuilder = tflrt : : EagerTfLiteInterpreterBuilderAPI ; <nl> - using Interpreter = tflrt : : EagerInterpreter ; <nl> - # else <nl> - using InterpreterBuilder = impl : : InterpreterBuilder ; <nl> - # endif <nl> + # include " tensorflow / lite / model_builder . h " <nl> <nl> - } / / namespace tflite <nl> + / / TODO ( b / 168725050 ) : Address the issue of proxy header in this file . <nl> <nl> # endif / / TENSORFLOW_LITE_MODEL_H_ <nl>
Internal code clean up .
tensorflow/tensorflow
33294c19da45ceee5f921fda3002696bd9110250
2020-09-17T22:59:27Z
mmm a / env / env_test . cc <nl> ppp b / env / env_test . cc <nl> TEST_P ( EnvPosixTestWithParam , UnSchedule ) { <nl> / / run in any order . The purpose of the test is unclear . <nl> # ifndef OS_WIN <nl> TEST_P ( EnvPosixTestWithParam , RunMany ) { <nl> + env_ - > SetBackgroundThreads ( 1 , Env : : LOW ) ; <nl> std : : atomic < int > last_id ( 0 ) ; <nl> <nl> struct CB { <nl>
env_test * / RunMany / * tests to run individually ( )
facebook/rocksdb
0b45a68c59d8cdad7b0fb38e115ab63f11ff65f2
2020-06-04T16:51:38Z
mmm a / xbmc / pvr / PVRActionListener . cpp <nl> ppp b / xbmc / pvr / PVRActionListener . cpp <nl> bool CPVRActionListener : : OnAction ( const CAction & action ) <nl> int iChannelNumber = static_cast < int > ( action . GetAmount ( 0 ) ) ; <nl> int iSubChannelNumber = static_cast < int > ( action . GetAmount ( 1 ) ) ; <nl> <nl> - const CPVRChannelPtr currentChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> - const CPVRChannelGroupPtr selectedGroup = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( currentChannel - > IsRadio ( ) ) - > GetSelectedGroup ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > currentChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > selectedGroup = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( currentChannel - > IsRadio ( ) ) - > GetSelectedGroup ( ) ; <nl> const std : : shared_ptr < CPVRChannel > channel = selectedGroup - > GetByChannelNumber ( CPVRChannelNumber ( iChannelNumber , iSubChannelNumber ) ) ; <nl> <nl> if ( ! channel ) <nl> mmm a / xbmc / pvr / PVRContextMenus . cpp <nl> ppp b / xbmc / pvr / PVRContextMenus . cpp <nl> namespace PVR <nl> const CPVRClientMenuHook m_hook ; <nl> } ; <nl> <nl> - CPVRTimerInfoTagPtr GetTimerInfoTagFromItem ( const CFileItem & item ) <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetTimerInfoTagFromItem ( const CFileItem & item ) <nl> { <nl> - CPVRTimerInfoTagPtr timer ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > timer ; <nl> <nl> - const CPVREpgInfoTagPtr epg ( item . GetEPGInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epg ( item . GetEPGInfoTag ( ) ) ; <nl> if ( epg ) <nl> timer = CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epg ) ; <nl> <nl> namespace PVR <nl> <nl> bool PlayEpgTag : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVREpgInfoTagPtr epg ( item . GetEPGInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epg ( item . GetEPGInfoTag ( ) ) ; <nl> if ( epg ) <nl> return epg - > IsPlayable ( ) ; <nl> <nl> namespace PVR <nl> <nl> bool ShowInformation : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> if ( channel ) <nl> return channel - > GetEPGNow ( ) . get ( ) ! = nullptr ; <nl> <nl> if ( item . GetEPGInfoTag ( ) ) <nl> return true ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> return timer - > GetEpgInfoTag ( ) . get ( ) ! = nullptr ; <nl> <nl> namespace PVR <nl> <nl> bool ShowChannelGuide : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> if ( channel ) <nl> return channel - > GetEPGNow ( ) . get ( ) ! = nullptr ; <nl> <nl> namespace PVR <nl> <nl> bool FindSimilar : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> if ( channel ) <nl> return channel - > GetEPGNow ( ) . get ( ) ! = nullptr ; <nl> <nl> if ( item . GetEPGInfoTag ( ) ) <nl> return true ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> return timer - > GetEpgInfoTag ( ) . get ( ) ! = nullptr ; <nl> <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording ) <nl> return ! recording - > IsDeleted ( ) ; <nl> <nl> namespace PVR <nl> <nl> bool StartRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( item ) ; <nl> <nl> - const CPVRChannelPtr channel = item . GetPVRChannelInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = item . GetPVRChannelInfoTag ( ) ; <nl> if ( channel ) <nl> return client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) & & <nl> ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > IsRecordingOnChannel ( * channel ) ; <nl> <nl> - const CPVREpgInfoTagPtr epg = item . GetEPGInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epg = item . GetEPGInfoTag ( ) ; <nl> if ( epg & & <nl> ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epg ) & & <nl> epg - > IsRecordable ( ) ) <nl> namespace PVR <nl> <nl> bool StopRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording & & recording - > IsInProgress ( ) ) <nl> return true ; <nl> <nl> - const CPVRChannelPtr channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item . GetPVRChannelInfoTag ( ) ) ; <nl> if ( channel ) <nl> return CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > IsRecordingOnChannel ( * channel ) ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> return timer - > IsRecording ( ) ; <nl> <nl> namespace PVR <nl> <nl> bool EditRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording & & ! recording - > IsDeleted ( ) & & ! recording - > IsInProgress ( ) ) <nl> { <nl> return CServiceBroker : : GetPVRManager ( ) . GUIActions ( ) - > CanEditRecording ( item ) ; <nl> namespace PVR <nl> <nl> bool RenameRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording = item . GetPVRRecordingInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording = item . GetPVRRecordingInfoTag ( ) ; <nl> if ( recording & & <nl> ! recording - > IsDeleted ( ) & & <nl> ! recording - > IsInProgress ( ) ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( recording - > ClientID ( ) ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( recording - > ClientID ( ) ) ; <nl> return client & & client - > GetClientCapabilities ( ) . SupportsRecordingsRename ( ) ; <nl> } <nl> return false ; <nl> namespace PVR <nl> <nl> std : : string DeleteRecording : : GetLabel ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording & & recording - > IsDeleted ( ) ) <nl> return g_localizeStrings . Get ( 19291 ) ; / * Delete permanently * / <nl> <nl> namespace PVR <nl> <nl> bool DeleteRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording & & ! recording - > IsInProgress ( ) ) <nl> return true ; <nl> <nl> namespace PVR <nl> <nl> bool UndeleteRecording : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item . GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording & & recording - > IsDeleted ( ) ) <nl> return true ; <nl> <nl> namespace PVR <nl> <nl> std : : string ToggleTimerState : : GetLabel ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> if ( timer & & timer - > m_state ! = PVR_TIMER_STATE_DISABLED ) <nl> return g_localizeStrings . Get ( 844 ) ; / * Deactivate * / <nl> <nl> namespace PVR <nl> <nl> bool ToggleTimerState : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> if ( ! timer | | URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) | | timer - > IsBroken ( ) ) <nl> return false ; <nl> <nl> - const CPVRTimerTypePtr timerType ( timer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > timerType ( timer - > GetTimerType ( ) ) ; <nl> return timerType & & timerType - > SupportsEnableDisable ( ) ; <nl> } <nl> <nl> namespace PVR <nl> <nl> bool AddTimerRule : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVREpgInfoTagPtr epg = item . GetEPGInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epg = item . GetEPGInfoTag ( ) ; <nl> if ( epg & & ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epg ) ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( item ) ; <nl> return client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ; <nl> } <nl> return false ; <nl> namespace PVR <nl> <nl> std : : string EditTimerRule : : GetLabel ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> if ( parentTimer ) <nl> { <nl> - const CPVRTimerTypePtr parentTimerType ( parentTimer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > parentTimerType ( parentTimer - > GetTimerType ( ) ) ; <nl> if ( parentTimerType & & ! parentTimerType - > IsReadOnly ( ) ) <nl> return g_localizeStrings . Get ( 19243 ) ; / * Edit timer rule * / <nl> } <nl> namespace PVR <nl> <nl> bool EditTimerRule : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> return timer - > GetTimerRuleId ( ) ! = PVR_TIMER_NO_PARENT ; <nl> <nl> namespace PVR <nl> <nl> bool DeleteTimerRule : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer & & ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> if ( parentTimer ) <nl> { <nl> - const CPVRTimerTypePtr parentTimerType ( parentTimer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > parentTimerType ( parentTimer - > GetTimerType ( ) ) ; <nl> return parentTimerType & & parentTimerType - > AllowsDelete ( ) ; <nl> } <nl> } <nl> namespace PVR <nl> <nl> std : : string EditTimer : : GetLabel ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer ) <nl> { <nl> - const CPVRTimerTypePtr timerType ( timer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > timerType ( timer - > GetTimerType ( ) ) ; <nl> if ( timerType ) <nl> { <nl> if ( item . GetEPGInfoTag ( ) ) <nl> namespace PVR <nl> <nl> bool EditTimer : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> return timer & & ( ! item . GetEPGInfoTag ( ) | | ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) ; <nl> } <nl> <nl> namespace PVR <nl> <nl> bool RenameTimer : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item . GetPVRTimerInfoTag ( ) ) ; <nl> if ( ! timer | | URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) <nl> return false ; <nl> <nl> / / As epg - based timers will get it ' s title from the epg tag , they should not be renamable . <nl> if ( timer - > IsManual ( ) ) <nl> { <nl> - const CPVRTimerTypePtr timerType ( timer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > timerType ( timer - > GetTimerType ( ) ) ; <nl> if ( ! timerType - > IsReadOnly ( ) ) <nl> return true ; <nl> } <nl> namespace PVR <nl> <nl> bool DeleteTimer : : IsVisible ( const CFileItem & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( GetTimerInfoTagFromItem ( item ) ) ; <nl> if ( timer & & ( ! item . GetEPGInfoTag ( ) | | ! URIUtils : : PathEquals ( item . GetPath ( ) , CPVRTimersPath : : PATH_ADDTIMER ) ) & & ! timer - > IsRecording ( ) ) <nl> { <nl> - const CPVRTimerTypePtr timerType ( timer - > GetTimerType ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerType > timerType ( timer - > GetTimerType ( ) ) ; <nl> return timerType & & timerType - > AllowsDelete ( ) ; <nl> } <nl> <nl> namespace PVR <nl> <nl> bool PVRClientMenuHook : : Execute ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> if ( ! client ) <nl> return false ; <nl> <nl> mmm a / xbmc / pvr / PVRDatabase . cpp <nl> ppp b / xbmc / pvr / PVRDatabase . cpp <nl> int CPVRDatabase : : Get ( CPVRChannelGroup & results , bool bCompressDB ) <nl> { <nl> while ( ! m_pDS - > eof ( ) ) <nl> { <nl> - CPVRChannelPtr channel = CPVRChannelPtr ( new CPVRChannel ( ) ) ; <nl> + std : : shared_ptr < CPVRChannel > channel = std : : shared_ptr < CPVRChannel > ( new CPVRChannel ( ) ) ; <nl> <nl> channel - > m_iChannelId = m_pDS - > fv ( " idChannel " ) . get_asInt ( ) ; <nl> channel - > m_iUniqueId = m_pDS - > fv ( " iUniqueId " ) . get_asInt ( ) ; <nl> int CPVRDatabase : : Get ( CPVRChannelGroup & group , const CPVRChannelGroup & allGroup ) <nl> iReturn = 0 ; <nl> <nl> / / create a map to speedup data lookup <nl> - std : : map < int , CPVRChannelPtr > allChannels ; <nl> + std : : map < int , std : : shared_ptr < CPVRChannel > > allChannels ; <nl> for ( const auto & groupMember : allGroup . GetMembers ( ) ) <nl> { <nl> allChannels . insert ( std : : make_pair ( groupMember . channel - > ChannelID ( ) , groupMember . channel ) ) ; <nl> bool CPVRDatabase : : PersistChannels ( CPVRChannelGroup & group ) <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> - CPVRChannelPtr channel ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> for ( const auto & groupMember : group . m_members ) <nl> { <nl> channel = groupMember . second . channel ; <nl> mmm a / xbmc / pvr / PVRGUIActions . cpp <nl> ppp b / xbmc / pvr / PVRGUIActions . cpp <nl> namespace PVR <nl> private : <nl> bool DoRun ( const CFileItemPtr & item ) override <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> if ( client ) <nl> { <nl> - const CPVRRecordingPtr recording = item - > GetPVRRecordingInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording = item - > GetPVRRecordingInfoTag ( ) ; <nl> return client - > SetRecordingPlayCount ( * recording , recording - > GetLocalPlayCount ( ) ) = = PVR_ERROR_NO_ERROR ; <nl> } <nl> return false ; <nl> namespace PVR <nl> private : <nl> bool DoRun ( const CFileItemPtr & item ) override <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> if ( client ) <nl> return client - > SetRecordingLifetime ( * item - > GetPVRRecordingInfoTag ( ) ) = = PVR_ERROR_NO_ERROR ; <nl> return false ; <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : ShowEPGInfo ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> if ( channel & & CheckParentalLock ( channel ) ! = ParentalCheckResult : : SUCCESS ) <nl> return false ; <nl> <nl> - const CPVREpgInfoTagPtr epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> if ( ! epgTag ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No epg tag ! " ) ; <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : ShowChannelEPG ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> if ( channel & & CheckParentalLock ( channel ) ! = ParentalCheckResult : : SUCCESS ) <nl> return false ; <nl> <nl> namespace PVR <nl> return true ; <nl> } ; <nl> <nl> - bool CPVRGUIActions : : ShowTimerSettings ( const CPVRTimerInfoTagPtr & timer ) const <nl> + bool CPVRGUIActions : : ShowTimerSettings ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const <nl> { <nl> CGUIDialogPVRTimerSettings * pDlgInfo = CServiceBroker : : GetGUI ( ) - > GetWindowManager ( ) . GetWindow < CGUIDialogPVRTimerSettings > ( WINDOW_DIALOG_PVR_TIMER_SETTING ) ; <nl> if ( ! pDlgInfo ) <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : AddTimer ( bool bRadio ) const <nl> { <nl> - const CPVRTimerInfoTagPtr newTimer ( new CPVRTimerInfoTag ( bRadio ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > newTimer ( new CPVRTimerInfoTag ( bRadio ) ) ; <nl> if ( ShowTimerSettings ( newTimer ) ) <nl> { <nl> return AddTimer ( newTimer ) ; <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : AddTimer ( const std : : shared_ptr < CFileItem > & item , bool bCreateRule , bool bShowTimerSettings , bool bFallbackToOneShotTimer ) const <nl> { <nl> - const CPVRChannelPtr channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> if ( ! channel ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No channel ! " ) ; <nl> namespace PVR <nl> if ( CheckParentalLock ( channel ) ! = ParentalCheckResult : : SUCCESS ) <nl> return false ; <nl> <nl> - const CPVREpgInfoTagPtr epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> if ( ! epgTag & & bCreateRule ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No epg tag ! " ) ; <nl> return false ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr timer ( bCreateRule | | ! epgTag ? nullptr : CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epgTag ) ) ; <nl> - CPVRTimerInfoTagPtr rule ( bCreateRule ? CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) : nullptr ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > timer ( bCreateRule | | ! epgTag ? nullptr : CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epgTag ) ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > rule ( bCreateRule ? CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) : nullptr ) ; <nl> if ( timer | | rule ) <nl> { <nl> HELPERS : : ShowOKDialogText ( CVariant { 19033 } , CVariant { 19034 } ) ; / / " Information " , " There is already a timer set for this event " <nl> return false ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr newTimer ( epgTag ? CPVRTimerInfoTag : : CreateFromEpg ( epgTag , bCreateRule ) : CPVRTimerInfoTag : : CreateInstantTimerTag ( channel ) ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > newTimer ( epgTag ? CPVRTimerInfoTag : : CreateFromEpg ( epgTag , bCreateRule ) : CPVRTimerInfoTag : : CreateInstantTimerTag ( channel ) ) ; <nl> if ( ! newTimer ) <nl> { <nl> if ( bCreateRule & & bFallbackToOneShotTimer ) <nl> namespace PVR <nl> return AddTimer ( newTimer ) ; <nl> } <nl> <nl> - bool CPVRGUIActions : : AddTimer ( const CPVRTimerInfoTagPtr & item ) const <nl> + bool CPVRGUIActions : : AddTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & item ) const <nl> { <nl> if ( ! item - > Channel ( ) & & item - > GetTimerType ( ) & & ! item - > GetTimerType ( ) - > IsEpgBasedTimerRule ( ) ) <nl> { <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : ToggleRecordingOnPlayingChannel ( ) <nl> { <nl> - const CPVRChannelPtr channel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> if ( channel & & channel - > CanRecord ( ) ) <nl> return SetRecordingOnChannel ( channel , ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > IsRecordingOnChannel ( * channel ) ) ; <nl> <nl> return false ; <nl> } <nl> <nl> - bool CPVRGUIActions : : SetRecordingOnChannel ( const CPVRChannelPtr & channel , bool bOnOff ) <nl> + bool CPVRGUIActions : : SetRecordingOnChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bOnOff ) <nl> { <nl> bool bReturn = false ; <nl> <nl> namespace PVR <nl> if ( CheckParentalLock ( channel ) ! = ParentalCheckResult : : SUCCESS ) <nl> return bReturn ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( channel - > ClientID ( ) ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( channel - > ClientID ( ) ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ) <nl> { <nl> / * timers are supported on this channel * / <nl> if ( bOnOff & & ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > IsRecordingOnChannel ( * channel ) ) <nl> { <nl> - CPVREpgInfoTagPtr epgTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > epgTag ; <nl> int iDuration = m_settings . GetIntValue ( CSettings : : SETTING_PVRRECORD_INSTANTRECORDTIME ) ; <nl> <nl> int iAction = m_settings . GetIntValue ( CSettings : : SETTING_PVRRECORD_INSTANTRECORDACTION ) ; <nl> namespace PVR <nl> PVRRECORD_INSTANTRECORDACTION ePreselect = RECORD_INSTANTRECORDTIME ; <nl> const int iDurationDefault = m_settings . GetIntValue ( CSettings : : SETTING_PVRRECORD_INSTANTRECORDTIME ) ; <nl> InstantRecordingActionSelector selector ( iDurationDefault ) ; <nl> - CPVREpgInfoTagPtr epgTagNext ; <nl> + std : : shared_ptr < CPVREpgInfoTag > epgTagNext ; <nl> <nl> / / fixed length recordings <nl> selector . AddAction ( RECORD_30_MINUTES , " " ) ; <nl> namespace PVR <nl> break ; <nl> } <nl> <nl> - const CPVRTimerInfoTagPtr newTimer ( epgTag ? CPVRTimerInfoTag : : CreateFromEpg ( epgTag , false ) : CPVRTimerInfoTag : : CreateInstantTimerTag ( channel , iDuration ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > newTimer ( epgTag ? CPVRTimerInfoTag : : CreateFromEpg ( epgTag , false ) : CPVRTimerInfoTag : : CreateInstantTimerTag ( channel , iDuration ) ) ; <nl> <nl> if ( newTimer ) <nl> bReturn = CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > AddTimer ( newTimer ) ; <nl> namespace PVR <nl> if ( ! item - > HasEPGInfoTag ( ) ) <nl> return false ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( CPVRItem ( item ) . GetTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( CPVRItem ( item ) . GetTimerInfoTag ( ) ) ; <nl> if ( timer ) <nl> { <nl> if ( timer - > IsRecording ( ) ) <nl> namespace PVR <nl> if ( ! item - > HasPVRTimerInfoTag ( ) ) <nl> return false ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( item - > GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item - > GetPVRTimerInfoTag ( ) ) ; <nl> if ( timer - > m_state = = PVR_TIMER_STATE_DISABLED ) <nl> timer - > m_state = PVR_TIMER_STATE_SCHEDULED ; <nl> else <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : EditTimer ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer ( CPVRItem ( item ) . GetTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( CPVRItem ( item ) . GetTimerInfoTag ( ) ) ; <nl> if ( ! timer ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No timer ! " ) ; <nl> namespace PVR <nl> } <nl> <nl> / / clone the timer . <nl> - const CPVRTimerInfoTagPtr newTimer ( new CPVRTimerInfoTag ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > newTimer ( new CPVRTimerInfoTag ) ; <nl> newTimer - > UpdateEntry ( timer ) ; <nl> <nl> if ( ShowTimerSettings ( newTimer ) & & ( ! timer - > GetTimerType ( ) - > IsReadOnly ( ) | | timer - > GetTimerType ( ) - > SupportsEnableDisable ( ) ) ) <nl> namespace PVR <nl> if ( ! item - > HasPVRTimerInfoTag ( ) ) <nl> return false ; <nl> <nl> - const CPVRTimerInfoTagPtr timer ( item - > GetPVRTimerInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer ( item - > GetPVRTimerInfoTag ( ) ) ; <nl> <nl> std : : string strNewName ( timer - > m_strTitle ) ; <nl> if ( CGUIKeyboardFactory : : ShowAndGetInput ( strNewName , <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : DeleteTimer ( const CFileItemPtr & item , bool bIsRecording , bool bDeleteRule ) const <nl> { <nl> - CPVRTimerInfoTagPtr timer ; <nl> - const CPVRRecordingPtr recording ( CPVRItem ( item ) . GetRecording ( ) ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > timer ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( CPVRItem ( item ) . GetRecording ( ) ) ; <nl> if ( recording ) <nl> timer = recording - > GetRecordingTimer ( ) ; <nl> <nl> namespace PVR <nl> return false ; <nl> } <nl> <nl> - bool CPVRGUIActions : : DeleteTimer ( const CPVRTimerInfoTagPtr & timer , bool bIsRecording , bool bDeleteRule ) const <nl> + bool CPVRGUIActions : : DeleteTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer , bool bIsRecording , bool bDeleteRule ) const <nl> { <nl> TimerOperationResult result = CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > DeleteTimer ( timer , bIsRecording , bDeleteRule ) ; <nl> switch ( result ) <nl> namespace PVR <nl> return false ; <nl> } <nl> <nl> - bool CPVRGUIActions : : ConfirmDeleteTimer ( const CPVRTimerInfoTagPtr & timer , bool & bDeleteRule ) const <nl> + bool CPVRGUIActions : : ConfirmDeleteTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer , bool & bDeleteRule ) const <nl> { <nl> bool bConfirmed ( false ) ; <nl> - const CPVRTimerInfoTagPtr parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > parentTimer ( CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerRule ( timer ) ) ; <nl> <nl> if ( parentTimer & & parentTimer - > HasTimerType ( ) & & parentTimer - > GetTimerType ( ) - > AllowsDelete ( ) ) <nl> { <nl> namespace PVR <nl> return true ; <nl> } <nl> <nl> - bool CPVRGUIActions : : ConfirmStopRecording ( const CPVRTimerInfoTagPtr & timer ) const <nl> + bool CPVRGUIActions : : ConfirmStopRecording ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const <nl> { <nl> return CGUIDialogYesNo : : ShowAndGetInput ( CVariant { 847 } , / / " Confirm stop recording " <nl> CVariant { 848 } , / / " Are you sure you want to stop this recording ? " <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : EditRecording ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRRecordingPtr recording = CPVRItem ( item ) . GetRecording ( ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording = CPVRItem ( item ) . GetRecording ( ) ; <nl> if ( ! recording ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No recording ! " ) ; <nl> return false ; <nl> } <nl> <nl> - CPVRRecordingPtr origRecording ( new CPVRRecording ) ; <nl> + std : : shared_ptr < CPVRRecording > origRecording ( new CPVRRecording ) ; <nl> origRecording - > Update ( * recording ) ; <nl> <nl> if ( ! ShowRecordingSettings ( recording ) ) <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : RenameRecording ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRRecordingPtr recording ( item - > GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item - > GetPVRRecordingInfoTag ( ) ) ; <nl> if ( ! recording ) <nl> return false ; <nl> <nl> namespace PVR <nl> return true ; <nl> } <nl> <nl> - bool CPVRGUIActions : : ShowRecordingSettings ( const CPVRRecordingPtr & recording ) const <nl> + bool CPVRGUIActions : : ShowRecordingSettings ( const std : : shared_ptr < CPVRRecording > & recording ) const <nl> { <nl> CGUIDialogPVRRecordingSettings * pDlgInfo = CServiceBroker : : GetGUI ( ) - > GetWindowManager ( ) . GetWindow < CGUIDialogPVRRecordingSettings > ( WINDOW_DIALOG_PVR_RECORDING_SETTING ) ; <nl> if ( ! pDlgInfo ) <nl> namespace PVR <nl> { <nl> std : : string resumeString ; <nl> <nl> - const CPVRRecordingPtr recording ( CPVRItem ( CFileItemPtr ( new CFileItem ( item ) ) ) . GetRecording ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( CPVRItem ( CFileItemPtr ( new CFileItem ( item ) ) ) . GetRecording ( ) ) ; <nl> if ( recording & & ! recording - > IsDeleted ( ) ) <nl> { <nl> int positionInSeconds = lrint ( recording - > GetResumePoint ( ) . timeInSeconds ) ; <nl> namespace PVR <nl> void CPVRGUIActions : : StartPlayback ( CFileItem * item , bool bFullscreen ) const <nl> { <nl> / / Obtain dynamic playback url and properties from the respective pvr client <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> if ( client ) <nl> { <nl> CPVRStreamProperties props ; <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : PlayRecording ( const CFileItemPtr & item , bool bCheckResume ) const <nl> { <nl> - const CPVRRecordingPtr recording ( CPVRItem ( item ) . GetRecording ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( CPVRItem ( item ) . GetRecording ( ) ) ; <nl> if ( ! recording ) <nl> return false ; <nl> <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : PlayEpgTag ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVREpgInfoTagPtr epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> if ( ! epgTag ) <nl> return false ; <nl> <nl> namespace PVR <nl> return false ; <nl> <nl> std : : shared_ptr < CPVRRecording > recording ; <nl> - const CPVRChannelPtr channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CPVRItem ( item ) . GetChannel ( ) ) ; <nl> if ( channel ) <nl> { <nl> bool bSwitchToFullscreen = CServiceBroker : : GetPVRManager ( ) . IsPlayingChannel ( channel ) ; <nl> namespace PVR <nl> else <nl> { <nl> / / if we don ' t , find the active channel group of the demanded type and play it ' s first channel <nl> - const CPVRChannelGroupPtr channelGroup ( CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bIsRadio ) ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > channelGroup ( CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bIsRadio ) ) ; <nl> if ( channelGroup ) <nl> { <nl> / / try to start playback of first channel in this group <nl> namespace PVR <nl> return false ; <nl> <nl> bool playTV = iAction = = STARTUP_ACTION_PLAY_TV ; <nl> - const CPVRChannelGroupsContainerPtr groups ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) ) ; <nl> - CPVRChannelGroupPtr group = playTV ? groups - > GetGroupAllTV ( ) : groups - > GetGroupAllRadio ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroupsContainer > groups ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group = playTV ? groups - > GetGroupAllTV ( ) : groups - > GetGroupAllRadio ( ) ; <nl> <nl> / / get the last played channel or fallback to first channel <nl> std : : shared_ptr < CPVRChannel > channel = group - > GetLastPlayedChannel ( ) ; <nl> namespace PVR <nl> <nl> bool CPVRGUIActions : : HideChannel ( const CFileItemPtr & item ) const <nl> { <nl> - const CPVRChannelPtr channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> <nl> / * check if the channel tag is valid * / <nl> if ( ! channel | | ! channel - > ChannelNumber ( ) . IsValid ( ) ) <nl> namespace PVR <nl> if ( ! CServiceBroker : : GetPVRManager ( ) . IsStarted ( ) | | IsRunningChannelScan ( ) ) <nl> return false ; <nl> <nl> - CPVRClientPtr scanClient ; <nl> - std : : vector < CPVRClientPtr > possibleScanClients = CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetClientsSupportingChannelScan ( ) ; <nl> + std : : shared_ptr < CPVRClient > scanClient ; <nl> + std : : vector < std : : shared_ptr < CPVRClient > > possibleScanClients = CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetClientsSupportingChannelScan ( ) ; <nl> m_bChannelScanRunning = true ; <nl> <nl> / * multiple clients found * / <nl> namespace PVR <nl> CPVRClientMap clients ; <nl> CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetCreatedClients ( clients ) ; <nl> <nl> - std : : vector < std : : pair < CPVRClientPtr , CPVRClientMenuHook > > settingsHooks ; <nl> + std : : vector < std : : pair < std : : shared_ptr < CPVRClient > , CPVRClientMenuHook > > settingsHooks ; <nl> for ( const auto & client : clients ) <nl> { <nl> for ( const auto & hook : client . second - > GetMenuHooks ( ) - > GetSettingsHooks ( ) ) <nl> namespace PVR <nl> pDlgProgress - > SetPercentage ( 10 ) ; <nl> pDlgProgress - > Progress ( ) ; <nl> <nl> - const CPVRDatabasePtr pvrDatabase ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> - const CPVREpgDatabasePtr epgDatabase ( CServiceBroker : : GetPVRManager ( ) . EpgContainer ( ) . GetEpgDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > pvrDatabase ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgDatabase > epgDatabase ( CServiceBroker : : GetPVRManager ( ) . EpgContainer ( ) . GetEpgDatabase ( ) ) ; <nl> <nl> / / increase db open refcounts , so they don ' t get closed during following pvr manager shutdown <nl> pvrDatabase - > Open ( ) ; <nl> namespace PVR <nl> return true ; <nl> } <nl> <nl> - ParentalCheckResult CPVRGUIActions : : CheckParentalLock ( const CPVRChannelPtr & channel ) const <nl> + ParentalCheckResult CPVRGUIActions : : CheckParentalLock ( const std : : shared_ptr < CPVRChannel > & channel ) const <nl> { <nl> if ( ! CServiceBroker : : GetPVRManager ( ) . IsParentalLocked ( channel ) ) <nl> return ParentalCheckResult : : SUCCESS ; <nl> namespace PVR <nl> bool bReturn ( true ) ; <nl> if ( CServiceBroker : : GetPVRManager ( ) . IsStarted ( ) ) <nl> { <nl> - CPVRTimerInfoTagPtr cause ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > cause ; <nl> if ( ! AllLocalBackendsIdle ( cause ) ) <nl> { <nl> if ( bAskUser ) <nl> namespace PVR <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRGUIActions : : AllLocalBackendsIdle ( CPVRTimerInfoTagPtr & causingEvent ) const <nl> + bool CPVRGUIActions : : AllLocalBackendsIdle ( std : : shared_ptr < CPVRTimerInfoTag > & causingEvent ) const <nl> { <nl> / / active recording on local backend ? <nl> const std : : vector < std : : shared_ptr < CPVRTimerInfoTag > > activeRecordings = CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetActiveRecordings ( ) ; <nl> namespace PVR <nl> { <nl> if ( item & & item - > HasPVRTimerInfoTag ( ) ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * item ) ; <nl> if ( client ) <nl> { <nl> const std : : string hostname = client - > GetBackendHostname ( ) ; <nl> namespace PVR <nl> std : : string text = GetAnnouncerText ( timer , 19307 , 19308 ) ; / / Reminder for . . . <nl> <nl> bool bCanRecord = false ; <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( timer - > m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( timer - > m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ) <nl> { <nl> bCanRecord = true ; <nl> namespace PVR <nl> if ( m_settings . GetBoolValue ( CSettings : : SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL ) ) <nl> { <nl> / / if preselect playing channel is activated , return the path of the playing channel , if any . <nl> - const CPVRChannelPtr playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> if ( playingChannel & & playingChannel - > IsRadio ( ) = = bRadio ) <nl> return playingChannel - > Path ( ) ; <nl> } <nl> namespace PVR <nl> time_t playbackStartTime = CServiceBroker : : GetDataCacheCore ( ) . GetStartTime ( ) ; <nl> if ( playbackStartTime > 0 ) <nl> { <nl> - const CPVRChannelPtr playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> if ( playingChannel ) <nl> { <nl> time_t nextTime = 0 ; <nl> - CPVREpgInfoTagPtr next = playingChannel - > GetEPGNext ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > next = playingChannel - > GetEPGNext ( ) ; <nl> if ( next ) <nl> { <nl> next - > StartAsUTC ( ) . GetAsTime ( nextTime ) ; <nl> namespace PVR <nl> time_t playbackStartTime = CServiceBroker : : GetDataCacheCore ( ) . GetStartTime ( ) ; <nl> if ( playbackStartTime > 0 ) <nl> { <nl> - const CPVRChannelPtr playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> if ( playingChannel ) <nl> { <nl> time_t prevTime = 0 ; <nl> - CPVREpgInfoTagPtr prev = playingChannel - > GetEPGNow ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > prev = playingChannel - > GetEPGNow ( ) ; <nl> if ( prev ) <nl> { <nl> prev - > StartAsUTC ( ) . GetAsTime ( prevTime ) ; <nl> namespace PVR <nl> { <nl> if ( item - > HasPVRChannelInfoTag ( ) ) <nl> { <nl> - const CPVRChannelPtr channel = item - > GetPVRChannelInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = item - > GetPVRChannelInfoTag ( ) ; <nl> m_channelNavigator . SetPlayingChannel ( channel ) ; <nl> SetSelectedItemPath ( channel - > IsRadio ( ) , channel - > Path ( ) ) ; <nl> } <nl> namespace PVR <nl> void CPVRChannelSwitchingInputHandler : : GetChannelNumbers ( std : : vector < std : : string > & channelNumbers ) <nl> { <nl> CPVRManager & pvrMgr = CServiceBroker : : GetPVRManager ( ) ; <nl> - const CPVRChannelPtr playingChannel = pvrMgr . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel = pvrMgr . GetPlayingChannel ( ) ; <nl> if ( playingChannel ) <nl> { <nl> - const CPVRChannelGroupPtr group = pvrMgr . ChannelGroups ( ) - > GetGroupAll ( playingChannel - > IsRadio ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = pvrMgr . ChannelGroups ( ) - > GetGroupAll ( playingChannel - > IsRadio ( ) ) ; <nl> if ( group ) <nl> group - > GetChannelNumbers ( channelNumbers ) ; <nl> } <nl> namespace PVR <nl> { <nl> if ( channelNumber . IsValid ( ) & & CServiceBroker : : GetPVRManager ( ) . IsPlaying ( ) ) <nl> { <nl> - const CPVRChannelPtr playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> if ( playingChannel ) <nl> { <nl> if ( channelNumber ! = playingChannel - > ChannelNumber ( ) ) <nl> { <nl> / / channel number present in playing group ? <nl> bool bRadio = playingChannel - > IsRadio ( ) ; <nl> - const CPVRChannelGroupPtr group = CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bRadio ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bRadio ) ; <nl> std : : shared_ptr < CPVRChannel > channel = group - > GetByChannelNumber ( channelNumber ) ; <nl> <nl> if ( ! channel ) <nl> { <nl> / / channel number present in any group ? <nl> const CPVRChannelGroups * groupAccess = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( bRadio ) ; <nl> - const std : : vector < CPVRChannelGroupPtr > groups = groupAccess - > GetMembers ( true ) ; <nl> + const std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups = groupAccess - > GetMembers ( true ) ; <nl> for ( const auto & currentGroup : groups ) <nl> { <nl> channel = currentGroup - > GetByChannelNumber ( channelNumber ) ; <nl> namespace PVR <nl> { <nl> if ( CServiceBroker : : GetPVRManager ( ) . IsPlaying ( ) ) <nl> { <nl> - const CPVRChannelPtr playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> if ( playingChannel ) <nl> { <nl> - const CPVRChannelGroupPtr group ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetPreviousPlayedGroup ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetPreviousPlayedGroup ( ) ) ; <nl> if ( group ) <nl> { <nl> CServiceBroker : : GetPVRManager ( ) . SetPlayingGroup ( group ) ; <nl> mmm a / xbmc / pvr / PVRGUIActions . h <nl> ppp b / xbmc / pvr / PVRGUIActions . h <nl> namespace PVR <nl> * @ brief Add a timer to the client . Doesn ' t add the timer to the container . The backend will do this . <nl> * @ return True if it was sent correctly , false if not . <nl> * / <nl> - bool AddTimer ( const CPVRTimerInfoTagPtr & item ) const ; <nl> + bool AddTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & item ) const ; <nl> <nl> / * ! <nl> * @ brief Create a new timer rule , either interactive or non - interactive . <nl> namespace PVR <nl> * @ param bOnOff True to start recording , false to stop . <nl> * @ return True if the recording was started or stopped successfully , false otherwise . <nl> * / <nl> - bool SetRecordingOnChannel ( const CPVRChannelPtr & channel , bool bOnOff ) ; <nl> + bool SetRecordingOnChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bOnOff ) ; <nl> <nl> / * ! <nl> * @ brief Stop a currently active recording , always showing a confirmation dialog . <nl> namespace PVR <nl> * @ param channel The channel to do the check for . <nl> * @ return the result of the check ( success , failed , or canceled by user ) . <nl> * / <nl> - ParentalCheckResult CheckParentalLock ( const CPVRChannelPtr & channel ) const ; <nl> + ParentalCheckResult CheckParentalLock ( const std : : shared_ptr < CPVRChannel > & channel ) const ; <nl> <nl> / * ! <nl> * @ brief Open Numeric dialog to check for parental PIN . <nl> namespace PVR <nl> * @ param timer containing the timer the settings shall be displayed for . <nl> * @ return true , if the dialog was ended successfully , false otherwise . <nl> * / <nl> - bool ShowTimerSettings ( const CPVRTimerInfoTagPtr & timer ) const ; <nl> + bool ShowTimerSettings ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const ; <nl> <nl> / * ! <nl> * @ brief Add a timer or timer rule , either interactive or non - interactive . <nl> namespace PVR <nl> * @ param bDeleteRule denotes to delete a timer rule . For convenience , one can pass a timer created by a rule . <nl> * @ return true , if the timer or timer rule was deleted successfully , false otherwise . <nl> * / <nl> - bool DeleteTimer ( const CPVRTimerInfoTagPtr & timer , bool bIsRecording , bool bDeleteRule ) const ; <nl> + bool DeleteTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer , bool bIsRecording , bool bDeleteRule ) const ; <nl> <nl> / * ! <nl> * @ brief Open a dialog to confirm timer delete . <nl> namespace PVR <nl> * out , for one shot timer not scheduled by a timer rule : ignored <nl> * @ return true , to proceed with delete , false otherwise . <nl> * / <nl> - bool ConfirmDeleteTimer ( const CPVRTimerInfoTagPtr & timer , bool & bDeleteRule ) const ; <nl> + bool ConfirmDeleteTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer , bool & bDeleteRule ) const ; <nl> <nl> / * ! <nl> * @ brief Open a dialog to confirm stop recording . <nl> * @ param timer the recording to stop ( actually the timer to delete ) . <nl> * @ return true , to proceed with delete , false otherwise . <nl> * / <nl> - bool ConfirmStopRecording ( const CPVRTimerInfoTagPtr & timer ) const ; <nl> + bool ConfirmStopRecording ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const ; <nl> <nl> / * ! <nl> * @ brief Open a dialog to confirm to delete a recording . <nl> namespace PVR <nl> * @ param recording containing the recording the settings shall be displayed for . <nl> * @ return true , if the dialog was ended successfully , false otherwise . <nl> * / <nl> - bool ShowRecordingSettings ( const CPVRRecordingPtr & recording ) const ; <nl> + bool ShowRecordingSettings ( const std : : shared_ptr < CPVRRecording > & recording ) const ; <nl> <nl> / * ! <nl> * @ brief Check whether resume play is possible for a given item , display " resume from . . . " / " play from start " context menu in case . <nl> namespace PVR <nl> * / <nl> void StartPlayback ( CFileItem * item , bool bFullscreen ) const ; <nl> <nl> - bool AllLocalBackendsIdle ( CPVRTimerInfoTagPtr & causingEvent ) const ; <nl> + bool AllLocalBackendsIdle ( std : : shared_ptr < CPVRTimerInfoTag > & causingEvent ) const ; <nl> bool EventOccursOnLocalBackend ( const std : : shared_ptr < CFileItem > & item ) const ; <nl> bool IsNextEventWithinBackendIdleTime ( void ) const ; <nl> <nl> mmm a / xbmc / pvr / PVRGUIChannelNavigator . cpp <nl> ppp b / xbmc / pvr / PVRGUIChannelNavigator . cpp <nl> namespace PVR <nl> return ; <nl> } <nl> <nl> - const CPVRChannelPtr nextChannel = GetNextOrPrevChannel ( true ) ; <nl> + const std : : shared_ptr < CPVRChannel > nextChannel = GetNextOrPrevChannel ( true ) ; <nl> if ( nextChannel ) <nl> SelectChannel ( nextChannel , eSwitchMode ) ; <nl> } <nl> namespace PVR <nl> return ; <nl> } <nl> <nl> - const CPVRChannelPtr prevChannel = GetNextOrPrevChannel ( false ) ; <nl> + const std : : shared_ptr < CPVRChannel > prevChannel = GetNextOrPrevChannel ( false ) ; <nl> if ( prevChannel ) <nl> SelectChannel ( prevChannel , eSwitchMode ) ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRGUIChannelNavigator : : GetNextOrPrevChannel ( bool bNext ) <nl> + std : : shared_ptr < CPVRChannel > CPVRGUIChannelNavigator : : GetNextOrPrevChannel ( bool bNext ) <nl> { <nl> const bool bPlayingRadio = CServiceBroker : : GetPVRManager ( ) . IsPlayingRadio ( ) ; <nl> const bool bPlayingTV = CServiceBroker : : GetPVRManager ( ) . IsPlayingTV ( ) ; <nl> <nl> if ( bPlayingTV | | bPlayingRadio ) <nl> { <nl> - const CPVRChannelGroupPtr group = CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bPlayingRadio ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = CServiceBroker : : GetPVRManager ( ) . GetPlayingGroup ( bPlayingRadio ) ; <nl> if ( group ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> namespace PVR <nl> return { } ; <nl> } <nl> <nl> - void CPVRGUIChannelNavigator : : SelectChannel ( const CPVRChannelPtr channel , ChannelSwitchMode eSwitchMode ) <nl> + void CPVRGUIChannelNavigator : : SelectChannel ( const std : : shared_ptr < CPVRChannel > channel , ChannelSwitchMode eSwitchMode ) <nl> { <nl> CServiceBroker : : GetGUI ( ) - > GetInfoManager ( ) . SetCurrentItem ( CFileItem ( channel ) ) ; <nl> <nl> namespace PVR <nl> ShowInfo ( ) ; <nl> } <nl> <nl> - void CPVRGUIChannelNavigator : : SetPlayingChannel ( const CPVRChannelPtr channel ) <nl> + void CPVRGUIChannelNavigator : : SetPlayingChannel ( const std : : shared_ptr < CPVRChannel > channel ) <nl> { <nl> CFileItemPtr item ; <nl> <nl> mmm a / xbmc / pvr / PVRGUIChannelNavigator . h <nl> ppp b / xbmc / pvr / PVRGUIChannelNavigator . h <nl> <nl> # include " pvr / PVRTypes . h " <nl> # include " threads / CriticalSection . h " <nl> <nl> + # include < memory > <nl> + <nl> namespace PVR <nl> { <nl> enum class ChannelSwitchMode <nl> namespace PVR <nl> * @ brief Set a new playing channel and show the channel info OSD for the new channel . <nl> * @ param channel The new playing channel <nl> * / <nl> - void SetPlayingChannel ( const CPVRChannelPtr channel ) ; <nl> + void SetPlayingChannel ( const std : : shared_ptr < CPVRChannel > channel ) ; <nl> <nl> / * ! <nl> * @ brief Clear the currently playing channel and hide the channel info OSD . <nl> namespace PVR <nl> * @ param bNext True to get the next channel , false to get the previous channel . <nl> * @ param return The channel or nullptr if not found . <nl> * / <nl> - CPVRChannelPtr GetNextOrPrevChannel ( bool bNext ) ; <nl> + std : : shared_ptr < CPVRChannel > GetNextOrPrevChannel ( bool bNext ) ; <nl> <nl> / * ! <nl> * @ brief Select a given channel , display channel info OSD , switch according to given switch mode . <nl> * @ param item The channel to select . <nl> * @ param eSwitchMode The channel switch mode . <nl> * / <nl> - void SelectChannel ( const CPVRChannelPtr channel , ChannelSwitchMode eSwitchMode ) ; <nl> + void SelectChannel ( const std : : shared_ptr < CPVRChannel > channel , ChannelSwitchMode eSwitchMode ) ; <nl> <nl> / * ! <nl> * @ brief Show the channel info OSD . <nl> namespace PVR <nl> void ShowInfo ( bool bForce ) ; <nl> <nl> mutable CCriticalSection m_critSection ; <nl> - CPVRChannelPtr m_playingChannel ; <nl> - CPVRChannelPtr m_currentChannel ; <nl> + std : : shared_ptr < CPVRChannel > m_playingChannel ; <nl> + std : : shared_ptr < CPVRChannel > m_currentChannel ; <nl> int m_iChannelEntryJobId = - 1 ; <nl> int m_iChannelInfoJobId = - 1 ; <nl> } ; <nl> mmm a / xbmc / pvr / PVRGUIInfo . cpp <nl> ppp b / xbmc / pvr / PVRGUIInfo . cpp <nl> void CPVRGUIInfo : : UpdateQualityData ( void ) <nl> bool bIsPlayingRecording = CServiceBroker : : GetPVRManager ( ) . IsPlayingRecording ( ) ; <nl> if ( ! bIsPlayingRecording ) <nl> { <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetCreatedClient ( CServiceBroker : : GetPVRManager ( ) . GetPlayingClientID ( ) , client ) ; <nl> if ( client & & client - > SignalQuality ( qualityInfo ) = = PVR_ERROR_NO_ERROR ) <nl> { <nl> void CPVRGUIInfo : : UpdateDescrambleData ( void ) <nl> bool bIsPlayingRecording = CServiceBroker : : GetPVRManager ( ) . IsPlayingRecording ( ) ; <nl> if ( ! bIsPlayingRecording ) <nl> { <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetCreatedClient ( CServiceBroker : : GetPVRManager ( ) . GetPlayingClientID ( ) , client ) ; <nl> if ( client & & client - > GetDescrambleInfo ( descrambleInfo ) = = PVR_ERROR_NO_ERROR ) <nl> { <nl> namespace <nl> <nl> bool CPVRGUIInfo : : GetListItemAndPlayerLabel ( const CFileItem * item , const CGUIInfo & info , std : : string & strValue ) const <nl> { <nl> - const CPVRTimerInfoTagPtr timer = item - > GetPVRTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = item - > GetPVRTimerInfoTag ( ) ; <nl> if ( timer ) <nl> { <nl> switch ( info . m_info ) <nl> bool CPVRGUIInfo : : GetListItemAndPlayerLabel ( const CFileItem * item , const CGUIInf <nl> } <nl> } <nl> <nl> - const CPVRRecordingPtr recording ( item - > GetPVRRecordingInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording ( item - > GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording ) <nl> { <nl> / / Note : CPVRRecoding is derived from CVideoInfoTag . All base class properties will be handled <nl> bool CPVRGUIInfo : : GetListItemAndPlayerLabel ( const CFileItem * item , const CGUIInf <nl> case VIDEOPLAYER_CHANNEL_NUMBER : <nl> case LISTITEM_CHANNEL_NUMBER : <nl> { <nl> - const CPVRChannelPtr channel = recording - > Channel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = recording - > Channel ( ) ; <nl> if ( channel ) <nl> { <nl> strValue = channel - > ChannelNumber ( ) . FormattedChannelNumber ( ) ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerLabel ( const CFileItem * item , const CGUIInf <nl> return false ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr epgTag ; <nl> - CPVRChannelPtr channel ; <nl> + std : : shared_ptr < CPVREpgInfoTag > epgTag ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) | | item - > IsPVRTimer ( ) ) <nl> { <nl> CPVRItem pvrItem ( item ) ; <nl> bool CPVRGUIInfo : : GetPVRLabel ( const CFileItem * item , const CGUIInfo & info , std : : <nl> { <nl> case PVR_EPG_EVENT_ICON : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> if ( epgTag ) <nl> { <nl> strValue = epgTag - > Icon ( ) ; <nl> bool CPVRGUIInfo : : GetPVRLabel ( const CFileItem * item , const CGUIInfo & info , std : : <nl> } <nl> case PVR_EPG_EVENT_DURATION : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> strValue = m_timesInfo . GetEpgEventDuration ( epgTag , static_cast < TIME_FORMAT > ( info . GetData1 ( ) ) ) ; <nl> return true ; <nl> } <nl> case PVR_EPG_EVENT_ELAPSED_TIME : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> strValue = m_timesInfo . GetEpgEventElapsedTime ( epgTag , static_cast < TIME_FORMAT > ( info . GetData1 ( ) ) ) ; <nl> return true ; <nl> } <nl> case PVR_EPG_EVENT_REMAINING_TIME : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> strValue = m_timesInfo . GetEpgEventRemainingTime ( epgTag , static_cast < TIME_FORMAT > ( info . GetData1 ( ) ) ) ; <nl> return true ; <nl> } <nl> case PVR_EPG_EVENT_FINISH_TIME : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> strValue = m_timesInfo . GetEpgEventFinishTime ( epgTag , static_cast < TIME_FORMAT > ( info . GetData1 ( ) ) ) ; <nl> return true ; <nl> } <nl> bool CPVRGUIInfo : : GetListItemAndPlayerInt ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_PROGRESS : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> if ( epgTag ) <nl> iValue = static_cast < int > ( epgTag - > ProgressPercentage ( ) ) ; <nl> } <nl> bool CPVRGUIInfo : : GetPVRInt ( const CFileItem * item , const CGUIInfo & info , int & iV <nl> { <nl> case PVR_EPG_EVENT_DURATION : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> iValue = m_timesInfo . GetEpgEventDuration ( epgTag ) ; <nl> return true ; <nl> } <nl> case PVR_EPG_EVENT_PROGRESS : <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) ? CPVRItem ( item ) . GetEpgInfoTag ( ) : nullptr ; <nl> iValue = m_timesInfo . GetEpgEventProgress ( epgTag ) ; <nl> return true ; <nl> } <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> } <nl> else if ( item - > IsEPG ( ) | | item - > IsPVRTimer ( ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> if ( timer ) <nl> bValue = timer - > IsRecording ( ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_INPROGRESS : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> if ( epgTag ) <nl> bValue = epgTag - > IsActive ( ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_HASTIMER : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> if ( epgTag ) <nl> bValue = ! ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( epgTag ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_HASTIMERSCHEDULE : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) | | item - > IsPVRTimer ( ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> if ( timer ) <nl> bValue = timer - > GetTimerRuleId ( ) ! = PVR_TIMER_NO_PARENT ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_TIMERISACTIVE : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> if ( timer ) <nl> bValue = timer - > IsActive ( ) ; <nl> break ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_TIMERHASCONFLICT : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> if ( timer ) <nl> bValue = timer - > HasConflict ( ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_TIMERHASERROR : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVRTimerInfoTagPtr timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRTimerInfoTag > timer = CPVRItem ( item ) . GetTimerInfoTag ( ) ; <nl> if ( timer ) <nl> bValue = ( timer - > IsBroken ( ) & & ! timer - > HasConflict ( ) ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_HASRECORDING : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> if ( epgTag ) <nl> bValue = ! ! CServiceBroker : : GetPVRManager ( ) . Recordings ( ) - > GetRecordingForEpgTag ( epgTag ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_HAS_EPG : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) | | item - > IsPVRTimer ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag = CPVRItem ( item ) . GetEpgInfoTag ( ) ; <nl> bValue = ( epgTag ! = nullptr ) ; <nl> return true ; <nl> } <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case LISTITEM_ISENCRYPTED : <nl> if ( item - > IsPVRChannel ( ) | | item - > IsEPG ( ) ) <nl> { <nl> - const CPVRChannelPtr channel = CPVRItem ( item ) . GetChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = CPVRItem ( item ) . GetChannel ( ) ; <nl> if ( channel ) <nl> bValue = channel - > IsEncrypted ( ) ; <nl> return true ; <nl> bool CPVRGUIInfo : : GetListItemAndPlayerBool ( const CFileItem * item , const CGUIInfo <nl> case VIDEOPLAYER_CAN_RESUME_LIVE_TV : <nl> if ( item - > IsPVRRecording ( ) ) <nl> { <nl> - const CPVRRecordingPtr recording = item - > GetPVRRecordingInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording = item - > GetPVRRecordingInfoTag ( ) ; <nl> const std : : shared_ptr < CPVREpg > epg = recording - > Channel ( ) ? recording - > Channel ( ) - > GetEPG ( ) : nullptr ; <nl> const std : : shared_ptr < CPVREpgInfoTag > epgTag = CServiceBroker : : GetPVRManager ( ) . EpgContainer ( ) . GetTagById ( epg , recording - > BroadcastUid ( ) ) ; <nl> bValue = ( epgTag & & epgTag - > IsActive ( ) ) ; <nl> void CPVRGUIInfo : : CharInfoEncryption ( std : : string & strValue ) const <nl> } <nl> else <nl> { <nl> - const CPVRChannelPtr channel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> if ( channel ) <nl> { <nl> strValue = channel - > EncryptionName ( ) ; <nl> mmm a / xbmc / pvr / PVRGUITimesInfo . cpp <nl> ppp b / xbmc / pvr / PVRGUITimesInfo . cpp <nl> void CPVRGUITimesInfo : : Reset ( ) <nl> <nl> void CPVRGUITimesInfo : : UpdatePlayingTag ( ) <nl> { <nl> - const CPVRChannelPtr currentChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> - CPVREpgInfoTagPtr currentTag = CServiceBroker : : GetPVRManager ( ) . GetPlayingEpgTag ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > currentChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > currentTag = CServiceBroker : : GetPVRManager ( ) . GetPlayingEpgTag ( ) ; <nl> <nl> if ( currentChannel | | currentTag ) <nl> { <nl> void CPVRGUITimesInfo : : UpdatePlayingTag ( ) <nl> } <nl> else <nl> { <nl> - const CPVRRecordingPtr recording = CServiceBroker : : GetPVRManager ( ) . GetPlayingRecording ( ) ; <nl> + const std : : shared_ptr < CPVRRecording > recording = CServiceBroker : : GetPVRManager ( ) . GetPlayingRecording ( ) ; <nl> if ( recording ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> void CPVRGUITimesInfo : : UpdateTimeshiftData ( ) <nl> int64_t iPlayTime , iMinTime , iMaxTime ; <nl> CServiceBroker : : GetDataCacheCore ( ) . GetPlayTimes ( iStartTime , iPlayTime , iMinTime , iMaxTime ) ; <nl> bool bPlaying = CServiceBroker : : GetDataCacheCore ( ) . GetSpeed ( ) = = 1 . 0 ; <nl> - const CPVRChannelPtr playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > playingChannel = CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> std : : string CPVRGUITimesInfo : : GetTimeshiftProgressEndTime ( TIME_FORMAT format ) co <nl> return TimeToTimeString ( m_iTimeshiftProgressEndTime , format , false ) ; <nl> } <nl> <nl> - std : : string CPVRGUITimesInfo : : GetEpgEventDuration ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const <nl> + std : : string CPVRGUITimesInfo : : GetEpgEventDuration ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return StringUtils : : SecondsToTimeString ( GetEpgEventDuration ( epgTag ) , format ) ; <nl> } <nl> <nl> - std : : string CPVRGUITimesInfo : : GetEpgEventElapsedTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const <nl> + std : : string CPVRGUITimesInfo : : GetEpgEventElapsedTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const <nl> { <nl> int iElapsed = 0 ; <nl> CSingleLock lock ( m_critSection ) ; <nl> std : : string CPVRGUITimesInfo : : GetEpgEventElapsedTime ( const CPVREpgInfoTagPtr & ep <nl> return StringUtils : : SecondsToTimeString ( iElapsed , format ) ; <nl> } <nl> <nl> - std : : string CPVRGUITimesInfo : : GetEpgEventRemainingTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const <nl> + std : : string CPVRGUITimesInfo : : GetEpgEventRemainingTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return StringUtils : : SecondsToTimeString ( GetRemainingTime ( epgTag ) , format ) ; <nl> } <nl> <nl> - std : : string CPVRGUITimesInfo : : GetEpgEventFinishTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const <nl> + std : : string CPVRGUITimesInfo : : GetEpgEventFinishTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const <nl> { <nl> CDateTime finish = CDateTime : : GetCurrentDateTime ( ) ; <nl> finish + = CDateTimeSpan ( 0 , 0 , 0 , GetRemainingTime ( epgTag ) ) ; <nl> int CPVRGUITimesInfo : : GetElapsedTime ( ) const <nl> } <nl> } <nl> <nl> - int CPVRGUITimesInfo : : GetRemainingTime ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + int CPVRGUITimesInfo : : GetRemainingTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( epgTag & & epgTag ! = m_playingEpgTag ) <nl> int CPVRGUITimesInfo : : GetTimeshiftProgressBufferEnd ( ) const <nl> return std : : lrintf ( static_cast < float > ( m_iTimeshiftEndTime - m_iTimeshiftProgressStartTime ) / m_iTimeshiftProgressDuration * 100 ) ; <nl> } <nl> <nl> - int CPVRGUITimesInfo : : GetEpgEventDuration ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + int CPVRGUITimesInfo : : GetEpgEventDuration ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( epgTag & & epgTag ! = m_playingEpgTag ) <nl> int CPVRGUITimesInfo : : GetEpgEventDuration ( const CPVREpgInfoTagPtr & epgTag ) const <nl> return m_iDuration ; <nl> } <nl> <nl> - int CPVRGUITimesInfo : : GetEpgEventProgress ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + int CPVRGUITimesInfo : : GetEpgEventProgress ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( epgTag & & epgTag ! = m_playingEpgTag ) <nl> mmm a / xbmc / pvr / PVRGUITimesInfo . h <nl> ppp b / xbmc / pvr / PVRGUITimesInfo . h <nl> <nl> # include " pvr / PVRTypes . h " <nl> # include " threads / CriticalSection . h " <nl> <nl> + # include < memory > <nl> + <nl> namespace PVR <nl> { <nl> class CPVRGUITimesInfo <nl> namespace PVR <nl> std : : string GetTimeshiftProgressStartTime ( TIME_FORMAT format ) const ; <nl> std : : string GetTimeshiftProgressEndTime ( TIME_FORMAT format ) const ; <nl> <nl> - std : : string GetEpgEventDuration ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const ; <nl> - std : : string GetEpgEventElapsedTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const ; <nl> - std : : string GetEpgEventRemainingTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const ; <nl> - std : : string GetEpgEventFinishTime ( const CPVREpgInfoTagPtr & epgTag , TIME_FORMAT format ) const ; <nl> + std : : string GetEpgEventDuration ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const ; <nl> + std : : string GetEpgEventElapsedTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const ; <nl> + std : : string GetEpgEventRemainingTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const ; <nl> + std : : string GetEpgEventFinishTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag , TIME_FORMAT format ) const ; <nl> std : : string GetEpgEventSeekTime ( int iSeekSize , TIME_FORMAT format ) const ; <nl> <nl> / / GUI info ints <nl> namespace PVR <nl> int GetTimeshiftProgressBufferStart ( ) const ; <nl> int GetTimeshiftProgressBufferEnd ( ) const ; <nl> <nl> - int GetEpgEventDuration ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> - int GetEpgEventProgress ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> + int GetEpgEventDuration ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> + int GetEpgEventProgress ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> <nl> / / GUI info bools <nl> bool IsTimeshifting ( ) const ; <nl> namespace PVR <nl> static std : : string TimeToTimeString ( time_t datetime , TIME_FORMAT format , bool withSeconds ) ; <nl> <nl> int GetElapsedTime ( ) const ; <nl> - int GetRemainingTime ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> + int GetRemainingTime ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> <nl> mutable CCriticalSection m_critSection ; <nl> <nl> - CPVREpgInfoTagPtr m_playingEpgTag ; <nl> - CPVRChannelPtr m_playingChannel ; <nl> + std : : shared_ptr < CPVREpgInfoTag > m_playingEpgTag ; <nl> + std : : shared_ptr < CPVRChannel > m_playingChannel ; <nl> <nl> time_t m_iStartTime ; <nl> unsigned int m_iDuration ; <nl> mmm a / xbmc / pvr / PVRItem . cpp <nl> ppp b / xbmc / pvr / PVRItem . cpp <nl> <nl> <nl> namespace PVR <nl> { <nl> - CPVREpgInfoTagPtr CPVRItem : : GetEpgInfoTag ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRItem : : GetEpgInfoTag ( ) const <nl> { <nl> if ( m_item - > IsEPG ( ) ) <nl> { <nl> namespace PVR <nl> { <nl> CLog : : LogF ( LOGERROR , " Unsupported item type ! " ) ; <nl> } <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRItem : : GetNextEpgInfoTag ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRItem : : GetNextEpgInfoTag ( ) const <nl> { <nl> if ( m_item - > IsEPG ( ) ) <nl> { <nl> namespace PVR <nl> } <nl> else if ( m_item - > IsPVRTimer ( ) ) <nl> { <nl> - const CPVRChannelPtr channel = m_item - > GetPVRTimerInfoTag ( ) - > Channel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = m_item - > GetPVRTimerInfoTag ( ) - > Channel ( ) ; <nl> if ( channel ) <nl> return channel - > GetEPGNext ( ) ; <nl> } <nl> namespace PVR <nl> { <nl> CLog : : LogF ( LOGERROR , " Unsupported item type ! " ) ; <nl> } <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRItem : : GetChannel ( ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRItem : : GetChannel ( ) const <nl> { <nl> if ( m_item - > IsPVRChannel ( ) ) <nl> { <nl> namespace PVR <nl> { <nl> CLog : : LogF ( LOGERROR , " Unsupported item type ! " ) ; <nl> } <nl> - return CPVRChannelPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannel > ( ) ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr CPVRItem : : GetTimerInfoTag ( ) const <nl> + std : : shared_ptr < CPVRTimerInfoTag > CPVRItem : : GetTimerInfoTag ( ) const <nl> { <nl> if ( m_item - > IsPVRTimer ( ) ) <nl> { <nl> namespace PVR <nl> { <nl> CLog : : LogF ( LOGERROR , " Unsupported item type ! " ) ; <nl> } <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> - CPVRRecordingPtr CPVRItem : : GetRecording ( ) const <nl> + std : : shared_ptr < CPVRRecording > CPVRItem : : GetRecording ( ) const <nl> { <nl> if ( m_item - > IsPVRRecording ( ) ) <nl> { <nl> namespace PVR <nl> { <nl> CLog : : LogF ( LOGERROR , " Unsupported item type ! " ) ; <nl> } <nl> - return CPVRRecordingPtr ( ) ; <nl> + return std : : shared_ptr < CPVRRecording > ( ) ; <nl> } <nl> <nl> bool CPVRItem : : IsRadio ( ) const <nl> mmm a / xbmc / pvr / PVRItem . h <nl> ppp b / xbmc / pvr / PVRItem . h <nl> namespace PVR <nl> explicit CPVRItem ( const std : : shared_ptr < CFileItem > & item ) : m_item ( item . get ( ) ) { } <nl> explicit CPVRItem ( const CFileItem * item ) : m_item ( item ) { } <nl> <nl> - CPVREpgInfoTagPtr GetEpgInfoTag ( ) const ; <nl> - CPVREpgInfoTagPtr GetNextEpgInfoTag ( ) const ; <nl> - CPVRChannelPtr GetChannel ( ) const ; <nl> - CPVRTimerInfoTagPtr GetTimerInfoTag ( ) const ; <nl> - CPVRRecordingPtr GetRecording ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetEpgInfoTag ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetNextEpgInfoTag ( ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetChannel ( ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetTimerInfoTag ( ) const ; <nl> + std : : shared_ptr < CPVRRecording > GetRecording ( ) const ; <nl> <nl> bool IsRadio ( ) const ; <nl> <nl> mmm a / xbmc / pvr / PVRManager . cpp <nl> ppp b / xbmc / pvr / PVRManager . cpp <nl> void CPVRManager : : Announce ( ANNOUNCEMENT : : AnnouncementFlag flag , const char * send <nl> } <nl> } <nl> <nl> - CPVRDatabasePtr CPVRManager : : GetTVDatabase ( void ) const <nl> + std : : shared_ptr < CPVRDatabase > CPVRManager : : GetTVDatabase ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( ! m_database | | ! m_database - > IsOpen ( ) ) <nl> CPVRDatabasePtr CPVRManager : : GetTVDatabase ( void ) const <nl> return m_database ; <nl> } <nl> <nl> - CPVRChannelGroupsContainerPtr CPVRManager : : ChannelGroups ( void ) const <nl> + std : : shared_ptr < CPVRChannelGroupsContainer > CPVRManager : : ChannelGroups ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_channelGroups ; <nl> } <nl> <nl> - CPVRRecordingsPtr CPVRManager : : Recordings ( void ) const <nl> + std : : shared_ptr < CPVRRecordings > CPVRManager : : Recordings ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_recordings ; <nl> } <nl> <nl> - CPVRTimersPtr CPVRManager : : Timers ( void ) const <nl> + std : : shared_ptr < CPVRTimers > CPVRManager : : Timers ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_timers ; <nl> } <nl> <nl> - CPVRClientsPtr CPVRManager : : Clients ( void ) const <nl> + std : : shared_ptr < CPVRClients > CPVRManager : : Clients ( void ) const <nl> { <nl> / / note : m_addons is const ( only set / reset in ctor / dtor ) . no need for a lock here . <nl> return m_addons ; <nl> } <nl> <nl> - CPVRClientPtr CPVRManager : : GetClient ( const CFileItem & item ) const <nl> + std : : shared_ptr < CPVRClient > CPVRManager : : GetClient ( const CFileItem & item ) const <nl> { <nl> int iClientID = PVR_INVALID_CLIENT_ID ; <nl> <nl> CPVRClientPtr CPVRManager : : GetClient ( const CFileItem & item ) const <nl> return GetClient ( iClientID ) ; <nl> } <nl> <nl> - CPVRClientPtr CPVRManager : : GetClient ( int iClientId ) const <nl> + std : : shared_ptr < CPVRClient > CPVRManager : : GetClient ( int iClientId ) const <nl> { <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> if ( iClientId ! = PVR_INVALID_CLIENT_ID ) <nl> m_addons - > GetCreatedClient ( iClientId , client ) ; <nl> <nl> return client ; <nl> } <nl> <nl> - CPVRGUIActionsPtr CPVRManager : : GUIActions ( void ) const <nl> + std : : shared_ptr < CPVRGUIActions > CPVRManager : : GUIActions ( void ) const <nl> { <nl> / / note : m_guiActions is const ( only set / reset in ctor / dtor ) . no need for a lock here . <nl> return m_guiActions ; <nl> bool CPVRManager : : IsPlaying ( void ) const <nl> return IsStarted ( ) & & ( m_playingChannel | | m_playingRecording | | m_playingEpgTag ) ; <nl> } <nl> <nl> - bool CPVRManager : : IsPlayingChannel ( const CPVRChannelPtr & channel ) const <nl> + bool CPVRManager : : IsPlayingChannel ( const std : : shared_ptr < CPVRChannel > & channel ) const <nl> { <nl> bool bReturn ( false ) ; <nl> <nl> if ( channel & & IsStarted ( ) ) <nl> { <nl> - CPVRChannelPtr current ( GetPlayingChannel ( ) ) ; <nl> + std : : shared_ptr < CPVRChannel > current ( GetPlayingChannel ( ) ) ; <nl> if ( current & & * current = = * channel ) <nl> bReturn = true ; <nl> } <nl> bool CPVRManager : : IsPlayingEncryptedChannel ( void ) const <nl> return IsStarted ( ) & & m_playingChannel & & m_playingChannel - > IsEncrypted ( ) ; <nl> } <nl> <nl> - bool CPVRManager : : IsPlayingRecording ( const CPVRRecordingPtr & recording ) const <nl> + bool CPVRManager : : IsPlayingRecording ( const std : : shared_ptr < CPVRRecording > & recording ) const <nl> { <nl> bool bReturn ( false ) ; <nl> <nl> if ( recording & & IsStarted ( ) ) <nl> { <nl> - CPVRRecordingPtr current ( GetPlayingRecording ( ) ) ; <nl> + std : : shared_ptr < CPVRRecording > current ( GetPlayingRecording ( ) ) ; <nl> if ( current & & * current = = * recording ) <nl> bReturn = true ; <nl> } <nl> bool CPVRManager : : IsPlayingRecording ( const CPVRRecordingPtr & recording ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRManager : : IsPlayingEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + bool CPVRManager : : IsPlayingEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> bool bReturn ( false ) ; <nl> <nl> if ( epgTag & & IsStarted ( ) ) <nl> { <nl> - CPVREpgInfoTagPtr current ( GetPlayingEpgTag ( ) ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > current ( GetPlayingEpgTag ( ) ) ; <nl> if ( current & & * current = = * epgTag ) <nl> bReturn = true ; <nl> } <nl> bool CPVRManager : : IsPlayingChannel ( int iClientID , int iUniqueChannelID ) const <nl> return false ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRManager : : GetPlayingChannel ( void ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRManager : : GetPlayingChannel ( void ) const <nl> { <nl> return m_playingChannel ; <nl> } <nl> <nl> - CPVRRecordingPtr CPVRManager : : GetPlayingRecording ( void ) const <nl> + std : : shared_ptr < CPVRRecording > CPVRManager : : GetPlayingRecording ( void ) const <nl> { <nl> return m_playingRecording ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRManager : : GetPlayingEpgTag ( void ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRManager : : GetPlayingEpgTag ( void ) const <nl> { <nl> return m_playingEpgTag ; <nl> } <nl> int CPVRManager : : GetPlayingClientID ( void ) const <nl> <nl> bool CPVRManager : : IsRecordingOnPlayingChannel ( void ) const <nl> { <nl> - const CPVRChannelPtr currentChannel = GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > currentChannel = GetPlayingChannel ( ) ; <nl> return currentChannel & & m_timers & & m_timers - > IsRecordingOnChannel ( * currentChannel ) ; <nl> } <nl> <nl> bool CPVRManager : : IsPlayingActiveRecording ( ) const <nl> <nl> bool CPVRManager : : CanRecordOnPlayingChannel ( void ) const <nl> { <nl> - const CPVRChannelPtr currentChannel = GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > currentChannel = GetPlayingChannel ( ) ; <nl> return currentChannel & & currentChannel - > CanRecord ( ) ; <nl> } <nl> <nl> bool CPVRManager : : IsCurrentlyParentalLocked ( const std : : shared_ptr < CPVRChannel > & <nl> return bReturn ; <nl> } <nl> <nl> - void CPVRManager : : SetPlayingGroup ( const CPVRChannelGroupPtr & group ) <nl> + void CPVRManager : : SetPlayingGroup ( const std : : shared_ptr < CPVRChannelGroup > & group ) <nl> { <nl> if ( m_channelGroups & & group ) <nl> m_channelGroups - > Get ( group - > IsRadio ( ) ) - > SetSelectedGroup ( group ) ; <nl> } <nl> <nl> - void CPVRManager : : SetPlayingGroup ( const CPVRChannelPtr & channel ) <nl> + void CPVRManager : : SetPlayingGroup ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> - CPVRChannelGroupPtr group = m_channelGroups - > GetSelectedGroup ( channel - > IsRadio ( ) ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group = m_channelGroups - > GetSelectedGroup ( channel - > IsRadio ( ) ) ; <nl> if ( ! group | | ! group - > IsGroupMember ( channel ) ) <nl> { <nl> / / The channel we ' ll switch to is not part of the current selected group . <nl> / / Set the first group as the selected group where the channel is a member . <nl> CPVRChannelGroups * channelGroups = m_channelGroups - > Get ( channel - > IsRadio ( ) ) ; <nl> - std : : vector < CPVRChannelGroupPtr > groups = channelGroups - > GetGroupsByChannel ( channel , true ) ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups = channelGroups - > GetGroupsByChannel ( channel , true ) ; <nl> if ( ! groups . empty ( ) ) <nl> channelGroups - > SetSelectedGroup ( groups . front ( ) ) ; <nl> } <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRManager : : GetPlayingGroup ( bool bRadio / * = false * / ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRManager : : GetPlayingGroup ( bool bRadio / * = false * / ) const <nl> { <nl> if ( m_channelGroups ) <nl> return m_channelGroups - > GetSelectedGroup ( bRadio ) ; <nl> <nl> - return CPVRChannelGroupPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannelGroup > ( ) ; <nl> } <nl> <nl> class CPVRManager : : CLastWatchedUpdateTimer : public CTimer , private ITimerCallback <nl> void CPVRManager : : OnPlaybackStarted ( const CFileItemPtr item ) <nl> <nl> if ( item - > HasPVRChannelInfoTag ( ) ) <nl> { <nl> - const CPVRChannelPtr channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> <nl> m_playingChannel = channel ; <nl> m_playingClientId = m_playingChannel - > ClientID ( ) ; <nl> void CPVRManager : : OnPlaybackStarted ( const CFileItemPtr item ) <nl> <nl> if ( m_playingClientId ! = - 1 ) <nl> { <nl> - const CPVRClientPtr client = GetClient ( m_playingClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = GetClient ( m_playingClientId ) ; <nl> if ( client ) <nl> m_strPlayingClientName = client - > GetFriendlyName ( ) ; <nl> } <nl> bool CPVRManager : : CreateChannelEpgs ( void ) <nl> return m_bEpgsCreated ; <nl> } <nl> <nl> - void CPVRManager : : UpdateLastWatched ( const CPVRChannelPtr & channel , const CDateTime & time ) <nl> + void CPVRManager : : UpdateLastWatched ( const std : : shared_ptr < CPVRChannel > & channel , const CDateTime & time ) <nl> { <nl> time_t iTime ; <nl> time . GetAsTime ( iTime ) ; <nl> void CPVRManager : : UpdateLastWatched ( const CPVRChannelPtr & channel , const CDateTi <nl> channel - > SetLastWatched ( iTime ) ; <nl> <nl> / / update last watched timestamp for group <nl> - CPVRChannelGroupPtr group ( GetPlayingGroup ( channel - > IsRadio ( ) ) ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group ( GetPlayingGroup ( channel - > IsRadio ( ) ) ) ; <nl> group - > SetLastWatched ( iTime ) ; <nl> <nl> / * update last played group * / <nl> mmm a / xbmc / pvr / PVRManager . h <nl> ppp b / xbmc / pvr / PVRManager . h <nl> namespace PVR <nl> * @ brief Get the channel groups container . <nl> * @ return The groups container . <nl> * / <nl> - CPVRChannelGroupsContainerPtr ChannelGroups ( void ) const ; <nl> + std : : shared_ptr < CPVRChannelGroupsContainer > ChannelGroups ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the recordings container . <nl> * @ return The recordings container . <nl> * / <nl> - CPVRRecordingsPtr Recordings ( void ) const ; <nl> + std : : shared_ptr < CPVRRecordings > Recordings ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the timers container . <nl> * @ return The timers container . <nl> * / <nl> - CPVRTimersPtr Timers ( void ) const ; <nl> + std : : shared_ptr < CPVRTimers > Timers ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the timers container . <nl> * @ return The timers container . <nl> * / <nl> - CPVRClientsPtr Clients ( void ) const ; <nl> + std : : shared_ptr < CPVRClients > Clients ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the instance of a client that matches the given item . <nl> namespace PVR <nl> * @ brief Get access to the pvr gui actions . <nl> * @ return The gui actions . <nl> * / <nl> - CPVRGUIActionsPtr GUIActions ( void ) const ; <nl> + std : : shared_ptr < CPVRGUIActions > GUIActions ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get access to the epg container . <nl> namespace PVR <nl> * @ brief Get the TV database . <nl> * @ return The TV database . <nl> * / <nl> - CPVRDatabasePtr GetTVDatabase ( void ) const ; <nl> + std : : shared_ptr < CPVRDatabase > GetTVDatabase ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Check if a TV channel , radio channel or recording is playing . <nl> namespace PVR <nl> * @ param channel The channel to check . <nl> * @ return True if it ' s playing , false otherwise . <nl> * / <nl> - bool IsPlayingChannel ( const CPVRChannelPtr & channel ) const ; <nl> + bool IsPlayingChannel ( const std : : shared_ptr < CPVRChannel > & channel ) const ; <nl> <nl> / * ! <nl> * @ brief Check if the given recording is playing . <nl> * @ param recording The recording to check . <nl> * @ return True if it ' s playing , false otherwise . <nl> * / <nl> - bool IsPlayingRecording ( const CPVRRecordingPtr & recording ) const ; <nl> + bool IsPlayingRecording ( const std : : shared_ptr < CPVRRecording > & recording ) const ; <nl> <nl> / * ! <nl> * @ brief Check if the given epg tag is playing . <nl> * @ param epgTag The tag to check . <nl> * @ return True if it ' s playing , false otherwise . <nl> * / <nl> - bool IsPlayingEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> + bool IsPlayingEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> <nl> / * ! <nl> * @ return True while the PVRManager is initialising . <nl> namespace PVR <nl> * @ brief Return the channel that is currently playing . <nl> * @ return The channel or NULL if none is playing . <nl> * / <nl> - CPVRChannelPtr GetPlayingChannel ( void ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetPlayingChannel ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Return the recording that is currently playing . <nl> * @ return The recording or NULL if none is playing . <nl> * / <nl> - CPVRRecordingPtr GetPlayingRecording ( void ) const ; <nl> + std : : shared_ptr < CPVRRecording > GetPlayingRecording ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Return the epg tag that is currently playing . <nl> * @ return The tag or NULL if none is playing . <nl> * / <nl> - CPVREpgInfoTagPtr GetPlayingEpgTag ( void ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetPlayingEpgTag ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the name of the playing client , if there is one . <nl> namespace PVR <nl> * @ brief Set the current playing group , used to load the right channel . <nl> * @ param group The new group . <nl> * / <nl> - void SetPlayingGroup ( const CPVRChannelGroupPtr & group ) ; <nl> + void SetPlayingGroup ( const std : : shared_ptr < CPVRChannelGroup > & group ) ; <nl> <nl> / * ! <nl> * @ brief Get the current playing group , used to load the right channel . <nl> * @ param bRadio True to get the current radio group , false to get the current TV group . <nl> * @ return The current group or the group containing all channels if it ' s not set . <nl> * / <nl> - CPVRChannelGroupPtr GetPlayingGroup ( bool bRadio = false ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetPlayingGroup ( bool bRadio = false ) const ; <nl> <nl> / * ! <nl> * @ brief Let the background thread create epg tags for all channels . <nl> namespace PVR <nl> * @ param channel The channel which is updated <nl> * @ param time The last watched time to set <nl> * / <nl> - void UpdateLastWatched ( const CPVRChannelPtr & channel , const CDateTime & time ) ; <nl> + void UpdateLastWatched ( const std : : shared_ptr < CPVRChannel > & channel , const CDateTime & time ) ; <nl> <nl> / * ! <nl> * @ brief Set the playing group to the first group the channel is in if the given channel is not part of the current playing group <nl> * @ param channel The channel <nl> * / <nl> - void SetPlayingGroup ( const CPVRChannelPtr & channel ) ; <nl> + void SetPlayingGroup ( const std : : shared_ptr < CPVRChannel > & channel ) ; <nl> <nl> / * ! <nl> * @ brief Executes " pvrpowermanagement . setwakeupcmd " <nl> namespace PVR <nl> <nl> / * * @ name containers * / <nl> / / @ { <nl> - CPVRChannelGroupsContainerPtr m_channelGroups ; / * ! < pointer to the channel groups container * / <nl> - CPVRRecordingsPtr m_recordings ; / * ! < pointer to the recordings container * / <nl> - CPVRTimersPtr m_timers ; / * ! < pointer to the timers container * / <nl> - CPVRClientsPtr m_addons ; / * ! < pointer to the pvr addon container * / <nl> + std : : shared_ptr < CPVRChannelGroupsContainer > m_channelGroups ; / * ! < pointer to the channel groups container * / <nl> + std : : shared_ptr < CPVRRecordings > m_recordings ; / * ! < pointer to the recordings container * / <nl> + std : : shared_ptr < CPVRTimers > m_timers ; / * ! < pointer to the timers container * / <nl> + std : : shared_ptr < CPVRClients > m_addons ; / * ! < pointer to the pvr addon container * / <nl> std : : unique_ptr < CPVRGUIInfo > m_guiInfo ; / * ! < pointer to the guiinfo data * / <nl> - CPVRGUIActionsPtr m_guiActions ; / * ! < pointer to the pvr gui actions * / <nl> + std : : shared_ptr < CPVRGUIActions > m_guiActions ; / * ! < pointer to the pvr gui actions * / <nl> CPVREpgContainer m_epgContainer ; / * ! < the epg container * / <nl> / / @ } <nl> <nl> CPVRManagerJobQueue m_pendingUpdates ; / * ! < vector of pending pvr updates * / <nl> <nl> - CPVRDatabasePtr m_database ; / * ! < the database for all PVR related data * / <nl> + std : : shared_ptr < CPVRDatabase > m_database ; / * ! < the database for all PVR related data * / <nl> mutable CCriticalSection m_critSection ; / * ! < critical section for all changes to this class , except for changes to triggers * / <nl> bool m_bFirstStart = true ; / * ! < true when the PVR manager was started first , false otherwise * / <nl> bool m_bEpgsCreated = false ; / * ! < true if epg data for channels has been created * / <nl> namespace PVR <nl> CPVRActionListener m_actionListener ; <nl> CPVRSettings m_settings ; <nl> <nl> - CPVRChannelPtr m_playingChannel ; <nl> - CPVRRecordingPtr m_playingRecording ; <nl> - CPVREpgInfoTagPtr m_playingEpgTag ; <nl> + std : : shared_ptr < CPVRChannel > m_playingChannel ; <nl> + std : : shared_ptr < CPVRRecording > m_playingRecording ; <nl> + std : : shared_ptr < CPVREpgInfoTag > m_playingEpgTag ; <nl> std : : string m_strPlayingClientName ; <nl> int m_playingClientId = - 1 ; <nl> int m_iplayingChannelUniqueID = - 1 ; <nl> mmm a / xbmc / pvr / addons / PVRClients . cpp <nl> ppp b / xbmc / pvr / addons / PVRClients . cpp <nl> void CPVRClients : : UpdateAddons ( const std : : string & changedAddonId / * = " " * / ) <nl> <nl> addons . clear ( ) ; <nl> <nl> - std : : vector < std : : pair < CPVRClientPtr , int > > addonsToCreate ; <nl> + std : : vector < std : : pair < std : : shared_ptr < CPVRClient > , int > > addonsToCreate ; <nl> std : : vector < AddonPtr > addonsToReCreate ; <nl> std : : vector < AddonPtr > addonsToDestroy ; <nl> <nl> void CPVRClients : : UpdateAddons ( const std : : string & changedAddonId / * = " " * / ) <nl> { <nl> int iClientId = ClientIdFromAddonId ( addon - > ID ( ) ) ; <nl> <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> if ( IsKnownClient ( addon ) ) <nl> { <nl> GetClient ( iClientId , client ) ; <nl> bool CPVRClients : : StopClient ( const AddonPtr & addon , bool bRestart ) <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> int iId = GetClientId ( addon - > ID ( ) ) ; <nl> - CPVRClientPtr mappedClient ; <nl> + std : : shared_ptr < CPVRClient > mappedClient ; <nl> if ( GetClient ( iId , mappedClient ) ) <nl> { <nl> if ( bRestart ) <nl> bool CPVRClients : : GetClient ( const std : : string & strId , AddonPtr & addon ) const <nl> return false ; <nl> } <nl> <nl> - bool CPVRClients : : GetClient ( int iClientId , CPVRClientPtr & addon ) const <nl> + bool CPVRClients : : GetClient ( int iClientId , std : : shared_ptr < CPVRClient > & addon ) const <nl> { <nl> bool bReturn = false ; <nl> if ( iClientId < = PVR_INVALID_CLIENT_ID ) <nl> bool CPVRClients : : IsKnownClient ( const AddonPtr & client ) const <nl> <nl> bool CPVRClients : : IsCreatedClient ( int iClientId ) const <nl> { <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> return GetCreatedClient ( iClientId , client ) ; <nl> } <nl> <nl> bool CPVRClients : : IsCreatedClient ( const AddonPtr & addon ) <nl> return false ; <nl> } <nl> <nl> - bool CPVRClients : : GetCreatedClient ( int iClientId , CPVRClientPtr & addon ) const <nl> + bool CPVRClients : : GetCreatedClient ( int iClientId , std : : shared_ptr < CPVRClient > & addon ) const <nl> { <nl> if ( GetClient ( iClientId , addon ) ) <nl> return addon - > ReadyToUse ( ) ; <nl> PVR_ERROR CPVRClients : : GetCreatedClients ( CPVRClientMap & clientsReady , std : : vecto <nl> for ( const auto & addon : addons ) <nl> { <nl> int iClientId = ClientIdFromAddonId ( addon - > ID ( ) ) ; <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> GetClient ( iClientId , client ) ; <nl> <nl> if ( client & & client - > ReadyToUse ( ) & & ! client - > IgnoreClient ( ) ) <nl> std : : vector < SBackend > CPVRClients : : GetBackendProperties ( ) const <nl> { <nl> std : : vector < SBackend > backendProperties ; <nl> <nl> - ForCreatedClients ( __FUNCTION__ , [ & backendProperties ] ( const CPVRClientPtr & client ) { <nl> + ForCreatedClients ( __FUNCTION__ , [ & backendProperties ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> SBackend properties ; <nl> <nl> if ( client - > GetDriveSpace ( properties . diskTotal , properties . diskUsed ) = = PVR_ERROR_NO_ERROR ) <nl> std : : vector < SBackend > CPVRClients : : GetBackendProperties ( ) const <nl> <nl> bool CPVRClients : : GetTimers ( CPVRTimersContainer * timers , std : : vector < int > & failedClients ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ timers ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ timers ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > GetTimers ( timers ) ; <nl> } , failedClients ) = = PVR_ERROR_NO_ERROR ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : GetTimerTypes ( CPVRTimerTypes & results ) const <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ & results ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ & results ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> CPVRTimerTypes types ; <nl> PVR_ERROR ret = client - > GetTimerTypes ( types ) ; <nl> if ( ret = = PVR_ERROR_NO_ERROR ) <nl> PVR_ERROR CPVRClients : : GetTimerTypes ( CPVRTimerTypes & results ) const <nl> <nl> PVR_ERROR CPVRClients : : GetRecordings ( CPVRRecordings * recordings , bool deleted ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ recordings , deleted ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ recordings , deleted ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > GetRecordings ( recordings , deleted ) ; <nl> } ) ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : DeleteAllRecordingsFromTrash ( ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > DeleteAllRecordingsFromTrash ( ) ; <nl> } ) ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : SetEPGTimeFrame ( int iDays ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ iDays ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ iDays ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > SetEPGTimeFrame ( iDays ) ; <nl> } ) ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : GetChannels ( CPVRChannelGroupInternal * group , std : : vector < int > & failedClients ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ group ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ group ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > GetChannels ( * group , group - > IsRadio ( ) ) ; <nl> } , failedClients ) ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : GetChannelGroups ( CPVRChannelGroups * groups , std : : vector < int > & failedClients ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ groups ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ groups ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > GetChannelGroups ( groups ) ; <nl> } , failedClients ) ; <nl> } <nl> <nl> PVR_ERROR CPVRClients : : GetChannelGroupMembers ( CPVRChannelGroup * group , std : : vector < int > & failedClients ) <nl> { <nl> - return ForCreatedClients ( __FUNCTION__ , [ group ] ( const CPVRClientPtr & client ) { <nl> + return ForCreatedClients ( __FUNCTION__ , [ group ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> return client - > GetChannelGroupMembers ( group ) ; <nl> } , failedClients ) ; <nl> } <nl> <nl> - std : : vector < CPVRClientPtr > CPVRClients : : GetClientsSupportingChannelScan ( void ) const <nl> + std : : vector < std : : shared_ptr < CPVRClient > > CPVRClients : : GetClientsSupportingChannelScan ( void ) const <nl> { <nl> - std : : vector < CPVRClientPtr > possibleScanClients ; <nl> - ForCreatedClients ( __FUNCTION__ , [ & possibleScanClients ] ( const CPVRClientPtr & client ) { <nl> + std : : vector < std : : shared_ptr < CPVRClient > > possibleScanClients ; <nl> + ForCreatedClients ( __FUNCTION__ , [ & possibleScanClients ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> if ( client - > GetClientCapabilities ( ) . SupportsChannelScan ( ) ) <nl> possibleScanClients . emplace_back ( client ) ; <nl> return PVR_ERROR_NO_ERROR ; <nl> std : : vector < CPVRClientPtr > CPVRClients : : GetClientsSupportingChannelScan ( void ) co <nl> return possibleScanClients ; <nl> } <nl> <nl> - std : : vector < CPVRClientPtr > CPVRClients : : GetClientsSupportingChannelSettings ( bool bRadio ) const <nl> + std : : vector < std : : shared_ptr < CPVRClient > > CPVRClients : : GetClientsSupportingChannelSettings ( bool bRadio ) const <nl> { <nl> - std : : vector < CPVRClientPtr > possibleSettingsClients ; <nl> - ForCreatedClients ( __FUNCTION__ , [ bRadio , & possibleSettingsClients ] ( const CPVRClientPtr & client ) { <nl> + std : : vector < std : : shared_ptr < CPVRClient > > possibleSettingsClients ; <nl> + ForCreatedClients ( __FUNCTION__ , [ bRadio , & possibleSettingsClients ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> const CPVRClientCapabilities & caps = client - > GetClientCapabilities ( ) ; <nl> if ( caps . SupportsChannelSettings ( ) & & <nl> ( ( bRadio & & caps . SupportsRadio ( ) ) | | ( ! bRadio & & caps . SupportsTV ( ) ) ) ) <nl> std : : vector < CPVRClientPtr > CPVRClients : : GetClientsSupportingChannelSettings ( bool <nl> <nl> void CPVRClients : : OnSystemSleep ( ) <nl> { <nl> - ForCreatedClients ( __FUNCTION__ , [ ] ( const CPVRClientPtr & client ) { <nl> + ForCreatedClients ( __FUNCTION__ , [ ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> client - > OnSystemSleep ( ) ; <nl> return PVR_ERROR_NO_ERROR ; <nl> } ) ; <nl> void CPVRClients : : OnSystemSleep ( ) <nl> <nl> void CPVRClients : : OnSystemWake ( ) <nl> { <nl> - ForCreatedClients ( __FUNCTION__ , [ ] ( const CPVRClientPtr & client ) { <nl> + ForCreatedClients ( __FUNCTION__ , [ ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> client - > OnSystemWake ( ) ; <nl> return PVR_ERROR_NO_ERROR ; <nl> } ) ; <nl> void CPVRClients : : OnSystemWake ( ) <nl> <nl> void CPVRClients : : OnPowerSavingActivated ( ) <nl> { <nl> - ForCreatedClients ( __FUNCTION__ , [ ] ( const CPVRClientPtr & client ) { <nl> + ForCreatedClients ( __FUNCTION__ , [ ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> client - > OnPowerSavingActivated ( ) ; <nl> return PVR_ERROR_NO_ERROR ; <nl> } ) ; <nl> void CPVRClients : : OnPowerSavingActivated ( ) <nl> <nl> void CPVRClients : : OnPowerSavingDeactivated ( ) <nl> { <nl> - ForCreatedClients ( __FUNCTION__ , [ ] ( const CPVRClientPtr & client ) { <nl> + ForCreatedClients ( __FUNCTION__ , [ ] ( const std : : shared_ptr < CPVRClient > & client ) { <nl> client - > OnPowerSavingDeactivated ( ) ; <nl> return PVR_ERROR_NO_ERROR ; <nl> } ) ; <nl> mmm a / xbmc / pvr / addons / PVRClients . h <nl> ppp b / xbmc / pvr / addons / PVRClients . h <nl> <nl> <nl> # include < functional > <nl> # include < map > <nl> + # include < memory > <nl> # include < string > <nl> # include < vector > <nl> <nl> namespace PVR <nl> class CPVRRecordings ; <nl> class CPVRTimersContainer ; <nl> <nl> - typedef std : : map < int , CPVRClientPtr > CPVRClientMap ; <nl> + typedef std : : map < int , std : : shared_ptr < CPVRClient > > CPVRClientMap ; <nl> <nl> / * * <nl> * Holds generic data about a backend ( number of channels etc . ) <nl> namespace PVR <nl> * @ param addon Will be filled with requested client on success , null otherwise . <nl> * @ return True on success , false otherwise . <nl> * / <nl> - bool GetCreatedClient ( int iClientId , CPVRClientPtr & addon ) const ; <nl> + bool GetCreatedClient ( int iClientId , std : : shared_ptr < CPVRClient > & addon ) const ; <nl> <nl> / * ! <nl> * @ brief Get all created clients . <nl> namespace PVR <nl> * @ brief Get a list of clients providing a channel scan dialog . <nl> * @ return All clients supporting channel scan . <nl> * / <nl> - std : : vector < CPVRClientPtr > GetClientsSupportingChannelScan ( void ) const ; <nl> + std : : vector < std : : shared_ptr < CPVRClient > > GetClientsSupportingChannelScan ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get a list of clients providing a channel settings dialog . <nl> * @ return All clients supporting channel settings . <nl> * / <nl> - std : : vector < CPVRClientPtr > GetClientsSupportingChannelSettings ( bool bRadio ) const ; <nl> + std : : vector < std : : shared_ptr < CPVRClient > > GetClientsSupportingChannelSettings ( bool bRadio ) const ; <nl> <nl> / / @ } <nl> <nl> namespace PVR <nl> * @ param addon The client . <nl> * @ return True if the client was found , false otherwise . <nl> * / <nl> - bool GetClient ( int iClientId , CPVRClientPtr & addon ) const ; <nl> + bool GetClient ( int iClientId , std : : shared_ptr < CPVRClient > & addon ) const ; <nl> <nl> / * ! <nl> * @ brief Check whether a client is known . <nl> namespace PVR <nl> * / <nl> PVR_ERROR GetCreatedClients ( CPVRClientMap & clientsReady , std : : vector < int > & clientsNotReady ) const ; <nl> <nl> - typedef std : : function < PVR_ERROR ( const CPVRClientPtr & ) > PVRClientFunction ; <nl> + typedef std : : function < PVR_ERROR ( const std : : shared_ptr < CPVRClient > & ) > PVRClientFunction ; <nl> <nl> / * ! <nl> * @ brief Wraps calls to all created clients in order to do common pre and post function invocation actions . <nl> * @ param strFunctionName The function name , for logging purposes . <nl> - * @ param function The function to wrap . It has to have return type PVR_ERROR and must take a const reference to a CPVRClientPtr as parameter . <nl> + * @ param function The function to wrap . It has to have return type PVR_ERROR and must take a const reference to a std : : shared_ptr < CPVRClient > as parameter . <nl> * @ return PVR_ERROR_NO_ERROR on success , any other PVR_ERROR_ * value otherwise . <nl> * / <nl> PVR_ERROR ForCreatedClients ( const char * strFunctionName , PVRClientFunction function ) const ; <nl> namespace PVR <nl> / * ! <nl> * @ brief Wraps calls to all created clients in order to do common pre and post function invocation actions . <nl> * @ param strFunctionName The function name , for logging purposes . <nl> - * @ param function The function to wrap . It has to have return type PVR_ERROR and must take a const reference to a CPVRClientPtr as parameter . <nl> + * @ param function The function to wrap . It has to have return type PVR_ERROR and must take a const reference to a std : : shared_ptr < CPVRClient > as parameter . <nl> * @ param failedClients Contains a list of the ids of clients for that the call failed , if any . <nl> * @ return PVR_ERROR_NO_ERROR on success , any other PVR_ERROR_ * value otherwise . <nl> * / <nl> mmm a / xbmc / pvr / channels / PVRChannel . cpp <nl> ppp b / xbmc / pvr / channels / PVRChannel . cpp <nl> CPVRChannel : : CPVRChannel ( bool bRadio / * = false * / ) <nl> <nl> CPVRChannel : : CPVRChannel ( const PVR_CHANNEL & channel , unsigned int iClientId ) <nl> : m_bIsRadio ( channel . bIsRadio ) , <nl> - m_bIsHidden ( channel . bIsHidden ) , <nl> - m_strIconPath ( channel . strIconPath ) , <nl> - m_strChannelName ( channel . strChannelName ) , <nl> + m_bIsHidden ( channel . bIsHidden ) , <nl> + m_strIconPath ( channel . strIconPath ) , <nl> + m_strChannelName ( channel . strChannelName ) , <nl> m_bHasArchive ( channel . bHasArchive ) , <nl> - m_bEPGEnabled ( ! channel . bIsHidden ) , <nl> - m_iUniqueId ( channel . iUniqueId ) , <nl> - m_iClientId ( iClientId ) , <nl> - m_clientChannelNumber ( channel . iChannelNumber , channel . iSubChannelNumber ) , <nl> + m_bEPGEnabled ( ! channel . bIsHidden ) , <nl> + m_iUniqueId ( channel . iUniqueId ) , <nl> + m_iClientId ( iClientId ) , <nl> + m_clientChannelNumber ( channel . iChannelNumber , channel . iSubChannelNumber ) , <nl> m_strClientChannelName ( channel . strChannelName ) , <nl> - m_strInputFormat ( channel . strInputFormat ) , <nl> + m_strInputFormat ( channel . strInputFormat ) , <nl> m_iClientEncryptionSystem ( channel . iEncryptionSystem ) <nl> { <nl> if ( m_strChannelName . empty ( ) ) <nl> void CPVRChannel : : Serialize ( CVariant & value ) const <nl> value [ " channelnumber " ] = m_channelNumber . GetChannelNumber ( ) ; <nl> value [ " subchannelnumber " ] = m_channelNumber . GetSubChannelNumber ( ) ; <nl> <nl> - CPVREpgInfoTagPtr epg = GetEPGNow ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > epg = GetEPGNow ( ) ; <nl> if ( epg ) <nl> { <nl> / / add the properties of the current EPG item to the main object <nl> void CPVRChannel : : Serialize ( CVariant & value ) const <nl> bool CPVRChannel : : Delete ( void ) <nl> { <nl> bool bReturn = false ; <nl> - const CPVRDatabasePtr database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> if ( ! database ) <nl> return bReturn ; <nl> <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( epg ) <nl> { <nl> CServiceBroker : : GetPVRManager ( ) . EpgContainer ( ) . DeleteEpg ( epg , true ) ; <nl> bool CPVRChannel : : Delete ( void ) <nl> return bReturn ; <nl> } <nl> <nl> - CPVREpgPtr CPVRChannel : : GetEPG ( void ) const <nl> + std : : shared_ptr < CPVREpg > CPVRChannel : : GetEPG ( void ) const <nl> { <nl> const_cast < CPVRChannel * > ( this ) - > CreateEPG ( ) ; <nl> <nl> bool CPVRChannel : : CreateEPG ( ) <nl> return false ; <nl> } <nl> <nl> - bool CPVRChannel : : UpdateFromClient ( const CPVRChannelPtr & channel ) <nl> + bool CPVRChannel : : UpdateFromClient ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> SetClientID ( channel - > ClientID ( ) ) ; <nl> <nl> bool CPVRChannel : : Persist ( ) <nl> return true ; <nl> } <nl> <nl> - const CPVRDatabasePtr database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> if ( database ) <nl> { <nl> bool bReturn = database - > Persist ( * this , true ) ; <nl> bool CPVRChannel : : SetLastWatched ( time_t iLastWatched ) <nl> } <nl> } <nl> <nl> - const CPVRDatabasePtr database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database = CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ; <nl> if ( database ) <nl> return database - > UpdateLastWatched ( * this ) ; <nl> <nl> bool CPVRChannel : : SetClientID ( int iClientId ) <nl> <nl> void CPVRChannel : : UpdatePath ( const std : : string & channelGroup ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> void CPVRChannel : : UpdateEncryptionName ( void ) <nl> <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVRChannel : : GetEpgTags ( ) const <nl> { <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( ! epg ) <nl> { <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " Cannot get EPG for channel ' % s ' " , m_strChannelName . c_str ( ) ) ; <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVRChannel : : GetEpgTags ( ) const <nl> <nl> bool CPVRChannel : : ClearEPG ( ) const <nl> { <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( epg ) <nl> epg - > Clear ( ) ; <nl> <nl> return true ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRChannel : : GetEPGNow ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRChannel : : GetEPGNow ( ) const <nl> { <nl> - CPVREpgInfoTagPtr tag ; <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( epg ) <nl> tag = epg - > GetTagNow ( ) ; <nl> <nl> return tag ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRChannel : : GetEPGNext ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRChannel : : GetEPGNext ( ) const <nl> { <nl> - CPVREpgInfoTagPtr tag ; <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( epg ) <nl> tag = epg - > GetTagNext ( ) ; <nl> <nl> return tag ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRChannel : : GetEPGPrevious ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRChannel : : GetEPGPrevious ( ) const <nl> { <nl> - CPVREpgInfoTagPtr tag ; <nl> - const CPVREpgPtr epg = GetEPG ( ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> + const std : : shared_ptr < CPVREpg > epg = GetEPG ( ) ; <nl> if ( epg ) <nl> tag = epg - > GetTagPrevious ( ) ; <nl> <nl> std : : string CPVRChannel : : EPGScraper ( void ) const <nl> <nl> bool CPVRChannel : : CanRecord ( void ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> return client & & client - > GetClientCapabilities ( ) . SupportsRecordings ( ) ; <nl> } <nl> <nl> mmm a / xbmc / pvr / channels / PVRChannel . h <nl> ppp b / xbmc / pvr / channels / PVRChannel . h <nl> namespace PVR <nl> * @ param channel The new channel data . <nl> * @ return True if something changed , false otherwise . <nl> * / <nl> - bool UpdateFromClient ( const CPVRChannelPtr & channel ) ; <nl> + bool UpdateFromClient ( const std : : shared_ptr < CPVRChannel > & channel ) ; <nl> <nl> / * ! <nl> * @ brief Persists the changes in the database . <nl> namespace PVR <nl> * @ brief Get the EPG table for this channel . <nl> * @ return The EPG for this channel . <nl> * / <nl> - CPVREpgPtr GetEPG ( void ) const ; <nl> + std : : shared_ptr < CPVREpg > GetEPG ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the EPG tags for this channel . <nl> namespace PVR <nl> * <nl> * @ return The EPG tag that is now active . <nl> * / <nl> - CPVREpgInfoTagPtr GetEPGNow ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetEPGNow ( ) const ; <nl> <nl> / * ! <nl> * @ brief Get the EPG tag that was previously active on this channel . <nl> namespace PVR <nl> * <nl> * @ return The EPG tag that was previously activ . <nl> * / <nl> - CPVREpgInfoTagPtr GetEPGPrevious ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetEPGPrevious ( ) const ; <nl> <nl> / * ! <nl> * @ brief Get the EPG tag that will be next active on this channel . <nl> namespace PVR <nl> * <nl> * @ return The EPG tag that will be next active . <nl> * / <nl> - CPVREpgInfoTagPtr GetEPGNext ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetEPGNext ( ) const ; <nl> <nl> / * ! <nl> * @ return Don ' t use an EPG for this channel if set to false . <nl> mmm a / xbmc / pvr / channels / PVRChannelGroup . cpp <nl> ppp b / xbmc / pvr / channels / PVRChannelGroup . cpp <nl> void CPVRChannelGroup : : SetPath ( const CPVRChannelsPath & path ) <nl> } <nl> } <nl> <nl> - bool CPVRChannelGroup : : SetChannelNumber ( const CPVRChannelPtr & channel , const CPVRChannelNumber & channelNumber ) <nl> + bool CPVRChannelGroup : : SetChannelNumber ( const std : : shared_ptr < CPVRChannel > & channel , const CPVRChannelNumber & channelNumber ) <nl> { <nl> bool bReturn ( false ) ; <nl> CSingleLock lock ( m_critSection ) ; <nl> void CPVRChannelGroup : : SortByChannelNumber ( void ) <nl> <nl> bool CPVRChannelGroup : : UpdateClientPriorities ( ) <nl> { <nl> - const CPVRClientsPtr clients = CServiceBroker : : GetPVRManager ( ) . Clients ( ) ; <nl> + const std : : shared_ptr < CPVRClients > clients = CServiceBroker : : GetPVRManager ( ) . Clients ( ) ; <nl> bool bChanged = false ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> bool CPVRChannelGroup : : UpdateClientPriorities ( ) <nl> <nl> if ( m_bUsingBackendChannelOrder ) <nl> { <nl> - CPVRClientPtr client ; <nl> + std : : shared_ptr < CPVRClient > client ; <nl> if ( ! clients - > GetCreatedClient ( member . channel - > ClientID ( ) , client ) ) <nl> continue ; <nl> <nl> const PVRChannelGroupMember & CPVRChannelGroup : : GetByUniqueID ( const std : : pair < int <nl> return it ! = m_members . end ( ) ? it - > second : CPVRChannelGroup : : EmptyMember ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroup : : GetByUniqueID ( int iUniqueChannelId , int iClientID ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroup : : GetByUniqueID ( int iUniqueChannelId , int iClientID ) const <nl> { <nl> return GetByUniqueID ( std : : make_pair ( iClientID , iUniqueChannelId ) ) . channel ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroup : : GetByChannelID ( int iChannelID ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroup : : GetByChannelID ( int iChannelID ) const <nl> { <nl> - CPVRChannelPtr retval ; <nl> + std : : shared_ptr < CPVRChannel > retval ; <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> for ( PVR_CHANNEL_GROUP_MEMBERS : : const_iterator it = m_members . begin ( ) ; ! retval & & it ! = m_members . end ( ) ; + + it ) <nl> CPVRChannelPtr CPVRChannelGroup : : GetByChannelID ( int iChannelID ) const <nl> return retval ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroup : : GetByChannelEpgID ( int iEpgID ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroup : : GetByChannelEpgID ( int iEpgID ) const <nl> { <nl> - CPVRChannelPtr retval ; <nl> + std : : shared_ptr < CPVRChannel > retval ; <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> for ( PVR_CHANNEL_GROUP_MEMBERS : : const_iterator it = m_members . begin ( ) ; ! retval & & it ! = m_members . end ( ) ; + + it ) <nl> std : : shared_ptr < CPVRChannel > CPVRChannelGroup : : GetLastPlayedChannel ( int iCurrent <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> - CPVRChannelPtr returnChannel , channel ; <nl> + std : : shared_ptr < CPVRChannel > returnChannel , channel ; <nl> for ( PVR_CHANNEL_GROUP_MEMBERS : : const_iterator it = m_members . begin ( ) ; it ! = m_members . end ( ) ; + + it ) <nl> { <nl> channel = it - > second . channel ; <nl> void CPVRChannelGroup : : GetChannelNumbers ( std : : vector < std : : string > & channelNumber <nl> <nl> int CPVRChannelGroup : : LoadFromDb ( bool bCompress / * = false * / ) <nl> { <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> if ( ! database ) <nl> return - 1 ; <nl> <nl> void CPVRChannelGroup : : UpdateChannelNumbers ( ) <nl> } <nl> } <nl> <nl> - std : : vector < CPVRChannelPtr > CPVRChannelGroup : : RemoveDeletedChannels ( const CPVRChannelGroup & channels ) <nl> + std : : vector < std : : shared_ptr < CPVRChannel > > CPVRChannelGroup : : RemoveDeletedChannels ( const CPVRChannelGroup & channels ) <nl> { <nl> - std : : vector < CPVRChannelPtr > removedChannels ; <nl> + std : : vector < std : : shared_ptr < CPVRChannel > > removedChannels ; <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> / * check for deleted channels * / <nl> for ( PVR_CHANNEL_GROUP_SORTED_MEMBERS : : iterator it = m_sortedMembers . begin ( ) ; it ! = m_sortedMembers . end ( ) ; ) <nl> { <nl> - const CPVRChannelPtr channel = ( * it ) . channel ; <nl> + const std : : shared_ptr < CPVRChannel > channel = ( * it ) . channel ; <nl> if ( channels . m_members . find ( channel - > StorageId ( ) ) = = channels . m_members . end ( ) ) <nl> { <nl> / * channel was not found * / <nl> bool CPVRChannelGroup : : UpdateGroupEntries ( const CPVRChannelGroup & channels , std : <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRChannelGroup : : RemoveFromGroup ( const CPVRChannelPtr & channel ) <nl> + bool CPVRChannelGroup : : RemoveFromGroup ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> bool bReturn ( false ) ; <nl> CSingleLock lock ( m_critSection ) ; <nl> bool CPVRChannelGroup : : AddToGroup ( const std : : shared_ptr < CPVRChannel > & channel , c <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRChannelGroup : : IsGroupMember ( const CPVRChannelPtr & channel ) const <nl> + bool CPVRChannelGroup : : IsGroupMember ( const std : : shared_ptr < CPVRChannel > & channel ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_members . find ( channel - > StorageId ( ) ) ! = m_members . end ( ) ; <nl> bool CPVRChannelGroup : : IsGroupMember ( int iChannelId ) const <nl> bool CPVRChannelGroup : : Persist ( void ) <nl> { <nl> bool bReturn ( true ) ; <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVRChannelGroup : : GetEPGAll ( bool bI <nl> { <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > tags ; <nl> <nl> - CPVREpgInfoTagPtr epgTag ; <nl> - CPVRChannelPtr channel ; <nl> + std : : shared_ptr < CPVREpgInfoTag > epgTag ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> for ( PVR_CHANNEL_GROUP_SORTED_MEMBERS : : const_iterator it = m_sortedMembers . begin ( ) ; it ! = m_sortedMembers . end ( ) ; + + it ) <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVRChannelGroup : : GetEPGAll ( bool bI <nl> { <nl> bool bEmpty = true ; <nl> <nl> - CPVREpgPtr epg = channel - > GetEPG ( ) ; <nl> + std : : shared_ptr < CPVREpg > epg = channel - > GetEPG ( ) ; <nl> if ( epg ) <nl> { <nl> const std : : vector < std : : shared_ptr < CPVREpgInfoTag > > epgTags = epg - > GetTags ( ) ; <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVRChannelGroup : : GetEPGAll ( bool bI <nl> CDateTime CPVRChannelGroup : : GetEPGDate ( EpgDateType epgDateType ) const <nl> { <nl> CDateTime date ; <nl> - CPVREpgPtr epg ; <nl> - CPVRChannelPtr channel ; <nl> + std : : shared_ptr < CPVREpg > epg ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> for ( PVR_CHANNEL_GROUP_MEMBERS : : const_iterator it = m_members . begin ( ) ; it ! = m_members . end ( ) ; + + it ) <nl> time_t CPVRChannelGroup : : LastWatched ( void ) const <nl> <nl> bool CPVRChannelGroup : : SetLastWatched ( time_t iLastWatched ) <nl> { <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> mmm a / xbmc / pvr / channels / PVRChannelGroup . h <nl> ppp b / xbmc / pvr / channels / PVRChannelGroup . h <nl> namespace PVR <nl> , iClientPriority ( _iClientPriority ) <nl> , iOrder ( _iOrder ) { } <nl> <nl> - CPVRChannelPtr channel ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> CPVRChannelNumber channelNumber ; / / the channel number this channel has in the group <nl> CPVRChannelNumber clientChannelNumber ; / / the client channel number this channel has in the group <nl> int iClientPriority = 0 ; <nl> namespace PVR <nl> * @ param channel The channel to change the channel number for . <nl> * @ param channelNumber The new channel number . <nl> * / <nl> - bool SetChannelNumber ( const CPVRChannelPtr & channel , const CPVRChannelNumber & channelNumber ) ; <nl> + bool SetChannelNumber ( const std : : shared_ptr < CPVRChannel > & channel , const CPVRChannelNumber & channelNumber ) ; <nl> <nl> / * ! <nl> * @ brief Remove a channel from this container . <nl> * @ param channel The channel to remove . <nl> * @ return True if the channel was found and removed , false otherwise . <nl> * / <nl> - virtual bool RemoveFromGroup ( const CPVRChannelPtr & channel ) ; <nl> + virtual bool RemoveFromGroup ( const std : : shared_ptr < CPVRChannel > & channel ) ; <nl> <nl> / * ! <nl> * @ brief Add a channel to this container . <nl> namespace PVR <nl> * @ param channel The channel to find . <nl> * @ return True if the channel was found , false otherwise . <nl> * / <nl> - virtual bool IsGroupMember ( const CPVRChannelPtr & channel ) const ; <nl> + virtual bool IsGroupMember ( const std : : shared_ptr < CPVRChannel > & channel ) const ; <nl> <nl> / * ! <nl> * @ brief Check whether a channel is in this container . <nl> namespace PVR <nl> * @ param iEpgID The channel EPG ID . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetByChannelEpgID ( int iEpgID ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetByChannelEpgID ( int iEpgID ) const ; <nl> <nl> / * ! <nl> * @ brief Get the channel that was played last . <nl> namespace PVR <nl> * @ param channel The channel to get the channel number for . <nl> * @ return The channel number in this group . <nl> * / <nl> - CPVRChannelNumber GetChannelNumber ( const CPVRChannelPtr & channel ) const ; <nl> + CPVRChannelNumber GetChannelNumber ( const std : : shared_ptr < CPVRChannel > & channel ) const ; <nl> <nl> / * ! <nl> * @ brief Get the client channel number in this group of the given channel . <nl> namespace PVR <nl> * @ param iChannelID The channel ID . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetByChannelID ( int iChannelID ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetByChannelID ( int iChannelID ) const ; <nl> <nl> enum class Include <nl> { <nl> namespace PVR <nl> * @ param iClientID The ID of the client . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetByUniqueID ( int iUniqueChannelId , int iClientID ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetByUniqueID ( int iUniqueChannelId , int iClientID ) const ; <nl> <nl> / * ! <nl> * @ brief Get a channel group member given its storage id . <nl> namespace PVR <nl> * @ param channels The new channels to use for this group . <nl> * @ return The removed channels . <nl> * / <nl> - virtual std : : vector < CPVRChannelPtr > RemoveDeletedChannels ( const CPVRChannelGroup & channels ) ; <nl> + virtual std : : vector < std : : shared_ptr < CPVRChannel > > RemoveDeletedChannels ( const CPVRChannelGroup & channels ) ; <nl> <nl> / * ! <nl> * @ brief Clear this channel list . <nl> mmm a / xbmc / pvr / channels / PVRChannelGroupInternal . cpp <nl> ppp b / xbmc / pvr / channels / PVRChannelGroupInternal . cpp <nl> bool CPVRChannelGroupInternal : : AddToGroup ( const std : : shared_ptr < CPVRChannel > & ch <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRChannelGroupInternal : : RemoveFromGroup ( const CPVRChannelPtr & channel ) <nl> + bool CPVRChannelGroupInternal : : RemoveFromGroup ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> if ( ! IsGroupMember ( channel ) ) <nl> return false ; <nl> <nl> / * check if this channel is currently playing if we are hiding it * / <nl> - CPVRChannelPtr currentChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> + std : : shared_ptr < CPVRChannel > currentChannel ( CServiceBroker : : GetPVRManager ( ) . GetPlayingChannel ( ) ) ; <nl> if ( currentChannel & & currentChannel = = channel ) <nl> { <nl> HELPERS : : ShowOKDialogText ( CVariant { 19098 } , CVariant { 19102 } ) ; <nl> bool CPVRChannelGroupInternal : : RemoveFromGroup ( const CPVRChannelPtr & channel ) <nl> <nl> int CPVRChannelGroupInternal : : LoadFromDb ( bool bCompress / * = false * / ) <nl> { <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> if ( ! database ) <nl> return - 1 ; <nl> <nl> bool CPVRChannelGroupInternal : : LoadFromClients ( void ) <nl> return CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetChannels ( this , m_failedClientsForChannels ) = = PVR_ERROR_NO_ERROR ; <nl> } <nl> <nl> - bool CPVRChannelGroupInternal : : IsGroupMember ( const CPVRChannelPtr & channel ) const <nl> + bool CPVRChannelGroupInternal : : IsGroupMember ( const std : : shared_ptr < CPVRChannel > & channel ) const <nl> { <nl> return ! channel - > IsHidden ( ) ; <nl> } <nl> bool CPVRChannelGroupInternal : : AddAndUpdateChannels ( const CPVRChannelGroup & chan <nl> return bReturn ; <nl> } <nl> <nl> - std : : vector < CPVRChannelPtr > CPVRChannelGroupInternal : : RemoveDeletedChannels ( const CPVRChannelGroup & channels ) <nl> + std : : vector < std : : shared_ptr < CPVRChannel > > CPVRChannelGroupInternal : : RemoveDeletedChannels ( const CPVRChannelGroup & channels ) <nl> { <nl> - std : : vector < CPVRChannelPtr > removedChannels = CPVRChannelGroup : : RemoveDeletedChannels ( channels ) ; <nl> + std : : vector < std : : shared_ptr < CPVRChannel > > removedChannels = CPVRChannelGroup : : RemoveDeletedChannels ( channels ) ; <nl> <nl> if ( ! removedChannels . empty ( ) ) <nl> { <nl> mmm a / xbmc / pvr / channels / PVRChannelGroupInternal . h <nl> ppp b / xbmc / pvr / channels / PVRChannelGroupInternal . h <nl> namespace PVR <nl> / * ! <nl> * @ see CPVRChannelGroup : : IsGroupMember <nl> * / <nl> - bool IsGroupMember ( const CPVRChannelPtr & channel ) const override ; <nl> + bool IsGroupMember ( const std : : shared_ptr < CPVRChannel > & channel ) const override ; <nl> <nl> / * ! <nl> * @ see CPVRChannelGroup : : AddToGroup <nl> namespace PVR <nl> / * ! <nl> * @ see CPVRChannelGroup : : RemoveFromGroup <nl> * / <nl> - bool RemoveFromGroup ( const CPVRChannelPtr & channel ) override ; <nl> + bool RemoveFromGroup ( const std : : shared_ptr < CPVRChannel > & channel ) override ; <nl> <nl> / * ! <nl> * @ brief Check whether the group name is still correct after the language setting changed . <nl> namespace PVR <nl> * @ param channels The new channels to use for this group . <nl> * @ return The removed channels . <nl> * / <nl> - std : : vector < CPVRChannelPtr > RemoveDeletedChannels ( const CPVRChannelGroup & channels ) override ; <nl> + std : : vector < std : : shared_ptr < CPVRChannel > > RemoveDeletedChannels ( const CPVRChannelGroup & channels ) override ; <nl> <nl> / * ! <nl> * @ brief Refresh the channel list from the clients . <nl> mmm a / xbmc / pvr / channels / PVRChannelGroups . cpp <nl> ppp b / xbmc / pvr / channels / PVRChannelGroups . cpp <nl> bool CPVRChannelGroups : : Update ( const CPVRChannelGroup & group , bool bUpdateFromCl <nl> if ( group . GroupName ( ) . empty ( ) & & group . GroupID ( ) < = 0 ) <nl> return true ; <nl> <nl> - CPVRChannelGroupPtr updateGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > updateGroup ; <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> void CPVRChannelGroups : : SortGroups ( ) <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> / / check if one of the group holds a valid sort position <nl> - std : : vector < CPVRChannelGroupPtr > : : iterator it = std : : find_if ( m_groups . begin ( ) , m_groups . end ( ) , [ ] ( const CPVRChannelGroupPtr & group ) { <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = std : : find_if ( m_groups . begin ( ) , m_groups . end ( ) , [ ] ( const std : : shared_ptr < CPVRChannelGroup > & group ) { <nl> return ( group - > GetPosition ( ) > 0 ) ; <nl> } ) ; <nl> <nl> / / sort by position if we found a valid sort position <nl> if ( it ! = m_groups . end ( ) ) <nl> { <nl> - std : : sort ( m_groups . begin ( ) , m_groups . end ( ) , [ ] ( const CPVRChannelGroupPtr & group1 , const CPVRChannelGroupPtr & group2 ) { <nl> + std : : sort ( m_groups . begin ( ) , m_groups . end ( ) , [ ] ( const std : : shared_ptr < CPVRChannelGroup > & group1 , const std : : shared_ptr < CPVRChannelGroup > & group2 ) { <nl> return group1 - > GetPosition ( ) < group2 - > GetPosition ( ) ; <nl> } ) ; <nl> } <nl> std : : shared_ptr < CPVRChannel > CPVRChannelGroups : : GetByPath ( const CPVRChannelsPath <nl> return { } ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetById ( int iGroupId ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetById ( int iGroupId ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> if ( ( * it ) - > GroupID ( ) = = iGroupId ) <nl> return * it ; <nl> } <nl> <nl> - CPVRChannelGroupPtr empty ; <nl> + std : : shared_ptr < CPVRChannelGroup > empty ; <nl> return empty ; <nl> } <nl> <nl> - std : : vector < CPVRChannelGroupPtr > CPVRChannelGroups : : GetGroupsByChannel ( const CPVRChannelPtr & channel , bool bExcludeHidden / * = false * / ) const <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > CPVRChannelGroups : : GetGroupsByChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bExcludeHidden / * = false * / ) const <nl> { <nl> - std : : vector < CPVRChannelGroupPtr > groups ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( CPVRChannelGroupPtr group : m_groups ) <nl> + for ( std : : shared_ptr < CPVRChannelGroup > group : m_groups ) <nl> { <nl> if ( ( ! bExcludeHidden | | ! group - > IsHidden ( ) ) & & group - > IsGroupMember ( channel ) ) <nl> groups . push_back ( group ) ; <nl> std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetGroupByPath ( const std : : s <nl> return { } ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetByName ( const std : : string & strName ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetByName ( const std : : string & strName ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> if ( ( * it ) - > GroupName ( ) = = strName ) <nl> return * it ; <nl> } <nl> <nl> - CPVRChannelGroupPtr empty ; <nl> + std : : shared_ptr < CPVRChannelGroup > empty ; <nl> return empty ; <nl> } <nl> <nl> void CPVRChannelGroups : : RemoveFromAllGroups ( const std : : vector < std : : shared_ptr < CP <nl> } <nl> } <nl> <nl> - void CPVRChannelGroups : : RemoveFromAllGroups ( const CPVRChannelPtr & channel ) <nl> + void CPVRChannelGroups : : RemoveFromAllGroups ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - const CPVRChannelGroupPtr allGroup = GetGroupAll ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > allGroup = GetGroupAll ( ) ; <nl> <nl> for ( const auto & group : m_groups ) <nl> { <nl> bool CPVRChannelGroups : : Update ( bool bChannelsOnly / * = false * / ) <nl> GetGroupsFromClients ( ) ; <nl> <nl> / / sync channels in groups <nl> - std : : vector < CPVRChannelGroupPtr > groups ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups ; <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> groups = m_groups ; <nl> bool CPVRChannelGroups : : LoadUserDefinedChannelGroups ( void ) <nl> else <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " ' sync channelgroups ' is disabled ; skipping groups from clients " ) ; <nl> <nl> - std : : vector < CPVRChannelGroupPtr > emptyGroups ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > emptyGroups ; <nl> <nl> / / load group members <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> / / load only user defined groups , as internal group is already loaded <nl> if ( ! ( * it ) - > IsInternalGroup ( ) ) <nl> bool CPVRChannelGroups : : LoadUserDefinedChannelGroups ( void ) <nl> } <nl> } <nl> <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : iterator it = emptyGroups . begin ( ) ; it ! = emptyGroups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = emptyGroups . begin ( ) ; it ! = emptyGroups . end ( ) ; + + it ) <nl> { <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " Deleting empty channel group ' % s ' " , ( * it ) - > GroupName ( ) . c_str ( ) ) ; <nl> DeleteGroup ( * ( * it ) ) ; <nl> bool CPVRChannelGroups : : LoadUserDefinedChannelGroups ( void ) <nl> <nl> bool CPVRChannelGroups : : Load ( void ) <nl> { <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> if ( ! database ) <nl> return false ; <nl> <nl> bool CPVRChannelGroups : : Load ( void ) <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " Loading all % s channel groups " , m_bRadio ? " radio " : " TV " ) ; <nl> <nl> / / create the internal channel group <nl> - CPVRChannelGroupPtr internalGroup = CPVRChannelGroupPtr ( new CPVRChannelGroupInternal ( m_bRadio ) ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > internalGroup = std : : shared_ptr < CPVRChannelGroup > ( new CPVRChannelGroupInternal ( m_bRadio ) ) ; <nl> m_groups . push_back ( internalGroup ) ; <nl> <nl> / / load groups from the database <nl> bool CPVRChannelGroups : : Load ( void ) <nl> } <nl> <nl> / / set the last played group as selected group at startup <nl> - CPVRChannelGroupPtr lastPlayedGroup = GetLastPlayedGroup ( ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > lastPlayedGroup = GetLastPlayedGroup ( ) ; <nl> SetSelectedGroup ( lastPlayedGroup ? lastPlayedGroup : internalGroup ) ; <nl> <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " % d % s channel groups loaded " , m_groups . size ( ) , m_bRadio ? " radio " : " TV " ) ; <nl> bool CPVRChannelGroups : : PersistAll ( void ) <nl> CLog : : LogFC ( LOGDEBUG , LOGPVR , " Persisting all channel group changes " ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> bReturn & = ( * it ) - > Persist ( ) ; <nl> <nl> return bReturn ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetGroupAll ( void ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetGroupAll ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( ! m_groups . empty ( ) ) <nl> return m_groups . front ( ) ; <nl> <nl> - return CPVRChannelGroupPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannelGroup > ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetLastGroup ( void ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetLastGroup ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( ! m_groups . empty ( ) ) <nl> return m_groups . back ( ) ; <nl> <nl> - return CPVRChannelGroupPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannelGroup > ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetLastPlayedGroup ( int iChannelID / * = - 1 * / ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetLastPlayedGroup ( int iChannelID / * = - 1 * / ) const <nl> { <nl> - CPVRChannelGroupPtr group ; <nl> + std : : shared_ptr < CPVRChannelGroup > group ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> if ( ( * it ) - > LastWatched ( ) > 0 & & ( ! group | | ( * it ) - > LastWatched ( ) > group - > LastWatched ( ) ) & & <nl> ( iChannelID = = - 1 | | ( iChannelID > = 0 & & ( * it ) - > IsGroupMember ( iChannelID ) ) ) & & ! ( * it ) - > IsHidden ( ) ) <nl> CPVRChannelGroupPtr CPVRChannelGroups : : GetLastPlayedGroup ( int iChannelID / * = - 1 <nl> return group ; <nl> } <nl> <nl> - std : : vector < CPVRChannelGroupPtr > CPVRChannelGroups : : GetMembers ( bool bExcludeHidden / * = false * / ) const <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > CPVRChannelGroups : : GetMembers ( bool bExcludeHidden / * = false * / ) const <nl> { <nl> - std : : vector < CPVRChannelGroupPtr > groups ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( CPVRChannelGroupPtr group : m_groups ) <nl> + for ( std : : shared_ptr < CPVRChannelGroup > group : m_groups ) <nl> { <nl> if ( ! bExcludeHidden | | ! group - > IsHidden ( ) ) <nl> groups . push_back ( group ) ; <nl> std : : vector < CPVRChannelGroupPtr > CPVRChannelGroups : : GetMembers ( bool bExcludeHidd <nl> return groups ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetPreviousGroup ( const CPVRChannelGroup & group ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetPreviousGroup ( const CPVRChannelGroup & group ) const <nl> { <nl> bool bReturnNext ( false ) ; <nl> <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_reverse_iterator it = m_groups . rbegin ( ) ; it ! = m_groups . rend ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_reverse_iterator it = m_groups . rbegin ( ) ; it ! = m_groups . rend ( ) ; + + it ) <nl> { <nl> / / return this entry <nl> if ( bReturnNext & & ! ( * it ) - > IsHidden ( ) ) <nl> CPVRChannelGroupPtr CPVRChannelGroups : : GetPreviousGroup ( const CPVRChannelGroup & <nl> } <nl> <nl> / / no match return last visible group <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_reverse_iterator it = m_groups . rbegin ( ) ; it ! = m_groups . rend ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_reverse_iterator it = m_groups . rbegin ( ) ; it ! = m_groups . rend ( ) ; + + it ) <nl> { <nl> if ( ! ( * it ) - > IsHidden ( ) ) <nl> return * it ; <nl> CPVRChannelGroupPtr CPVRChannelGroups : : GetPreviousGroup ( const CPVRChannelGroup & <nl> return GetLastGroup ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetNextGroup ( const CPVRChannelGroup & group ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetNextGroup ( const CPVRChannelGroup & group ) const <nl> { <nl> bool bReturnNext ( false ) ; <nl> <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> / / return this entry <nl> if ( bReturnNext & & ! ( * it ) - > IsHidden ( ) ) <nl> CPVRChannelGroupPtr CPVRChannelGroups : : GetNextGroup ( const CPVRChannelGroup & grou <nl> } <nl> <nl> / / no match return first visible group <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> if ( ! ( * it ) - > IsHidden ( ) ) <nl> return * it ; <nl> CPVRChannelGroupPtr CPVRChannelGroups : : GetNextGroup ( const CPVRChannelGroup & grou <nl> return GetFirstGroup ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroups : : GetSelectedGroup ( void ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroups : : GetSelectedGroup ( void ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_selectedGroup ; <nl> void CPVRChannelGroups : : SetSelectedGroup ( const std : : shared_ptr < CPVRChannelGroup > <nl> bool CPVRChannelGroups : : AddGroup ( const std : : string & strName ) <nl> { <nl> bool bPersist ( false ) ; <nl> - CPVRChannelGroupPtr group ; <nl> + std : : shared_ptr < CPVRChannelGroup > group ; <nl> <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> bool CPVRChannelGroups : : DeleteGroup ( const CPVRChannelGroup & group ) <nl> } <nl> <nl> bool bFound ( false ) ; <nl> - CPVRChannelGroupPtr playingGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > playingGroup ; <nl> <nl> / / delete the group in this container <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : iterator it = m_groups . begin ( ) ; ! bFound & & it ! = m_groups . end ( ) ; ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = m_groups . begin ( ) ; ! bFound & & it ! = m_groups . end ( ) ; ) <nl> { <nl> if ( * ( * it ) = = group | | ( group . GroupID ( ) > 0 & & ( * it ) - > GroupID ( ) = = group . GroupID ( ) ) ) <nl> { <nl> / / update the selected group in the gui if it ' s deleted <nl> - CPVRChannelGroupPtr selectedGroup = GetSelectedGroup ( ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > selectedGroup = GetSelectedGroup ( ) ; <nl> if ( selectedGroup & & * selectedGroup = = group ) <nl> playingGroup = GetGroupAll ( ) ; <nl> <nl> bool CPVRChannelGroups : : DeleteGroup ( const CPVRChannelGroup & group ) <nl> if ( group . GroupID ( ) > 0 ) <nl> { <nl> / / delete the group from the database <nl> - const CPVRDatabasePtr database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> + const std : : shared_ptr < CPVRDatabase > database ( CServiceBroker : : GetPVRManager ( ) . GetTVDatabase ( ) ) ; <nl> return database ? database - > Delete ( group ) : false ; <nl> } <nl> return bFound ; <nl> bool CPVRChannelGroups : : CreateChannelEpgs ( void ) <nl> bool bReturn ( false ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : iterator it = m_groups . begin ( ) ; it ! = m_groups . end ( ) ; + + it ) <nl> { <nl> / * Only create EPGs for the internal groups * / <nl> if ( ( * it ) - > IsInternalGroup ( ) ) <nl> mmm a / xbmc / pvr / channels / PVRChannelGroups . h <nl> ppp b / xbmc / pvr / channels / PVRChannelGroups . h <nl> namespace PVR <nl> * @ param iGroupId The ID of the group . <nl> * @ return The group or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelGroupPtr GetById ( int iGroupId ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetById ( int iGroupId ) const ; <nl> <nl> / * ! <nl> * @ brief Get all groups the given channel is a member . <nl> namespace PVR <nl> * @ param bExcludeHidden Whenever to exclude hidden channel groups . <nl> * @ return A list of groups the channel is a member . <nl> * / <nl> - std : : vector < CPVRChannelGroupPtr > GetGroupsByChannel ( const CPVRChannelPtr & channel , bool bExcludeHidden = false ) const ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > GetGroupsByChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bExcludeHidden = false ) const ; <nl> <nl> / * ! <nl> * @ brief Get a channel group given its path <nl> namespace PVR <nl> * @ param strName The name . <nl> * @ return The group or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelGroupPtr GetByName ( const std : : string & strName ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetByName ( const std : : string & strName ) const ; <nl> <nl> / * ! <nl> * @ brief Get the group that contains all channels . <nl> * @ return The group that contains all channels . <nl> * / <nl> - CPVRChannelGroupPtr GetGroupAll ( void ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetGroupAll ( void ) const ; <nl> <nl> / * ! <nl> * @ return The first group in this container , which always is the group with all channels . <nl> * / <nl> - CPVRChannelGroupPtr GetFirstGroup ( void ) const { return GetGroupAll ( ) ; } <nl> + std : : shared_ptr < CPVRChannelGroup > GetFirstGroup ( void ) const { return GetGroupAll ( ) ; } <nl> <nl> / * ! <nl> * @ return The last group in this container . <nl> * / <nl> - CPVRChannelGroupPtr GetLastGroup ( void ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetLastGroup ( void ) const ; <nl> <nl> / * ! <nl> * @ brief The group that was played last and optionally contains the given channel . <nl> * @ param iChannelID The channel ID <nl> * @ return The last watched group . <nl> * / <nl> - CPVRChannelGroupPtr GetLastPlayedGroup ( int iChannelID = - 1 ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetLastPlayedGroup ( int iChannelID = - 1 ) const ; <nl> <nl> / * ! <nl> * @ brief Get the list of groups . <nl> namespace PVR <nl> * @ param bExcludeHidden Whenever to exclude hidden channel groups . <nl> * @ return The amount of items that were added . <nl> * / <nl> - std : : vector < CPVRChannelGroupPtr > GetMembers ( bool bExcludeHidden = false ) const ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > GetMembers ( bool bExcludeHidden = false ) const ; <nl> <nl> / * ! <nl> * @ brief Get the previous group in this container . <nl> * @ param group The current group . <nl> * @ return The previous group or the group containing all channels if it wasn ' t found . <nl> * / <nl> - CPVRChannelGroupPtr GetPreviousGroup ( const CPVRChannelGroup & group ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetPreviousGroup ( const CPVRChannelGroup & group ) const ; <nl> <nl> / * ! <nl> * @ brief Get the next group in this container . <nl> * @ param group The current group . <nl> * @ return The next group or the group containing all channels if it wasn ' t found . <nl> * / <nl> - CPVRChannelGroupPtr GetNextGroup ( const CPVRChannelGroup & group ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetNextGroup ( const CPVRChannelGroup & group ) const ; <nl> <nl> / * ! <nl> * @ brief Get the group that is currently selected in the UI . <nl> * @ return The selected group . <nl> * / <nl> - CPVRChannelGroupPtr GetSelectedGroup ( void ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetSelectedGroup ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Change the selected group . <nl> namespace PVR <nl> void RemoveFromAllGroups ( const std : : shared_ptr < CPVRChannel > & channel ) ; <nl> <nl> bool m_bRadio ; / * ! < true if this is a container for radio channels , false if it is for tv channels * / <nl> - CPVRChannelGroupPtr m_selectedGroup ; / * ! < the group that ' s currently selected in the UI * / <nl> - std : : vector < CPVRChannelGroupPtr > m_groups ; / * ! < the groups in this container * / <nl> + std : : shared_ptr < CPVRChannelGroup > m_selectedGroup ; / * ! < the group that ' s currently selected in the UI * / <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > m_groups ; / * ! < the groups in this container * / <nl> mutable CCriticalSection m_critSection ; <nl> std : : vector < int > m_failedClientsForChannelGroups ; <nl> } ; <nl> mmm a / xbmc / pvr / channels / PVRChannelGroupsContainer . cpp <nl> ppp b / xbmc / pvr / channels / PVRChannelGroupsContainer . cpp <nl> CPVRChannelGroups * CPVRChannelGroupsContainer : : Get ( bool bRadio ) const <nl> return bRadio ? m_groupsRadio : m_groupsTV ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroupsContainer : : GetGroupAll ( bool bRadio ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroupsContainer : : GetGroupAll ( bool bRadio ) const <nl> { <nl> return Get ( bRadio ) - > GetGroupAll ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroupsContainer : : GetByIdFromAll ( int iGroupId ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroupsContainer : : GetByIdFromAll ( int iGroupId ) const <nl> { <nl> - CPVRChannelGroupPtr group = m_groupsTV - > GetById ( iGroupId ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group = m_groupsTV - > GetById ( iGroupId ) ; <nl> if ( ! group ) <nl> group = m_groupsRadio - > GetById ( iGroupId ) ; <nl> <nl> return group ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroupsContainer : : GetChannelById ( int iChannelId ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroupsContainer : : GetChannelById ( int iChannelId ) const <nl> { <nl> - CPVRChannelPtr channel = m_groupsTV - > GetGroupAll ( ) - > GetByChannelID ( iChannelId ) ; <nl> + std : : shared_ptr < CPVRChannel > channel = m_groupsTV - > GetGroupAll ( ) - > GetByChannelID ( iChannelId ) ; <nl> if ( ! channel ) <nl> channel = m_groupsRadio - > GetGroupAll ( ) - > GetByChannelID ( iChannelId ) ; <nl> <nl> return channel ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroupsContainer : : GetChannelByEpgId ( int iEpgId ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroupsContainer : : GetChannelByEpgId ( int iEpgId ) const <nl> { <nl> - CPVRChannelPtr channel = m_groupsTV - > GetGroupAll ( ) - > GetByChannelEpgID ( iEpgId ) ; <nl> + std : : shared_ptr < CPVRChannel > channel = m_groupsTV - > GetGroupAll ( ) - > GetByChannelEpgID ( iEpgId ) ; <nl> if ( ! channel ) <nl> channel = m_groupsRadio - > GetGroupAll ( ) - > GetByChannelEpgID ( iEpgId ) ; <nl> <nl> std : : shared_ptr < CPVRChannel > CPVRChannelGroupsContainer : : GetByPath ( const std : : st <nl> return { } ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroupsContainer : : GetSelectedGroup ( bool bRadio ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroupsContainer : : GetSelectedGroup ( bool bRadio ) const <nl> { <nl> return Get ( bRadio ) - > GetSelectedGroup ( ) ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRChannelGroupsContainer : : GetByUniqueID ( int iUniqueChannelId , int iClientID ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRChannelGroupsContainer : : GetByUniqueID ( int iUniqueChannelId , int iClientID ) const <nl> { <nl> - CPVRChannelPtr channel ; <nl> - CPVRChannelGroupPtr channelgroup = GetGroupAllTV ( ) ; <nl> + std : : shared_ptr < CPVRChannel > channel ; <nl> + std : : shared_ptr < CPVRChannelGroup > channelgroup = GetGroupAllTV ( ) ; <nl> if ( channelgroup ) <nl> channel = channelgroup - > GetByUniqueID ( iUniqueChannelId , iClientID ) ; <nl> <nl> std : : shared_ptr < CPVRChannel > CPVRChannelGroupsContainer : : GetLastPlayedChannel ( ) <nl> return channelTV ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroupsContainer : : GetLastPlayedGroup ( int iChannelID / * = - 1 * / ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroupsContainer : : GetLastPlayedGroup ( int iChannelID / * = - 1 * / ) const <nl> { <nl> - CPVRChannelGroupPtr groupTV = m_groupsTV - > GetLastPlayedGroup ( iChannelID ) ; <nl> - CPVRChannelGroupPtr groupRadio = m_groupsRadio - > GetLastPlayedGroup ( iChannelID ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > groupTV = m_groupsTV - > GetLastPlayedGroup ( iChannelID ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > groupRadio = m_groupsRadio - > GetLastPlayedGroup ( iChannelID ) ; <nl> <nl> if ( ! groupTV | | ( groupRadio & & groupTV - > LastWatched ( ) < groupRadio - > LastWatched ( ) ) ) <nl> return groupRadio ; <nl> bool CPVRChannelGroupsContainer : : CreateChannelEpgs ( void ) <nl> return m_groupsTV - > CreateChannelEpgs ( ) & & m_groupsRadio - > CreateChannelEpgs ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CPVRChannelGroupsContainer : : GetPreviousPlayedGroup ( void ) <nl> + std : : shared_ptr < CPVRChannelGroup > CPVRChannelGroupsContainer : : GetPreviousPlayedGroup ( void ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_lastPlayedGroups [ 0 ] ; <nl> } <nl> <nl> - void CPVRChannelGroupsContainer : : SetLastPlayedGroup ( const CPVRChannelGroupPtr & group ) <nl> + void CPVRChannelGroupsContainer : : SetLastPlayedGroup ( const std : : shared_ptr < CPVRChannelGroup > & group ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> m_lastPlayedGroups [ 0 ] = m_lastPlayedGroups [ 1 ] ; <nl> mmm a / xbmc / pvr / channels / PVRChannelGroupsContainer . h <nl> ppp b / xbmc / pvr / channels / PVRChannelGroupsContainer . h <nl> <nl> # include " pvr / PVRTypes . h " <nl> # include " threads / CriticalSection . h " <nl> <nl> + # include < memory > <nl> + <nl> namespace PVR <nl> { <nl> class CPVRChannel ; <nl> namespace PVR <nl> * @ brief Get the group containing all TV channels . <nl> * @ return The group containing all TV channels . <nl> * / <nl> - CPVRChannelGroupPtr GetGroupAllTV ( void ) const { return GetGroupAll ( false ) ; } <nl> + std : : shared_ptr < CPVRChannelGroup > GetGroupAllTV ( void ) const { return GetGroupAll ( false ) ; } <nl> <nl> / * ! <nl> * @ brief Get the group containing all radio channels . <nl> * @ return The group containing all radio channels . <nl> * / <nl> - CPVRChannelGroupPtr GetGroupAllRadio ( void ) const { return GetGroupAll ( true ) ; } <nl> + std : : shared_ptr < CPVRChannelGroup > GetGroupAllRadio ( void ) const { return GetGroupAll ( true ) ; } <nl> <nl> / * ! <nl> * @ brief Get the group containing all TV or radio channels . <nl> * @ param bRadio If true , get the group containing all radio channels . Get the group containing all TV channels otherwise . <nl> * @ return The requested group . <nl> * / <nl> - CPVRChannelGroupPtr GetGroupAll ( bool bRadio ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetGroupAll ( bool bRadio ) const ; <nl> <nl> / * ! <nl> * @ brief Get a group given it ' s ID . <nl> * @ param iGroupId The ID of the group . <nl> * @ return The requested group or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelGroupPtr GetByIdFromAll ( int iGroupId ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetByIdFromAll ( int iGroupId ) const ; <nl> <nl> / * ! <nl> * @ brief Get a channel given it ' s database ID . <nl> * @ param iChannelId The ID of the channel . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetChannelById ( int iChannelId ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetChannelById ( int iChannelId ) const ; <nl> <nl> / * ! <nl> * @ brief Get a channel given it ' s EPG ID . <nl> * @ param iEpgId The EPG ID of the channel . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetChannelByEpgId ( int iEpgId ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetChannelByEpgId ( int iEpgId ) const ; <nl> <nl> / * ! <nl> * @ brief Get the channel for the given epg tag . <nl> namespace PVR <nl> * @ param bRadio True to get the selected radio group , false to get the selected TV group . <nl> * @ return The selected group . <nl> * / <nl> - CPVRChannelGroupPtr GetSelectedGroup ( bool bRadio ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetSelectedGroup ( bool bRadio ) const ; <nl> <nl> / * ! <nl> * @ brief Get a channel given it ' s channel ID from all containers . <nl> namespace PVR <nl> * @ param iClientID The ID of the client . <nl> * @ return The channel or NULL if it wasn ' t found . <nl> * / <nl> - CPVRChannelPtr GetByUniqueID ( int iUniqueChannelId , int iClientID ) const ; <nl> + std : : shared_ptr < CPVRChannel > GetByUniqueID ( int iUniqueChannelId , int iClientID ) const ; <nl> <nl> / * ! <nl> * @ brief Get the channel that was played last . <nl> namespace PVR <nl> * @ param iChannelID The channel ID <nl> * @ return The last watched group . <nl> * / <nl> - CPVRChannelGroupPtr GetLastPlayedGroup ( int iChannelID = - 1 ) const ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetLastPlayedGroup ( int iChannelID = - 1 ) const ; <nl> <nl> / * ! <nl> * @ brief Create EPG tags for channels in all internal channel groups . <nl> namespace PVR <nl> * @ brief Return the group which was previous played . <nl> * @ return The group which was previous played . <nl> * / <nl> - CPVRChannelGroupPtr GetPreviousPlayedGroup ( void ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetPreviousPlayedGroup ( void ) ; <nl> <nl> / * ! <nl> * @ brief Set the last played group . <nl> * @ param The last played group <nl> * / <nl> - void SetLastPlayedGroup ( const CPVRChannelGroupPtr & group ) ; <nl> + void SetLastPlayedGroup ( const std : : shared_ptr < CPVRChannelGroup > & group ) ; <nl> <nl> protected : <nl> CPVRChannelGroups * m_groupsRadio ; / * ! < all radio channel groups * / <nl> namespace PVR <nl> CCriticalSection m_critSection ; <nl> bool m_bUpdateChannelsOnly = false ; <nl> bool m_bIsUpdating = false ; <nl> - CPVRChannelGroupPtr m_lastPlayedGroups [ 2 ] ; / * ! < used to store the last played groups * / <nl> + std : : shared_ptr < CPVRChannelGroup > m_lastPlayedGroups [ 2 ] ; / * ! < used to store the last played groups * / <nl> <nl> private : <nl> CPVRChannelGroupsContainer & operator = ( const CPVRChannelGroupsContainer & ) = delete ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelGuide . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelGuide . cpp <nl> CGUIDialogPVRChannelGuide : : CGUIDialogPVRChannelGuide ( ) <nl> { <nl> } <nl> <nl> - void CGUIDialogPVRChannelGuide : : Open ( const CPVRChannelPtr & channel ) <nl> + void CGUIDialogPVRChannelGuide : : Open ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> m_channel = channel ; <nl> CGUIDialogPVRItemsViewBase : : Open ( ) ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelGuide . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelGuide . h <nl> <nl> # include " pvr / PVRTypes . h " <nl> # include " pvr / dialogs / GUIDialogPVRItemsViewBase . h " <nl> <nl> + # include < memory > <nl> + <nl> namespace PVR <nl> { <nl> class CGUIDialogPVRChannelGuide : public CGUIDialogPVRItemsViewBase <nl> namespace PVR <nl> CGUIDialogPVRChannelGuide ( void ) ; <nl> ~ CGUIDialogPVRChannelGuide ( void ) override = default ; <nl> <nl> - void Open ( const CPVRChannelPtr & channel ) ; <nl> + void Open ( const std : : shared_ptr < CPVRChannel > & channel ) ; <nl> <nl> protected : <nl> void OnInitWindow ( ) override ; <nl> void OnDeinitWindow ( int nextWindowID ) override ; <nl> <nl> private : <nl> - CPVRChannelPtr m_channel ; <nl> + std : : shared_ptr < CPVRChannel > m_channel ; <nl> } ; <nl> } <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelManager . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelManager . cpp <nl> bool CGUIDialogPVRChannelManager : : OnClickButtonNewChannel ( ) <nl> { <nl> int iClientID = m_clientsWithSettingsList [ iSelection ] - > GetID ( ) ; <nl> <nl> - CPVRChannelPtr channel ( new CPVRChannel ( m_bIsRadio ) ) ; <nl> + std : : shared_ptr < CPVRChannel > channel ( new CPVRChannel ( m_bIsRadio ) ) ; <nl> channel - > SetChannelName ( g_localizeStrings . Get ( 19204 ) ) ; / / New channel <nl> channel - > SetClientID ( iClientID ) ; <nl> <nl> PVR_ERROR ret = PVR_ERROR_UNKNOWN ; <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( iClientID ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( iClientID ) ; <nl> if ( client ) <nl> { <nl> channel - > SetEPGEnabled ( client - > GetClientCapabilities ( ) . SupportsEPG ( ) ) ; <nl> bool CGUIDialogPVRChannelManager : : OnContextButton ( int itemNumber , CONTEXT_BUTTON <nl> } <nl> else if ( button = = CONTEXT_BUTTON_SETTINGS ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> PVR_ERROR ret = PVR_ERROR_UNKNOWN ; <nl> if ( client ) <nl> ret = client - > OpenDialogChannelSettings ( pItem - > GetPVRChannelInfoTag ( ) ) ; <nl> bool CGUIDialogPVRChannelManager : : OnContextButton ( int itemNumber , CONTEXT_BUTTON <nl> <nl> if ( pDialog - > IsConfirmed ( ) ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> if ( client ) <nl> { <nl> - const CPVRChannelPtr channel = pItem - > GetPVRChannelInfoTag ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = pItem - > GetPVRChannelInfoTag ( ) ; <nl> PVR_ERROR ret = client - > DeleteChannel ( channel ) ; <nl> if ( ret = = PVR_ERROR_NO_ERROR ) <nl> { <nl> void CGUIDialogPVRChannelManager : : Update ( ) <nl> / / empty the lists ready for population <nl> Clear ( ) ; <nl> <nl> - CPVRChannelGroupPtr channels = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > channels = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> <nl> / / No channels available , nothing to do . <nl> if ( ! channels ) <nl> void CGUIDialogPVRChannelManager : : Update ( ) <nl> channelFile = CFileItemPtr ( new CFileItem ( member . channel ) ) ; <nl> if ( ! channelFile | | ! channelFile - > HasPVRChannelInfoTag ( ) ) <nl> continue ; <nl> - const CPVRChannelPtr channel ( channelFile - > GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( channelFile - > GetPVRChannelInfoTag ( ) ) ; <nl> <nl> channelFile - > SetProperty ( " ActiveChannel " , ! channel - > IsHidden ( ) ) ; <nl> channelFile - > SetProperty ( " Name " , channel - > ChannelName ( ) ) ; <nl> void CGUIDialogPVRChannelManager : : Update ( ) <nl> channelFile - > SetProperty ( " ParentalLocked " , channel - > IsLocked ( ) ) ; <nl> channelFile - > SetProperty ( " Number " , StringUtils : : Format ( " % i " , channel - > ChannelNumber ( ) . GetChannelNumber ( ) ) ) ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * channelFile ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * channelFile ) ; <nl> if ( client ) <nl> { <nl> channelFile - > SetProperty ( " ClientName " , client - > GetFriendlyName ( ) ) ; <nl> void CGUIDialogPVRChannelManager : : RenameChannel ( const CFileItemPtr & pItem ) <nl> std : : string strChannelName = pItem - > GetProperty ( " Name " ) . asString ( ) ; <nl> if ( strChannelName ! = pItem - > GetPVRChannelInfoTag ( ) - > ChannelName ( ) ) <nl> { <nl> - CPVRChannelPtr channel = pItem - > GetPVRChannelInfoTag ( ) ; <nl> + std : : shared_ptr < CPVRChannel > channel = pItem - > GetPVRChannelInfoTag ( ) ; <nl> channel - > SetChannelName ( strChannelName ) ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( * pItem ) ; <nl> if ( ! client | | ( client - > RenameChannel ( channel ) ! = PVR_ERROR_NO_ERROR ) ) <nl> HELPERS : : ShowOKDialogText ( CVariant { 2103 } , CVariant { 16029 } ) ; / / Add - on error ; Check the log file for details . <nl> } <nl> } <nl> <nl> - bool CGUIDialogPVRChannelManager : : PersistChannel ( const CFileItemPtr & pItem , const CPVRChannelGroupPtr & group , unsigned int * iChannelNumber ) <nl> + bool CGUIDialogPVRChannelManager : : PersistChannel ( const CFileItemPtr & pItem , const std : : shared_ptr < CPVRChannelGroup > & group , unsigned int * iChannelNumber ) <nl> { <nl> if ( ! pItem | | ! pItem - > HasPVRChannelInfoTag ( ) | | ! group ) <nl> return false ; <nl> void CGUIDialogPVRChannelManager : : SaveList ( void ) <nl> <nl> / * persist all channels * / <nl> unsigned int iNextChannelNumber ( 0 ) ; <nl> - CPVRChannelGroupPtr group = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> if ( ! group ) <nl> return ; <nl> <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelManager . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelManager . h <nl> namespace PVR <nl> bool OnClickButtonGroupManager ( CGUIMessage & message ) ; <nl> bool OnClickButtonNewChannel ( ) ; <nl> <nl> - bool PersistChannel ( const CFileItemPtr & pItem , const CPVRChannelGroupPtr & group , unsigned int * iChannelNumber ) ; <nl> + bool PersistChannel ( const CFileItemPtr & pItem , const std : : shared_ptr < CPVRChannelGroup > & group , unsigned int * iChannelNumber ) ; <nl> void SetItemsUnchanged ( void ) ; <nl> <nl> bool m_bIsRadio = false ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelsOSD . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelsOSD . cpp <nl> void CGUIDialogPVRChannelsOSD : : Update ( ) <nl> pvrMgr . Events ( ) . Subscribe ( this , & CGUIDialogPVRChannelsOSD : : Notify ) ; <nl> pvrMgr . EpgContainer ( ) . Events ( ) . Subscribe ( this , & CGUIDialogPVRChannelsOSD : : Notify ) ; <nl> <nl> - const CPVRChannelPtr channel = pvrMgr . GetPlayingChannel ( ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel = pvrMgr . GetPlayingChannel ( ) ; <nl> if ( channel ) <nl> { <nl> - const CPVRChannelGroupPtr group = pvrMgr . GetPlayingGroup ( channel - > IsRadio ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = pvrMgr . GetPlayingGroup ( channel - > IsRadio ( ) ) ; <nl> if ( group ) <nl> { <nl> const std : : vector < PVRChannelGroupMember > groupMembers = group - > GetMembers ( CPVRChannelGroup : : Include : : ONLY_VISIBLE ) ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRChannelsOSD . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRChannelsOSD . h <nl> <nl> # include " threads / SystemClock . h " <nl> <nl> # include < map > <nl> + # include < memory > <nl> # include < string > <nl> <nl> namespace PVR <nl> namespace PVR <nl> void SaveSelectedItemPath ( int iGroupID ) ; <nl> std : : string GetLastSelectedItemPath ( int iGroupID ) const ; <nl> <nl> - CPVRChannelGroupPtr m_group ; <nl> + std : : shared_ptr < CPVRChannelGroup > m_group ; <nl> std : : map < int , std : : string > m_groupSelectedItemPaths ; <nl> XbmcThreads : : EndTime m_refreshTimeout ; <nl> } ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRGroupManager . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRGroupManager . cpp <nl> void CGUIDialogPVRGroupManager : : Update ( ) <nl> } <nl> <nl> / * for the center part , get all channels of the " all " channels group that are not in this group * / <nl> - const CPVRChannelGroupPtr allGroup = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > allGroup = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_bIsRadio ) ; <nl> const std : : vector < PVRChannelGroupMember > allGroupMembers = allGroup - > GetMembers ( CPVRChannelGroup : : Include : : ONLY_VISIBLE ) ; <nl> for ( const auto & groupMember : allGroupMembers ) <nl> { <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRGroupManager . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRGroupManager . h <nl> <nl> # include " pvr / PVRTypes . h " <nl> # include " view / GUIViewControl . h " <nl> <nl> + # include < memory > <nl> + <nl> class CFileItemList ; <nl> class CGUIMessage ; <nl> <nl> namespace PVR <nl> bool OnMessageClick ( CGUIMessage & message ) ; <nl> bool OnActionMove ( const CAction & action ) ; <nl> <nl> - CPVRChannelGroupPtr m_selectedGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > m_selectedGroup ; <nl> bool m_bIsRadio ; <nl> <nl> int m_iSelectedUngroupedChannel = 0 ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRGuideInfo . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRGuideInfo . cpp <nl> bool CGUIDialogPVRGuideInfo : : OnInfo ( int actionID ) <nl> return true ; <nl> } <nl> <nl> - void CGUIDialogPVRGuideInfo : : SetProgInfo ( const CPVREpgInfoTagPtr & tag ) <nl> + void CGUIDialogPVRGuideInfo : : SetProgInfo ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) <nl> { <nl> m_progItem = tag ; <nl> } <nl> void CGUIDialogPVRGuideInfo : : OnInitWindow ( ) <nl> } <nl> else if ( m_progItem - > IsRecordable ( ) ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_progItem - > ClientID ( ) ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_progItem - > ClientID ( ) ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ) <nl> { <nl> SET_CONTROL_LABEL ( CONTROL_BTN_RECORD , 264 ) ; / * Record * / <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRGuideInfo . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRGuideInfo . h <nl> <nl> # include " guilib / GUIDialog . h " <nl> # include " pvr / PVRTypes . h " <nl> <nl> + # include < memory > <nl> + <nl> class CGUIMessage ; <nl> <nl> namespace PVR <nl> namespace PVR <nl> bool HasListItems ( ) const override { return true ; } <nl> CFileItemPtr GetCurrentListItem ( int offset = 0 ) override ; <nl> <nl> - void SetProgInfo ( const CPVREpgInfoTagPtr & tag ) ; <nl> + void SetProgInfo ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) ; <nl> <nl> static void ShowFor ( const CFileItemPtr & item ) ; <nl> <nl> namespace PVR <nl> bool OnClickButtonAddTimer ( CGUIMessage & message ) ; <nl> bool OnClickButtonSetReminder ( CGUIMessage & message ) ; <nl> <nl> - CPVREpgInfoTagPtr m_progItem ; <nl> + std : : shared_ptr < CPVREpgInfoTag > m_progItem ; <nl> } ; <nl> } <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRGuideSearch . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRGuideSearch . cpp <nl> void CGUIDialogPVRGuideSearch : : UpdateChannelSpin ( void ) <nl> std : : vector < std : : pair < std : : string , int > > labels ; <nl> labels . emplace_back ( g_localizeStrings . Get ( 19217 ) , EPG_SEARCH_UNSET ) ; <nl> <nl> - CPVRChannelGroupPtr group ; <nl> + std : : shared_ptr < CPVRChannelGroup > group ; <nl> if ( iChannelGroup = = EPG_SEARCH_UNSET ) <nl> group = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetGroupAll ( m_searchFilter - > IsRadio ( ) ) ; <nl> else <nl> void CGUIDialogPVRGuideSearch : : UpdateGroupsSpin ( void ) <nl> std : : vector < std : : pair < std : : string , int > > labels ; <nl> <nl> / * groups * / <nl> - std : : vector < CPVRChannelGroupPtr > groups = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( m_searchFilter - > IsRadio ( ) ) - > GetMembers ( ) ; <nl> - for ( std : : vector < CPVRChannelGroupPtr > : : const_iterator it = groups . begin ( ) ; it ! = groups . end ( ) ; + + it ) <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > groups = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( m_searchFilter - > IsRadio ( ) ) - > GetMembers ( ) ; <nl> + for ( std : : vector < std : : shared_ptr < CPVRChannelGroup > > : : const_iterator it = groups . begin ( ) ; it ! = groups . end ( ) ; + + it ) <nl> labels . emplace_back ( ( * it ) - > GroupName ( ) , ( * it ) - > GroupID ( ) ) ; <nl> <nl> SET_CONTROL_LABELS ( CONTROL_SPIN_GROUPS , m_searchFilter - > GetChannelGroup ( ) , & labels ) ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRRecordingSettings . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRRecordingSettings . cpp <nl> CGUIDialogPVRRecordingSettings : : CGUIDialogPVRRecordingSettings ( ) : <nl> m_loadType = LOAD_EVERY_TIME ; <nl> } <nl> <nl> - void CGUIDialogPVRRecordingSettings : : SetRecording ( const CPVRRecordingPtr & recording ) <nl> + void CGUIDialogPVRRecordingSettings : : SetRecording ( const std : : shared_ptr < CPVRRecording > & recording ) <nl> { <nl> if ( ! recording ) <nl> { <nl> void CGUIDialogPVRRecordingSettings : : InitializeSettings ( ) <nl> } <nl> <nl> std : : shared_ptr < CSetting > setting = nullptr ; <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_recording - > ClientID ( ) ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_recording - > ClientID ( ) ) ; <nl> <nl> / / Name <nl> setting = AddEdit ( group , SETTING_RECORDING_NAME , 19075 , SettingLevel : : Basic , m_strTitle ) ; <nl> void CGUIDialogPVRRecordingSettings : : LifetimesFiller ( <nl> { <nl> list . clear ( ) ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( pThis - > m_recording - > ClientID ( ) ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( pThis - > m_recording - > ClientID ( ) ) ; <nl> if ( client ) <nl> { <nl> std : : vector < std : : pair < std : : string , int > > values ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRRecordingSettings . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRRecordingSettings . h <nl> namespace PVR <nl> public : <nl> CGUIDialogPVRRecordingSettings ( ) ; <nl> <nl> - void SetRecording ( const CPVRRecordingPtr & recording ) ; <nl> + void SetRecording ( const std : : shared_ptr < CPVRRecording > & recording ) ; <nl> static bool CanEditRecording ( const CFileItem & item ) ; <nl> <nl> protected : <nl> namespace PVR <nl> std : : vector < IntegerSettingOption > & list , <nl> int & current , void * data ) ; <nl> <nl> - CPVRRecordingPtr m_recording ; <nl> + std : : shared_ptr < CPVRRecording > m_recording ; <nl> std : : string m_strTitle ; <nl> int m_iPlayCount = 0 ; <nl> int m_iLifetime = 0 ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRTimerSettings . cpp <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRTimerSettings . cpp <nl> bool CGUIDialogPVRTimerSettings : : CanBeActivated ( ) const <nl> return true ; <nl> } <nl> <nl> - void CGUIDialogPVRTimerSettings : : SetTimer ( const CPVRTimerInfoTagPtr & timer ) <nl> + void CGUIDialogPVRTimerSettings : : SetTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) <nl> { <nl> if ( ! timer ) <nl> { <nl> void CGUIDialogPVRTimerSettings : : InitializeTypesList ( ) <nl> <nl> bool bFoundThisType ( false ) ; <nl> int idx ( 0 ) ; <nl> - const std : : vector < CPVRTimerTypePtr > types ( CPVRTimerType : : GetAllTypes ( ) ) ; <nl> + const std : : vector < std : : shared_ptr < CPVRTimerType > > types ( CPVRTimerType : : GetAllTypes ( ) ) ; <nl> for ( const auto & type : types ) <nl> { <nl> / / Type definition prohibits created of new instances . <nl> void CGUIDialogPVRTimerSettings : : InitializeTypesList ( ) <nl> / / Drop TimerTypes without ' Series ' EPG attributes if none are set <nl> if ( type - > RequiresEpgSeriesOnCreate ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> if ( epgTag & & ! epgTag - > IsSeries ( ) ) <nl> continue ; <nl> } <nl> void CGUIDialogPVRTimerSettings : : InitializeTypesList ( ) <nl> / / Drop TimerTypes which need series link if none is set <nl> if ( type - > RequiresEpgSeriesLinkOnCreate ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> if ( ! epgTag | | epgTag - > SeriesLink ( ) . empty ( ) ) <nl> continue ; <nl> } <nl> void CGUIDialogPVRTimerSettings : : InitializeTypesList ( ) <nl> / / Drop TimerTypes that aren ' t rules and cannot be recorded <nl> if ( ! type - > IsTimerRule ( ) ) <nl> { <nl> - const CPVREpgInfoTagPtr epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( m_timerInfoTag - > GetEpgInfoTag ( ) ) ; <nl> bool bCanRecord = epgTag ? epgTag - > IsRecordable ( ) : m_timerInfoTag - > EndAsLocalTime ( ) > CDateTime : : GetCurrentDateTime ( ) ; <nl> if ( ! bCanRecord ) <nl> continue ; <nl> mmm a / xbmc / pvr / dialogs / GUIDialogPVRTimerSettings . h <nl> ppp b / xbmc / pvr / dialogs / GUIDialogPVRTimerSettings . h <nl> namespace PVR <nl> <nl> bool CanBeActivated ( ) const override ; <nl> <nl> - void SetTimer ( const CPVRTimerInfoTagPtr & timer ) ; <nl> + void SetTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) ; <nl> <nl> protected : <nl> / / implementation of ISettingCallback <nl> namespace PVR <nl> static bool EndAnytimeSetCondition ( <nl> const std : : string & condition , const std : : string & value , std : : shared_ptr < const CSetting > setting , void * data ) ; <nl> <nl> - typedef std : : map < int , CPVRTimerTypePtr > TypeEntriesMap ; <nl> + typedef std : : map < int , std : : shared_ptr < CPVRTimerType > > TypeEntriesMap ; <nl> <nl> typedef struct ChannelDescriptor <nl> { <nl> namespace PVR <nl> <nl> typedef std : : map < int , ChannelDescriptor > ChannelEntriesMap ; <nl> <nl> - CPVRTimerInfoTagPtr m_timerInfoTag ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > m_timerInfoTag ; <nl> TypeEntriesMap m_typeEntries ; <nl> ChannelEntriesMap m_channelEntries ; <nl> std : : string m_timerStartTimeStr ; <nl> std : : string m_timerEndTimeStr ; <nl> <nl> - CPVRTimerTypePtr m_timerType ; <nl> + std : : shared_ptr < CPVRTimerType > m_timerType ; <nl> bool m_bIsRadio = false ; <nl> bool m_bIsNewTimer = true ; <nl> bool m_bTimerActive = false ; <nl> mmm a / xbmc / pvr / epg / Epg . cpp <nl> ppp b / xbmc / pvr / epg / Epg . cpp <nl> void CPVREpg : : Cleanup ( const CDateTime & time ) <nl> } <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVREpg : : GetTagNow ( bool bUpdateIfNeeded / * = true * / ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVREpg : : GetTagNow ( bool bUpdateIfNeeded / * = true * / ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( m_nowActiveStart . IsValid ( ) ) <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagNow ( bool bUpdateIfNeeded / * = true * / ) const <nl> <nl> if ( bUpdateIfNeeded ) <nl> { <nl> - CPVREpgInfoTagPtr lastActiveTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > lastActiveTag ; <nl> <nl> / * one of the first items will always match if the list is sorted * / <nl> for ( const auto & tag : m_tags ) <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagNow ( bool bUpdateIfNeeded / * = true * / ) const <nl> return lastActiveTag ; <nl> } <nl> <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVREpg : : GetTagNext ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVREpg : : GetTagNext ( ) const <nl> { <nl> - const CPVREpgInfoTagPtr nowTag = GetTagNow ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > nowTag = GetTagNow ( ) ; <nl> if ( nowTag ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagNext ( ) const <nl> } <nl> } <nl> <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVREpg : : GetTagPrevious ( ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVREpg : : GetTagPrevious ( ) const <nl> { <nl> - const CPVREpgInfoTagPtr nowTag = GetTagNow ( ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > nowTag = GetTagNow ( ) ; <nl> if ( nowTag ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagPrevious ( ) const <nl> } <nl> } <nl> <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> bool CPVREpg : : CheckPlayingEvent ( void ) <nl> { <nl> - const CPVREpgInfoTagPtr previousTag = GetTagNow ( false ) ; <nl> - const CPVREpgInfoTagPtr newTag = GetTagNow ( true ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > previousTag = GetTagNow ( false ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > newTag = GetTagNow ( true ) ; <nl> <nl> bool bTagChanged = newTag & & ( ! previousTag | | * previousTag ! = * newTag ) ; <nl> bool bTagRemoved = ! newTag & & previousTag ; <nl> bool CPVREpg : : CheckPlayingEvent ( void ) <nl> return false ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVREpg : : GetTagByBroadcastId ( unsigned int iUniqueBroadcastId ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVREpg : : GetTagByBroadcastId ( unsigned int iUniqueBroadcastId ) const <nl> { <nl> if ( iUniqueBroadcastId ! = EPG_TAG_INVALID_UID ) <nl> { <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagByBroadcastId ( unsigned int iUniqueBroadcastId ) <nl> return infoTag . second ; <nl> } <nl> } <nl> - return CPVREpgInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVREpgInfoTag > ( ) ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVREpg : : GetTagBetween ( const CDateTime & beginTime , const CDateTime & endTime , bool bUpdateFromClient / * = false * / ) <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVREpg : : GetTagBetween ( const CDateTime & beginTime , const CDateTime & endTime , bool bUpdateFromClient / * = false * / ) <nl> { <nl> - CPVREpgInfoTagPtr tag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> for ( const auto & epgTag : m_tags ) <nl> CPVREpgInfoTagPtr CPVREpg : : GetTagBetween ( const CDateTime & beginTime , const CDate <nl> <nl> void CPVREpg : : AddEntry ( const CPVREpgInfoTag & tag ) <nl> { <nl> - CPVREpgInfoTagPtr newTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > newTag ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> const auto it = m_tags . find ( tag . StartAsUTC ( ) ) ; <nl> bool CPVREpg : : Load ( const std : : shared_ptr < CPVREpgDatabase > & database ) <nl> return bReturn ; <nl> } <nl> <nl> - const std : : vector < CPVREpgInfoTagPtr > result = database - > Get ( * this ) ; <nl> + const std : : vector < std : : shared_ptr < CPVREpgInfoTag > > result = database - > Get ( * this ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( result . empty ( ) ) <nl> bool CPVREpg : : UpdateEntry ( const EPG_TAG * data , int iClientId ) <nl> return UpdateEntry ( tag , CServiceBroker : : GetSettingsComponent ( ) - > GetSettings ( ) - > GetBool ( CSettings : : SETTING_EPG_STOREEPGINDATABASE ) ) ; <nl> } <nl> <nl> - bool CPVREpg : : UpdateEntry ( const CPVREpgInfoTagPtr & tag , bool bUpdateDatabase ) <nl> + bool CPVREpg : : UpdateEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag , bool bUpdateDatabase ) <nl> { <nl> - CPVREpgInfoTagPtr infoTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > infoTag ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> const auto it = m_tags . find ( tag - > StartAsUTC ( ) ) ; <nl> bool CPVREpg : : UpdateEntry ( const CPVREpgInfoTagPtr & tag , bool bUpdateDatabase ) <nl> return true ; <nl> } <nl> <nl> - bool CPVREpg : : UpdateEntry ( const CPVREpgInfoTagPtr & tag , EPG_EVENT_STATE newState , bool bUpdateDatabase ) <nl> + bool CPVREpg : : UpdateEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag , EPG_EVENT_STATE newState , bool bUpdateDatabase ) <nl> { <nl> bool bRet = true ; <nl> bool bNotify = true ; <nl> CDateTime CPVREpg : : GetLastDate ( void ) const <nl> bool CPVREpg : : FixOverlappingEvents ( bool bUpdateDb / * = false * / ) <nl> { <nl> bool bReturn = true ; <nl> - CPVREpgInfoTagPtr previousTag , currentTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > previousTag , currentTag ; <nl> <nl> for ( auto it = m_tags . begin ( ) ; it ! = m_tags . end ( ) ; it ! = m_tags . end ( ) ? it + + : it ) <nl> { <nl> mmm a / xbmc / pvr / epg / Epg . h <nl> ppp b / xbmc / pvr / epg / Epg . h <nl> namespace PVR <nl> * @ brief Get the event that is occurring now <nl> * @ return The current event or NULL if it wasn ' t found . <nl> * / <nl> - CPVREpgInfoTagPtr GetTagNow ( bool bUpdateIfNeeded = true ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetTagNow ( bool bUpdateIfNeeded = true ) const ; <nl> <nl> / * ! <nl> * @ brief Get the event that will occur next <nl> * @ return The next event or NULL if it wasn ' t found . <nl> * / <nl> - CPVREpgInfoTagPtr GetTagNext ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetTagNext ( ) const ; <nl> <nl> / * ! <nl> * @ brief Get the event that occured previously <nl> * @ return The previous event or NULL if it wasn ' t found . <nl> * / <nl> - CPVREpgInfoTagPtr GetTagPrevious ( ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetTagPrevious ( ) const ; <nl> <nl> / * ! <nl> * @ brief Get the event that occurs between the given begin and end time . <nl> namespace PVR <nl> * @ param bUpdateFromClient if true , try to fetch the event from the client if not found locally . <nl> * @ return The found tag or NULL if it wasn ' t found . <nl> * / <nl> - CPVREpgInfoTagPtr GetTagBetween ( const CDateTime & beginTime , const CDateTime & endTime , bool bUpdateFromClient = false ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetTagBetween ( const CDateTime & beginTime , const CDateTime & endTime , bool bUpdateFromClient = false ) ; <nl> <nl> / * ! <nl> * @ brief Get the event matching the given unique broadcast id <nl> * @ param iUniqueBroadcastId The uid to look up <nl> * @ return The matching event or NULL if it wasn ' t found . <nl> * / <nl> - CPVREpgInfoTagPtr GetTagByBroadcastId ( unsigned int iUniqueBroadcastId ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetTagByBroadcastId ( unsigned int iUniqueBroadcastId ) const ; <nl> <nl> / * ! <nl> * @ brief Update an entry in this EPG . <nl> namespace PVR <nl> * @ param bUpdateDatabase If set to true , this event will be persisted in the database . <nl> * @ return True if it was updated successfully , false otherwise . <nl> * / <nl> - bool UpdateEntry ( const CPVREpgInfoTagPtr & tag , bool bUpdateDatabase ) ; <nl> + bool UpdateEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag , bool bUpdateDatabase ) ; <nl> <nl> / * ! <nl> * @ brief Update an entry in this EPG . <nl> namespace PVR <nl> * @ param bUpdateDatabase If set to true , this event will be persisted in the database . <nl> * @ return True if it was updated successfully , false otherwise . <nl> * / <nl> - bool UpdateEntry ( const CPVREpgInfoTagPtr & tag , EPG_EVENT_STATE newState , bool bUpdateDatabase ) ; <nl> + bool UpdateEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag , EPG_EVENT_STATE newState , bool bUpdateDatabase ) ; <nl> <nl> / * ! <nl> * @ brief Update the EPG from ' start ' till ' end ' . <nl> namespace PVR <nl> * / <nl> void Cleanup ( int iPastDays ) ; <nl> <nl> - std : : map < CDateTime , CPVREpgInfoTagPtr > m_tags ; <nl> - std : : map < int , CPVREpgInfoTagPtr > m_changedTags ; <nl> - std : : map < int , CPVREpgInfoTagPtr > m_deletedTags ; <nl> + std : : map < CDateTime , std : : shared_ptr < CPVREpgInfoTag > > m_tags ; <nl> + std : : map < int , std : : shared_ptr < CPVREpgInfoTag > > m_changedTags ; <nl> + std : : map < int , std : : shared_ptr < CPVREpgInfoTag > > m_deletedTags ; <nl> bool m_bChanged = false ; / * ! < true if anything changed that needs to be persisted , false otherwise * / <nl> bool m_bTagsChanged = false ; / * ! < true when any tags are changed and not persisted , false otherwise * / <nl> bool m_bLoaded = false ; / * ! < true when the initial entries have been loaded * / <nl> mmm a / xbmc / pvr / epg / EpgContainer . cpp <nl> ppp b / xbmc / pvr / epg / EpgContainer . cpp <nl> class CEpgTagStateChange <nl> { <nl> public : <nl> CEpgTagStateChange ( ) = default ; <nl> - CEpgTagStateChange ( const CPVREpgInfoTagPtr & tag , EPG_EVENT_STATE eNewState ) : m_epgtag ( tag ) , m_state ( eNewState ) { } <nl> + CEpgTagStateChange ( const std : : shared_ptr < CPVREpgInfoTag > & tag , EPG_EVENT_STATE eNewState ) : m_epgtag ( tag ) , m_state ( eNewState ) { } <nl> <nl> void Deliver ( ) ; <nl> <nl> private : <nl> - CPVREpgInfoTagPtr m_epgtag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > m_epgtag ; <nl> EPG_EVENT_STATE m_state = EPG_EVENT_CREATED ; <nl> } ; <nl> <nl> CPVREpgContainer : : ~ CPVREpgContainer ( void ) <nl> Clear ( ) ; <nl> } <nl> <nl> - CPVREpgDatabasePtr CPVREpgContainer : : GetEpgDatabase ( ) const <nl> + std : : shared_ptr < CPVREpgDatabase > CPVREpgContainer : : GetEpgDatabase ( ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( ! m_database | | ! m_database - > IsOpen ( ) ) <nl> std : : vector < std : : shared_ptr < CPVREpg > > CPVREpgContainer : : GetAllEpgs ( ) const <nl> return epgs ; <nl> } <nl> <nl> - CPVREpgPtr CPVREpgContainer : : GetById ( int iEpgId ) const <nl> + std : : shared_ptr < CPVREpg > CPVREpgContainer : : GetById ( int iEpgId ) const <nl> { <nl> - CPVREpgPtr retval ; <nl> + std : : shared_ptr < CPVREpg > retval ; <nl> <nl> if ( iEpgId < 0 ) <nl> return retval ; <nl> std : : shared_ptr < CPVREpg > CPVREpgContainer : : GetByChannelUid ( int iClientId , int iC <nl> <nl> std : : shared_ptr < CPVREpgInfoTag > CPVREpgContainer : : GetTagById ( const std : : shared_ptr < CPVREpg > & epg , unsigned int iBroadcastId ) const <nl> { <nl> - CPVREpgInfoTagPtr retval ; <nl> + std : : shared_ptr < CPVREpgInfoTag > retval ; <nl> <nl> if ( iBroadcastId = = EPG_TAG_INVALID_UID ) <nl> return retval ; <nl> std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVREpgContainer : : GetAllTags ( ) cons <nl> return allTags ; <nl> } <nl> <nl> - void CPVREpgContainer : : InsertFromDB ( const CPVREpgPtr & newEpg ) <nl> + void CPVREpgContainer : : InsertFromDB ( const std : : shared_ptr < CPVREpg > & newEpg ) <nl> { <nl> / / table might already have been created when pvr channels were loaded <nl> - CPVREpgPtr epg = GetById ( newEpg - > EpgID ( ) ) ; <nl> + std : : shared_ptr < CPVREpg > epg = GetById ( newEpg - > EpgID ( ) ) ; <nl> if ( ! epg ) <nl> { <nl> / / create a new epg table <nl> void CPVREpgContainer : : InsertFromDB ( const CPVREpgPtr & newEpg ) <nl> } <nl> } <nl> <nl> - CPVREpgPtr CPVREpgContainer : : CreateChannelEpg ( int iEpgId , const std : : string & strScraperName , const std : : shared_ptr < CPVREpgChannelData > & channelData ) <nl> + std : : shared_ptr < CPVREpg > CPVREpgContainer : : CreateChannelEpg ( int iEpgId , const std : : string & strScraperName , const std : : shared_ptr < CPVREpgChannelData > & channelData ) <nl> { <nl> - CPVREpgPtr epg ; <nl> + std : : shared_ptr < CPVREpg > epg ; <nl> <nl> WaitForUpdateFinish ( ) ; <nl> LoadFromDB ( ) ; <nl> bool CPVREpgContainer : : RemoveOldEntries ( void ) <nl> return true ; <nl> } <nl> <nl> - bool CPVREpgContainer : : DeleteEpg ( const CPVREpgPtr & epg , bool bDeleteFromDatabase / * = false * / ) <nl> + bool CPVREpgContainer : : DeleteEpg ( const std : : shared_ptr < CPVREpg > & epg , bool bDeleteFromDatabase / * = false * / ) <nl> { <nl> if ( ! epg | | epg - > EpgID ( ) < 0 ) <nl> return false ; <nl> bool CPVREpgContainer : : UpdateEPG ( bool bOnlyPending / * = false * / ) <nl> pendingUpdates = m_pendingUpdates ; <nl> } <nl> <nl> - std : : vector < CPVREpgPtr > invalidTables ; <nl> + std : : vector < std : : shared_ptr < CPVREpg > > invalidTables ; <nl> <nl> CPVRGUIProgressHandler * progressHandler = nullptr ; <nl> if ( bShowProgress & & ! bOnlyPending ) <nl> bool CPVREpgContainer : : UpdateEPG ( bool bOnlyPending / * = false * / ) <nl> break ; <nl> } <nl> <nl> - const CPVREpgPtr epg = epgEntry . second ; <nl> + const std : : shared_ptr < CPVREpg > epg = epgEntry . second ; <nl> if ( ! epg ) <nl> continue ; <nl> <nl> void CPVREpgContainer : : UpdateRequest ( int iClientID , int iUniqueChannelID ) <nl> m_updateRequests . emplace_back ( CEpgUpdateRequest ( iClientID , iUniqueChannelID ) ) ; <nl> } <nl> <nl> - void CPVREpgContainer : : UpdateFromClient ( const CPVREpgInfoTagPtr & tag , EPG_EVENT_STATE eNewState ) <nl> + void CPVREpgContainer : : UpdateFromClient ( const std : : shared_ptr < CPVREpgInfoTag > & tag , EPG_EVENT_STATE eNewState ) <nl> { <nl> CSingleLock lock ( m_epgTagChangesLock ) ; <nl> m_epgTagChanges . emplace_back ( CEpgTagStateChange ( tag , eNewState ) ) ; <nl> mmm a / xbmc / pvr / epg / EpgContainer . h <nl> ppp b / xbmc / pvr / epg / EpgContainer . h <nl> namespace PVR <nl> * @ brief Get a pointer to the database instance . <nl> * @ return A pointer to the database instance . <nl> * / <nl> - CPVREpgDatabasePtr GetEpgDatabase ( ) const ; <nl> + std : : shared_ptr < CPVREpgDatabase > GetEpgDatabase ( ) const ; <nl> <nl> / * ! <nl> * @ brief Query the events available for CEventStream <nl> namespace PVR <nl> * @ param bDeleteFromDatabase Delete this table from the database too if true . <nl> * @ return True on success , false otherwise . <nl> * / <nl> - bool DeleteEpg ( const CPVREpgPtr & epg , bool bDeleteFromDatabase = false ) ; <nl> + bool DeleteEpg ( const std : : shared_ptr < CPVREpg > & epg , bool bDeleteFromDatabase = false ) ; <nl> <nl> / * ! <nl> * @ brief CEventStream callback for PVR events . <nl> namespace PVR <nl> * @ param iEpgId The database ID of the table . <nl> * @ return The EPG or nullptr if it wasn ' t found . <nl> * / <nl> - CPVREpgPtr GetById ( int iEpgId ) const ; <nl> + std : : shared_ptr < CPVREpg > GetById ( int iEpgId ) const ; <nl> <nl> / * ! <nl> * @ brief Get an EPG given its client id and channel uid . <nl> namespace PVR <nl> * @ param tag The epg tag containing the updated data <nl> * @ param eNewState The kind of change ( CREATED , UPDATED , DELETED ) <nl> * / <nl> - void UpdateFromClient ( const CPVREpgInfoTagPtr & tag , EPG_EVENT_STATE eNewState ) ; <nl> + void UpdateFromClient ( const std : : shared_ptr < CPVREpgInfoTag > & tag , EPG_EVENT_STATE eNewState ) ; <nl> <nl> / * ! <nl> * @ brief Get the number of past days to show in the guide and to import from backends . <nl> namespace PVR <nl> * @ brief Insert data from database <nl> * @ param newEpg the EPG containing the updated data . <nl> * / <nl> - void InsertFromDB ( const CPVREpgPtr & newEpg ) ; <nl> + void InsertFromDB ( const std : : shared_ptr < CPVREpg > & newEpg ) ; <nl> <nl> - CPVREpgDatabasePtr m_database ; / * ! < the EPG database * / <nl> + std : : shared_ptr < CPVREpgDatabase > m_database ; / * ! < the EPG database * / <nl> <nl> bool m_bIsUpdating = false ; / * ! < true while an update is running * / <nl> bool m_bIsInitialising = true ; / * ! < true while the epg manager hasn ' t loaded all tables * / <nl> mmm a / xbmc / pvr / epg / EpgSearchFilter . cpp <nl> ppp b / xbmc / pvr / epg / EpgSearchFilter . cpp <nl> void CPVREpgSearchFilter : : Reset ( ) <nl> m_iUniqueBroadcastId = EPG_TAG_INVALID_UID ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchGenre ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchGenre ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> bool CPVREpgSearchFilter : : MatchGenre ( const CPVREpgInfoTagPtr & tag ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchDuration ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchDuration ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> bool CPVREpgSearchFilter : : MatchDuration ( const CPVREpgInfoTagPtr & tag ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchStartAndEndTimes ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchStartAndEndTimes ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> return ( tag - > StartAsLocalTime ( ) > = m_startDateTime & & tag - > EndAsLocalTime ( ) < = m_endDateTime ) ; <nl> } <nl> void CPVREpgSearchFilter : : SetSearchPhrase ( const std : : string & strSearchPhrase ) <nl> m_strSearchTerm . append ( " \ " " ) ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchSearchTerm ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchSearchTerm ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> bool CPVREpgSearchFilter : : MatchSearchTerm ( const CPVREpgInfoTagPtr & tag ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchBroadcastId ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchBroadcastId ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> if ( m_iUniqueBroadcastId ! = EPG_TAG_INVALID_UID ) <nl> return ( tag - > UniqueBroadcastID ( ) = = m_iUniqueBroadcastId ) ; <nl> bool CPVREpgSearchFilter : : MatchBroadcastId ( const CPVREpgInfoTagPtr & tag ) const <nl> return true ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : FilterEntry ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : FilterEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> return ( MatchGenre ( tag ) & & <nl> MatchBroadcastId ( tag ) & & <nl> void CPVREpgSearchFilter : : RemoveDuplicates ( std : : vector < std : : shared_ptr < CPVREpgIn <nl> } <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchChannelType ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchChannelType ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> return tag & & ( tag - > IsRadio ( ) = = m_bIsRadio ) ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchChannelNumber ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchChannelNumber ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> bool CPVREpgSearchFilter : : MatchChannelNumber ( const CPVREpgInfoTagPtr & tag ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchChannelGroup ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchChannelGroup ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> bool bReturn ( true ) ; <nl> <nl> if ( m_iChannelGroup ! = EPG_SEARCH_UNSET ) <nl> { <nl> - CPVRChannelGroupPtr group = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetByIdFromAll ( m_iChannelGroup ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > group = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetByIdFromAll ( m_iChannelGroup ) ; <nl> if ( group ) <nl> { <nl> const std : : shared_ptr < CPVRChannel > channel = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetChannelForEpgTag ( tag ) ; <nl> bool CPVREpgSearchFilter : : MatchChannelGroup ( const CPVREpgInfoTagPtr & tag ) const <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchFreeToAir ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchFreeToAir ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> if ( m_bFreeToAirOnly ) <nl> { <nl> bool CPVREpgSearchFilter : : MatchFreeToAir ( const CPVREpgInfoTagPtr & tag ) const <nl> return true ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchTimers ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchTimers ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> return ( ! m_bIgnorePresentTimers | | ! CServiceBroker : : GetPVRManager ( ) . Timers ( ) - > GetTimerForEpgTag ( tag ) ) ; <nl> } <nl> <nl> - bool CPVREpgSearchFilter : : MatchRecordings ( const CPVREpgInfoTagPtr & tag ) const <nl> + bool CPVREpgSearchFilter : : MatchRecordings ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const <nl> { <nl> return ( ! m_bIgnorePresentRecordings | | ! CServiceBroker : : GetPVRManager ( ) . Recordings ( ) - > GetRecordingForEpgTag ( tag ) ) ; <nl> } <nl> mmm a / xbmc / pvr / epg / EpgSearchFilter . h <nl> ppp b / xbmc / pvr / epg / EpgSearchFilter . h <nl> namespace PVR <nl> * @ param tag The tag to check . <nl> * @ return True if this tag matches the filter , false if not . <nl> * / <nl> - bool FilterEntry ( const CPVREpgInfoTagPtr & tag ) const ; <nl> + bool FilterEntry ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> <nl> / * ! <nl> * @ brief remove duplicates from a list of epg tags . <nl> namespace PVR <nl> void SetUniqueBroadcastId ( unsigned int iUniqueBroadcastId ) { m_iUniqueBroadcastId = iUniqueBroadcastId ; } <nl> <nl> private : <nl> - bool MatchGenre ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchDuration ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchStartAndEndTimes ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchSearchTerm ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchChannelNumber ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchChannelGroup ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchBroadcastId ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchChannelType ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchFreeToAir ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchTimers ( const CPVREpgInfoTagPtr & tag ) const ; <nl> - bool MatchRecordings ( const CPVREpgInfoTagPtr & tag ) const ; <nl> + bool MatchGenre ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchDuration ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchStartAndEndTimes ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchSearchTerm ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchChannelNumber ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchChannelGroup ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchBroadcastId ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchChannelType ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchFreeToAir ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchTimers ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> + bool MatchRecordings ( const std : : shared_ptr < CPVREpgInfoTag > & tag ) const ; <nl> <nl> std : : string m_strSearchTerm ; / * ! < The term to search for * / <nl> bool m_bIsCaseSensitive ; / * ! < Do a case sensitive search * / <nl> mmm a / xbmc / pvr / recordings / PVRRecording . cpp <nl> ppp b / xbmc / pvr / recordings / PVRRecording . cpp <nl> CPVRRecording : : CPVRRecording ( const PVR_RECORDING & recording , unsigned int iClien <nl> } <nl> else <nl> { <nl> - const CPVRChannelPtr channel ( Channel ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( Channel ( ) ) ; <nl> if ( channel ) <nl> { <nl> m_bRadio = channel - > IsRadio ( ) ; <nl> } <nl> else <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> bool bSupportsRadio = client & & client - > GetClientCapabilities ( ) . SupportsRadio ( ) ; <nl> if ( bSupportsRadio & & client & & client - > GetClientCapabilities ( ) . SupportsTV ( ) ) <nl> { <nl> void CPVRRecording : : Reset ( void ) <nl> <nl> bool CPVRRecording : : Delete ( void ) <nl> { <nl> - CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> return client & & ( client - > DeleteRecording ( * this ) = = PVR_ERROR_NO_ERROR ) ; <nl> } <nl> <nl> bool CPVRRecording : : Undelete ( void ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> return client & & ( client - > UndeleteRecording ( * this ) = = PVR_ERROR_NO_ERROR ) ; <nl> } <nl> <nl> bool CPVRRecording : : Rename ( const std : : string & strNewName ) <nl> { <nl> m_strTitle = strNewName ; <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> return client & & ( client - > RenameRecording ( * this ) = = PVR_ERROR_NO_ERROR ) ; <nl> } <nl> <nl> bool CPVRRecording : : SetPlayCount ( int count ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsPlayCount ( ) ) <nl> { <nl> if ( client - > SetRecordingPlayCount ( * this , count ) ! = PVR_ERROR_NO_ERROR ) <nl> bool CPVRRecording : : SetPlayCount ( int count ) <nl> <nl> bool CPVRRecording : : IncrementPlayCount ( ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsPlayCount ( ) ) <nl> { <nl> if ( client - > SetRecordingPlayCount ( * this , CVideoInfoTag : : GetPlayCount ( ) + 1 ) ! = PVR_ERROR_NO_ERROR ) <nl> bool CPVRRecording : : IncrementPlayCount ( ) <nl> <nl> bool CPVRRecording : : SetResumePoint ( const CBookmark & resumePoint ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsLastPlayedPosition ( ) ) <nl> { <nl> if ( client - > SetRecordingLastPlayedPosition ( * this , lrint ( resumePoint . timeInSeconds ) ) ! = PVR_ERROR_NO_ERROR ) <nl> bool CPVRRecording : : SetResumePoint ( const CBookmark & resumePoint ) <nl> <nl> bool CPVRRecording : : SetResumePoint ( double timeInSeconds , double totalTimeInSeconds , const std : : string & playerState / * = " " * / ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsLastPlayedPosition ( ) ) <nl> { <nl> if ( client - > SetRecordingLastPlayedPosition ( * this , lrint ( timeInSeconds ) ) ! = PVR_ERROR_NO_ERROR ) <nl> bool CPVRRecording : : SetResumePoint ( double timeInSeconds , double totalTimeInSecon <nl> <nl> CBookmark CPVRRecording : : GetResumePoint ( ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsLastPlayedPosition ( ) & & <nl> m_resumePointRefetchTimeout . IsTimePast ( ) ) <nl> { <nl> void CPVRRecording : : UpdateMetadata ( CVideoDatabase & db ) <nl> if ( m_bGotMetaData | | ! db . IsOpen ( ) ) <nl> return ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> <nl> if ( ! client | | ! client - > GetClientCapabilities ( ) . SupportsRecordingsPlayCount ( ) ) <nl> CVideoInfoTag : : SetPlayCount ( db . GetPlayCount ( m_strFileNameAndPath ) ) ; <nl> std : : vector < PVR_EDL_ENTRY > CPVRRecording : : GetEdl ( ) const <nl> { <nl> std : : vector < PVR_EDL_ENTRY > edls ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsRecordingsEdl ( ) ) <nl> client - > GetRecordingEdl ( * this , edls ) ; <nl> <nl> std : : string CPVRRecording : : GetTitleFromURL ( const std : : string & url ) <nl> return CPVRRecordingsPath ( url ) . GetTitle ( ) ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRRecording : : Channel ( void ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRRecording : : Channel ( void ) const <nl> { <nl> if ( m_iChannelUid ! = PVR_CHANNEL_INVALID_UID ) <nl> return CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetByUniqueID ( m_iChannelUid , m_iClientId ) ; <nl> <nl> - return CPVRChannelPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannel > ( ) ; <nl> } <nl> <nl> int CPVRRecording : : ChannelUid ( void ) const <nl> mmm a / xbmc / pvr / recordings / PVRRecording . h <nl> ppp b / xbmc / pvr / recordings / PVRRecording . h <nl> namespace PVR <nl> * @ return Get the channel on which this recording is / was running <nl> * @ note Only works if the recording has a channel uid provided by the add - on <nl> * / <nl> - CPVRChannelPtr Channel ( void ) const ; <nl> + std : : shared_ptr < CPVRChannel > Channel ( void ) const ; <nl> <nl> / * ! <nl> * @ brief Get the uid of the channel on which this recording is / was running <nl> mmm a / xbmc / pvr / recordings / PVRRecordings . cpp <nl> ppp b / xbmc / pvr / recordings / PVRRecordings . cpp <nl> std : : shared_ptr < CPVRRecording > CPVRRecordings : : GetByPath ( const std : : string & path <nl> <nl> for ( const auto recording : m_recordings ) <nl> { <nl> - CPVRRecordingPtr current = recording . second ; <nl> + std : : shared_ptr < CPVRRecording > current = recording . second ; <nl> / / Omit recordings not matching criteria <nl> if ( ! URIUtils : : PathEquals ( path , current - > m_strFileNameAndPath ) | | <nl> bDeleted ! = current - > IsDeleted ( ) | | bRadio ! = current - > IsRadio ( ) ) <nl> std : : shared_ptr < CPVRRecording > CPVRRecordings : : GetByPath ( const std : : string & path <nl> return { } ; <nl> } <nl> <nl> - CPVRRecordingPtr CPVRRecordings : : GetById ( int iClientId , const std : : string & strRecordingId ) const <nl> + std : : shared_ptr < CPVRRecording > CPVRRecordings : : GetById ( int iClientId , const std : : string & strRecordingId ) const <nl> { <nl> - CPVRRecordingPtr retVal ; <nl> + std : : shared_ptr < CPVRRecording > retVal ; <nl> CSingleLock lock ( m_critSection ) ; <nl> const auto it = m_recordings . find ( CPVRRecordingUid ( iClientId , strRecordingId ) ) ; <nl> if ( it ! = m_recordings . end ( ) ) <nl> CPVRRecordingPtr CPVRRecordings : : GetById ( int iClientId , const std : : string & strRe <nl> return retVal ; <nl> } <nl> <nl> - void CPVRRecordings : : UpdateFromClient ( const CPVRRecordingPtr & tag ) <nl> + void CPVRRecordings : : UpdateFromClient ( const std : : shared_ptr < CPVRRecording > & tag ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> void CPVRRecordings : : UpdateFromClient ( const CPVRRecordingPtr & tag ) <nl> m_bDeletedTVRecordings = true ; <nl> } <nl> <nl> - CPVRRecordingPtr newTag = GetById ( tag - > m_iClientId , tag - > m_strRecordingId ) ; <nl> + std : : shared_ptr < CPVRRecording > newTag = GetById ( tag - > m_iClientId , tag - > m_strRecordingId ) ; <nl> if ( newTag ) <nl> { <nl> newTag - > Update ( * tag ) ; <nl> } <nl> else <nl> { <nl> - newTag = CPVRRecordingPtr ( new CPVRRecording ) ; <nl> + newTag = std : : shared_ptr < CPVRRecording > ( new CPVRRecording ) ; <nl> newTag - > Update ( * tag ) ; <nl> newTag - > UpdateMetadata ( GetVideoDatabase ( ) ) ; <nl> newTag - > m_iRecordingId = + + m_iLastId ; <nl> void CPVRRecordings : : UpdateFromClient ( const CPVRRecordingPtr & tag ) <nl> } <nl> } <nl> <nl> - CPVRRecordingPtr CPVRRecordings : : GetRecordingForEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + std : : shared_ptr < CPVRRecording > CPVRRecordings : : GetRecordingForEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> if ( ! epgTag ) <nl> return { } ; <nl> CPVRRecordingPtr CPVRRecordings : : GetRecordingForEpgTag ( const CPVREpgInfoTagPtr & <nl> } <nl> } <nl> <nl> - return CPVRRecordingPtr ( ) ; <nl> + return std : : shared_ptr < CPVRRecording > ( ) ; <nl> } <nl> <nl> bool CPVRRecordings : : SetRecordingsPlayCount ( const std : : shared_ptr < CPVRRecording > & recording , int count ) <nl> mmm a / xbmc / pvr / recordings / PVRRecordings . h <nl> ppp b / xbmc / pvr / recordings / PVRRecordings . h <nl> namespace PVR <nl> * / <nl> void Unload ( ) ; <nl> <nl> - void UpdateFromClient ( const CPVRRecordingPtr & tag ) ; <nl> + void UpdateFromClient ( const std : : shared_ptr < CPVRRecording > & tag ) ; <nl> <nl> / * ! <nl> * @ brief refresh the recordings list from the clients . <nl> namespace PVR <nl> std : : vector < std : : shared_ptr < CPVRRecording > > GetAll ( ) const ; <nl> <nl> std : : shared_ptr < CPVRRecording > GetByPath ( const std : : string & path ) const ; <nl> - CPVRRecordingPtr GetById ( int iClientId , const std : : string & strRecordingId ) const ; <nl> + std : : shared_ptr < CPVRRecording > GetById ( int iClientId , const std : : string & strRecordingId ) const ; <nl> std : : shared_ptr < CPVRRecording > GetById ( unsigned int iId ) const ; <nl> <nl> / * ! <nl> namespace PVR <nl> * @ param epgTag The epg tag . <nl> * @ return The requested recording , or an empty recordingptr if none was found . <nl> * / <nl> - CPVRRecordingPtr GetRecordingForEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> + std : : shared_ptr < CPVRRecording > GetRecordingForEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> <nl> private : <nl> mutable CCriticalSection m_critSection ; <nl> bool m_bIsUpdating = false ; <nl> - std : : map < CPVRRecordingUid , CPVRRecordingPtr > m_recordings ; <nl> + std : : map < CPVRRecordingUid , std : : shared_ptr < CPVRRecording > > m_recordings ; <nl> unsigned int m_iLastId = 0 ; <nl> std : : unique_ptr < CVideoDatabase > m_database ; <nl> bool m_bDeletedTVRecordings = false ; <nl> mmm a / xbmc / pvr / timers / PVRTimerInfoTag . cpp <nl> ppp b / xbmc / pvr / timers / PVRTimerInfoTag . cpp <nl> CPVRTimerInfoTag : : CPVRTimerInfoTag ( bool bRadio / * = false * / ) : <nl> <nl> std : : shared_ptr < CPVRTimerType > type ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ) <nl> { <nl> / / default to first available type for given client <nl> CPVRTimerInfoTag : : CPVRTimerInfoTag ( bool bRadio / * = false * / ) : <nl> UpdateSummary ( ) ; <nl> } <nl> <nl> - CPVRTimerInfoTag : : CPVRTimerInfoTag ( const PVR_TIMER & timer , const CPVRChannelPtr & channel , unsigned int iClientId ) : <nl> + CPVRTimerInfoTag : : CPVRTimerInfoTag ( const PVR_TIMER & timer , const std : : shared_ptr < CPVRChannel > & channel , unsigned int iClientId ) : <nl> m_strTitle ( timer . strTitle ) , <nl> m_strEpgSearchString ( timer . strEpgSearchString ) , <nl> m_bFullTextEpgSearch ( timer . bFullTextEpgSearch ) , <nl> CPVRTimerInfoTag : : CPVRTimerInfoTag ( const PVR_TIMER & timer , const CPVRChannelPtr <nl> if ( m_iClientIndex = = PVR_TIMER_NO_CLIENT_INDEX ) <nl> CLog : : LogF ( LOGERROR , " Invalid client index supplied by client % d ( must be > 0 ) ! " , m_iClientId ) ; <nl> <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client & & client - > GetClientCapabilities ( ) . SupportsTimers ( ) ) <nl> { <nl> / / begin compat section <nl> void CPVRTimerInfoTag : : UpdateSummary ( void ) <nl> } <nl> } <nl> <nl> - void CPVRTimerInfoTag : : SetTimerType ( const CPVRTimerTypePtr & type ) <nl> + void CPVRTimerInfoTag : : SetTimerType ( const std : : shared_ptr < CPVRTimerType > & type ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> m_timerType = type ; <nl> bool CPVRTimerInfoTag : : IsOwnedByClient ( ) const <nl> <nl> bool CPVRTimerInfoTag : : AddToClient ( void ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> if ( client ) <nl> return client - > AddTimer ( * this ) = = PVR_ERROR_NO_ERROR ; <nl> return false ; <nl> bool CPVRTimerInfoTag : : AddToClient ( void ) const <nl> <nl> TimerOperationResult CPVRTimerInfoTag : : DeleteFromClient ( bool bForce / * = false * / ) const <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> PVR_ERROR error = PVR_ERROR_UNKNOWN ; <nl> <nl> if ( client ) <nl> bool CPVRTimerInfoTag : : DeleteFromDatabase ( ) <nl> return false ; <nl> } <nl> <nl> - bool CPVRTimerInfoTag : : UpdateEntry ( const CPVRTimerInfoTagPtr & tag ) <nl> + bool CPVRTimerInfoTag : : UpdateEntry ( const std : : shared_ptr < CPVRTimerInfoTag > & tag ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> <nl> void CPVRTimerInfoTag : : ResetChildState ( ) <nl> <nl> bool CPVRTimerInfoTag : : UpdateOnClient ( ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( m_iClientId ) ; <nl> return client & & ( client - > UpdateTimer ( * this ) = = PVR_ERROR_NO_ERROR ) ; <nl> } <nl> <nl> std : : string CPVRTimerInfoTag : : ChannelName ( ) const <nl> { <nl> std : : string strReturn ; <nl> - CPVRChannelPtr channeltag = Channel ( ) ; <nl> + std : : shared_ptr < CPVRChannel > channeltag = Channel ( ) ; <nl> if ( channeltag ) <nl> strReturn = channeltag - > ChannelName ( ) ; <nl> else if ( m_timerType & & m_timerType - > IsEpgBasedTimerRule ( ) ) <nl> std : : string CPVRTimerInfoTag : : ChannelName ( ) const <nl> std : : string CPVRTimerInfoTag : : ChannelIcon ( ) const <nl> { <nl> std : : string strReturn ; <nl> - CPVRChannelPtr channeltag = Channel ( ) ; <nl> + std : : shared_ptr < CPVRChannel > channeltag = Channel ( ) ; <nl> if ( channeltag ) <nl> strReturn = channeltag - > IconPath ( ) ; <nl> return strReturn ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromDate ( <nl> if ( ! channel ) <nl> { <nl> CLog : : LogF ( LOGERROR , " No channel " ) ; <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> bool bInstantStart = ( start = = CDateTime ( INSTANT_TIMER_START ) ) ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromDate ( <nl> epgTag = channel - > GetEPG ( ) - > GetTagBetween ( start , start + CDateTimeSpan ( 0 , 0 , iDuration , 0 ) ) ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr newTimer ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > newTimer ; <nl> if ( epgTag ) <nl> { <nl> if ( epgTag - > IsRecordable ( ) ) <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromDate ( <nl> else <nl> { <nl> CLog : : LogF ( LOGERROR , " EPG tag is not recordable " ) ; <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> } <nl> <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromDate ( <nl> if ( ! timerType ) <nl> { <nl> CLog : : LogF ( LOGERROR , " Unable to create one shot manual timer type " ) ; <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> newTimer - > SetTimerType ( timerType ) ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromEpg ( <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromEpg ( <nl> const std : : shared_ptr < CPVREpgInfoTag > & tag , bool bCreateRule , bool bCreateReminder , bool bReadOnly ) <nl> { <nl> - CPVRTimerInfoTagPtr newTag ( new CPVRTimerInfoTag ( ) ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > newTag ( new CPVRTimerInfoTag ( ) ) ; <nl> <nl> / * check if a valid channel is set * / <nl> const std : : shared_ptr < CPVRChannel > channel = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > GetChannelForEpgTag ( tag ) ; <nl> if ( ! channel ) <nl> { <nl> CLog : : LogF ( LOGERROR , " EPG tag has no channel " ) ; <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> newTag - > m_iClientIndex = PVR_TIMER_NO_CLIENT_INDEX ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromEpg ( <nl> const int iMustNotHaveAttribs = PVR_TIMER_TYPE_IS_MANUAL | <nl> PVR_TIMER_TYPE_FORBIDS_NEW_INSTANCES | <nl> PVR_TIMER_TYPE_FORBIDS_EPG_TAG_ON_CREATE ; <nl> - CPVRTimerTypePtr timerType ; <nl> + std : : shared_ptr < CPVRTimerType > timerType ; <nl> if ( bCreateRule ) <nl> { <nl> / / create epg - based timer rule , prefer rule using series link if available . <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimerInfoTag : : CreateFromEpg ( <nl> if ( ! timerType ) <nl> { <nl> CLog : : LogF ( LOGERROR , " Unable to create any epg - based timer type " ) ; <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> newTag - > SetTimerType ( timerType ) ; <nl> void CPVRTimerInfoTag : : UpdateEpgInfoTag ( ) <nl> GetEpgInfoTag ( ) ; <nl> } <nl> <nl> - CPVREpgInfoTagPtr CPVRTimerInfoTag : : GetEpgInfoTag ( bool bCreate / * = true * / ) const <nl> + std : : shared_ptr < CPVREpgInfoTag > CPVRTimerInfoTag : : GetEpgInfoTag ( bool bCreate / * = true * / ) const <nl> { <nl> if ( ! m_epgTag & & bCreate & & CServiceBroker : : GetPVRManager ( ) . EpgsCreated ( ) ) <nl> { <nl> - CPVRChannelPtr channel ( m_channel ) ; <nl> + std : : shared_ptr < CPVRChannel > channel ( m_channel ) ; <nl> if ( ! channel ) <nl> { <nl> channel = CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( m_bIsRadio ) - > GetGroupAll ( ) - > GetByUniqueID ( m_iClientChannelUid , m_iClientId ) ; <nl> CPVREpgInfoTagPtr CPVRTimerInfoTag : : GetEpgInfoTag ( bool bCreate / * = true * / ) con <nl> <nl> if ( channel ) <nl> { <nl> - const CPVREpgPtr epg ( channel - > GetEPG ( ) ) ; <nl> + const std : : shared_ptr < CPVREpg > epg ( channel - > GetEPG ( ) ) ; <nl> if ( epg ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> bool CPVRTimerInfoTag : : HasChannel ( ) const <nl> return m_channel . get ( ) ! = nullptr ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRTimerInfoTag : : Channel ( ) const <nl> + std : : shared_ptr < CPVRChannel > CPVRTimerInfoTag : : Channel ( ) const <nl> { <nl> return m_channel ; <nl> } <nl> <nl> - CPVRChannelPtr CPVRTimerInfoTag : : UpdateChannel ( void ) <nl> + std : : shared_ptr < CPVRChannel > CPVRTimerInfoTag : : UpdateChannel ( void ) <nl> { <nl> - const CPVRChannelPtr channel ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( m_bIsRadio ) - > GetGroupAll ( ) - > GetByUniqueID ( m_iClientChannelUid , m_iClientId ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( CServiceBroker : : GetPVRManager ( ) . ChannelGroups ( ) - > Get ( m_bIsRadio ) - > GetGroupAll ( ) - > GetByUniqueID ( m_iClientChannelUid , m_iClientId ) ) ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> m_channel = channel ; <nl> mmm a / xbmc / pvr / timers / PVRTimerInfoTag . h <nl> ppp b / xbmc / pvr / timers / PVRTimerInfoTag . h <nl> namespace PVR <nl> { <nl> public : <nl> explicit CPVRTimerInfoTag ( bool bRadio = false ) ; <nl> - CPVRTimerInfoTag ( const PVR_TIMER & timer , const CPVRChannelPtr & channel , unsigned int iClientId ) ; <nl> + CPVRTimerInfoTag ( const PVR_TIMER & timer , const std : : shared_ptr < CPVRChannel > & channel , unsigned int iClientId ) ; <nl> <nl> bool operator = = ( const CPVRTimerInfoTag & right ) const ; <nl> bool operator ! = ( const CPVRTimerInfoTag & right ) const ; <nl> namespace PVR <nl> * @ param bCreate if true , try to find the epg tag if not yet set ( lazy evaluation ) <nl> * @ return the epg info tag associated with this timer or null if there is no tag <nl> * / <nl> - CPVREpgInfoTagPtr GetEpgInfoTag ( bool bCreate = true ) const ; <nl> + std : : shared_ptr < CPVREpgInfoTag > GetEpgInfoTag ( bool bCreate = true ) const ; <nl> <nl> std : : string ChannelName ( void ) const ; <nl> std : : string ChannelIcon ( void ) const ; <nl> namespace PVR <nl> * @ brief Get the channel associated with this timer , if any . <nl> * @ return the channel or null if non is associated with this timer . <nl> * / <nl> - CPVRChannelPtr Channel ( ) const ; <nl> + std : : shared_ptr < CPVRChannel > Channel ( ) const ; <nl> <nl> / * ! <nl> * @ brief updates this timer excluding the state of any children . <nl> * @ param tag A timer containing the data that shall be merged into this timer ' s data . <nl> * @ return true if the timer was updated successfully <nl> * / <nl> - bool UpdateEntry ( const CPVRTimerInfoTagPtr & tag ) ; <nl> + bool UpdateEntry ( const std : : shared_ptr < CPVRTimerInfoTag > & tag ) ; <nl> <nl> / * ! <nl> * @ brief merge in the state of this child timer . <nl> namespace PVR <nl> * @ brief Gets the type of this timer . <nl> * @ return the timer type or NULL if this tag has no timer type . <nl> * / <nl> - const CPVRTimerTypePtr GetTimerType ( ) const { return m_timerType ; } <nl> + const std : : shared_ptr < CPVRTimerType > GetTimerType ( ) const { return m_timerType ; } <nl> <nl> / * ! <nl> * @ brief Sets the type of this timer . <nl> * @ param the new timer type . <nl> * / <nl> - void SetTimerType ( const CPVRTimerTypePtr & type ) ; <nl> + void SetTimerType ( const std : : shared_ptr < CPVRTimerType > & type ) ; <nl> <nl> / * ! <nl> * @ brief Checks whether this is a timer rule ( vs . one time timer ) . <nl> namespace PVR <nl> * @ brief Update the channel associated with this timer . <nl> * @ return the channel for the timer . Can be empty for epg based repeating timers ( e . g . " match any channel " rules ) <nl> * / <nl> - CPVRChannelPtr UpdateChannel ( void ) ; <nl> + std : : shared_ptr < CPVRChannel > UpdateChannel ( void ) ; <nl> <nl> / * ! <nl> * @ brief Return string representation for any possible combination of weekdays . <nl> namespace PVR <nl> CDateTime m_StartTime ; / * ! < start time * / <nl> CDateTime m_StopTime ; / * ! < stop time * / <nl> CDateTime m_FirstDay ; / * ! < if it is a manual timer rule the first date it starts * / <nl> - CPVRTimerTypePtr m_timerType ; / * ! < the type of this timer * / <nl> + std : : shared_ptr < CPVRTimerType > m_timerType ; / * ! < the type of this timer * / <nl> <nl> unsigned int m_iTVChildTimersActive = 0 ; <nl> unsigned int m_iTVChildTimersConflictNOK = 0 ; <nl> namespace PVR <nl> unsigned int m_iRadioChildTimersRecording = 0 ; <nl> unsigned int m_iRadioChildTimersErrors = 0 ; <nl> <nl> - mutable CPVREpgInfoTagPtr m_epgTag ; / * ! < epg info tag matching m_iEpgUid . * / <nl> - mutable CPVRChannelPtr m_channel ; <nl> + mutable std : : shared_ptr < CPVREpgInfoTag > m_epgTag ; / * ! < epg info tag matching m_iEpgUid . * / <nl> + mutable std : : shared_ptr < CPVRChannel > m_channel ; <nl> <nl> mutable XbmcThreads : : EndTime m_epTagRefetchTimeout ; <nl> } ; <nl> mmm a / xbmc / pvr / timers / PVRTimerType . cpp <nl> ppp b / xbmc / pvr / timers / PVRTimerType . cpp <nl> <nl> <nl> using namespace PVR ; <nl> <nl> - const std : : vector < CPVRTimerTypePtr > CPVRTimerType : : GetAllTypes ( ) <nl> + const std : : vector < std : : shared_ptr < CPVRTimerType > > CPVRTimerType : : GetAllTypes ( ) <nl> { <nl> - std : : vector < CPVRTimerTypePtr > allTypes ; <nl> + std : : vector < std : : shared_ptr < CPVRTimerType > > allTypes ; <nl> CServiceBroker : : GetPVRManager ( ) . Clients ( ) - > GetTimerTypes ( allTypes ) ; <nl> <nl> / / Add local reminder timer types . Local reminders are always available . <nl> const std : : vector < CPVRTimerTypePtr > CPVRTimerType : : GetAllTypes ( ) <nl> return allTypes ; <nl> } <nl> <nl> - const CPVRTimerTypePtr CPVRTimerType : : GetFirstAvailableType ( const std : : shared_ptr < CPVRClient > & client ) <nl> + const std : : shared_ptr < CPVRTimerType > CPVRTimerType : : GetFirstAvailableType ( const std : : shared_ptr < CPVRClient > & client ) <nl> { <nl> if ( client ) <nl> { <nl> - std : : vector < CPVRTimerTypePtr > types ; <nl> + std : : vector < std : : shared_ptr < CPVRTimerType > > types ; <nl> if ( client - > GetTimerTypes ( types ) = = PVR_ERROR_NO_ERROR & & ! types . empty ( ) ) <nl> { <nl> return * ( types . begin ( ) ) ; <nl> const CPVRTimerTypePtr CPVRTimerType : : GetFirstAvailableType ( const std : : shared_pt <nl> return { } ; <nl> } <nl> <nl> - CPVRTimerTypePtr CPVRTimerType : : CreateFromIds ( unsigned int iTypeId , int iClientId ) <nl> + std : : shared_ptr < CPVRTimerType > CPVRTimerType : : CreateFromIds ( unsigned int iTypeId , int iClientId ) <nl> { <nl> const std : : vector < std : : shared_ptr < CPVRTimerType > > types = GetAllTypes ( ) ; <nl> for ( const auto & type : types ) <nl> CPVRTimerTypePtr CPVRTimerType : : CreateFromIds ( unsigned int iTypeId , int iClientI <nl> return { } ; <nl> } <nl> <nl> - CPVRTimerTypePtr CPVRTimerType : : CreateFromAttributes ( <nl> + std : : shared_ptr < CPVRTimerType > CPVRTimerType : : CreateFromAttributes ( <nl> unsigned int iMustHaveAttr , unsigned int iMustNotHaveAttr , int iClientId ) <nl> { <nl> const std : : vector < std : : shared_ptr < CPVRTimerType > > types = GetAllTypes ( ) ; <nl> mmm a / xbmc / pvr / timers / PVRTimerType . h <nl> ppp b / xbmc / pvr / timers / PVRTimerType . h <nl> namespace PVR <nl> * @ brief Return a list with all known timer types . <nl> * @ return A list of timer types or an empty list if no types available . <nl> * / <nl> - static const std : : vector < CPVRTimerTypePtr > GetAllTypes ( ) ; <nl> + static const std : : vector < std : : shared_ptr < CPVRTimerType > > GetAllTypes ( ) ; <nl> <nl> / * ! <nl> * @ brief Return the first available timer type from given client . <nl> * @ param client the PVR client . <nl> * @ return A timer type or NULL if none available . <nl> * / <nl> - static const CPVRTimerTypePtr GetFirstAvailableType ( const std : : shared_ptr < CPVRClient > & client ) ; <nl> + static const std : : shared_ptr < CPVRTimerType > GetFirstAvailableType ( const std : : shared_ptr < CPVRClient > & client ) ; <nl> <nl> / * ! <nl> * @ brief Create a timer type from given timer type id and client id . <nl> namespace PVR <nl> * @ param iClientId the PVR client id . <nl> * @ return A timer type instance . <nl> * / <nl> - static CPVRTimerTypePtr CreateFromIds ( unsigned int iTypeId , int iClientId ) ; <nl> + static std : : shared_ptr < CPVRTimerType > CreateFromIds ( unsigned int iTypeId , int iClientId ) ; <nl> <nl> / * ! <nl> * @ brief Create a timer type from given timer type attributes and client id . <nl> namespace PVR <nl> * @ param iClientId the PVR client id . <nl> * @ return A timer type instance . <nl> * / <nl> - static CPVRTimerTypePtr CreateFromAttributes ( unsigned int iMustHaveAttr , unsigned int iMustNotHaveAttr , int iClientId ) ; <nl> + static std : : shared_ptr < CPVRTimerType > CreateFromAttributes ( unsigned int iMustHaveAttr , unsigned int iMustNotHaveAttr , int iClientId ) ; <nl> <nl> CPVRTimerType ( ) ; <nl> CPVRTimerType ( const PVR_TIMER_TYPE & type , int iClientId ) ; <nl> mmm a / xbmc / pvr / timers / PVRTimers . cpp <nl> ppp b / xbmc / pvr / timers / PVRTimers . cpp <nl> <nl> <nl> using namespace PVR ; <nl> <nl> - bool CPVRTimersContainer : : UpdateFromClient ( const CPVRTimerInfoTagPtr & timer ) <nl> + bool CPVRTimersContainer : : UpdateFromClient ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> - CPVRTimerInfoTagPtr tag = GetByClient ( timer - > m_iClientId , timer - > m_iClientIndex ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > tag = GetByClient ( timer - > m_iClientId , timer - > m_iClientIndex ) ; <nl> if ( ! tag ) <nl> { <nl> tag . reset ( new CPVRTimerInfoTag ( ) ) ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimersContainer : : GetByClient ( int iClientId <nl> } <nl> } <nl> <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> void CPVRTimersContainer : : InsertEntry ( const std : : shared_ptr < CPVRTimerInfoTag > & newTimer ) <nl> bool CPVRTimers : : UpdateEntries ( const CPVRTimersContainer & timers , const std : : vec <nl> for ( VecTimerInfoTag : : const_iterator timerIt = it - > second . begin ( ) ; timerIt ! = it - > second . end ( ) ; + + timerIt ) <nl> { <nl> / * check if this timer is present in this container * / <nl> - CPVRTimerInfoTagPtr existingTimer = GetByClient ( ( * timerIt ) - > m_iClientId , ( * timerIt ) - > m_iClientIndex ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > existingTimer = GetByClient ( ( * timerIt ) - > m_iClientId , ( * timerIt ) - > m_iClientIndex ) ; <nl> if ( existingTimer ) <nl> { <nl> / * if it ' s present , update the current tag * / <nl> bool CPVRTimers : : UpdateEntries ( const CPVRTimersContainer & timers , const std : : vec <nl> else <nl> { <nl> / * new timer * / <nl> - CPVRTimerInfoTagPtr newTimer = CPVRTimerInfoTagPtr ( new CPVRTimerInfoTag ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > newTimer = std : : shared_ptr < CPVRTimerInfoTag > ( new CPVRTimerInfoTag ) ; <nl> newTimer - > UpdateEntry ( * timerIt ) ; <nl> newTimer - > m_iTimerId = + + m_iLastId ; <nl> InsertEntry ( newTimer ) ; <nl> bool CPVRTimers : : UpdateEntries ( const CPVRTimersContainer & timers , const std : : vec <nl> / * check for deleted timers * / <nl> for ( MapTags : : iterator it = m_tags . begin ( ) ; it ! = m_tags . end ( ) ; ) <nl> { <nl> - for ( std : : vector < CPVRTimerInfoTagPtr > : : iterator it2 = it - > second . begin ( ) ; it2 ! = it - > second . end ( ) ; ) <nl> + for ( std : : vector < std : : shared_ptr < CPVRTimerInfoTag > > : : iterator it2 = it - > second . begin ( ) ; it2 ! = it - > second . end ( ) ; ) <nl> { <nl> const std : : shared_ptr < CPVRTimerInfoTag > timer = * it2 ; <nl> if ( ! timers . GetByClient ( timer - > m_iClientId , timer - > m_iClientIndex ) ) <nl> bool CPVRTimers : : UpdateEntries ( const CPVRTimersContainer & timers , const std : : vec <nl> / * queue notifications / fill eventlog * / <nl> for ( const auto & entry : timerNotifications ) <nl> { <nl> - const CPVRClientPtr client = CServiceBroker : : GetPVRManager ( ) . GetClient ( entry . first ) ; <nl> + const std : : shared_ptr < CPVRClient > client = CServiceBroker : : GetPVRManager ( ) . GetClient ( entry . first ) ; <nl> if ( client ) <nl> { <nl> job - > AddEvent ( m_settings . GetBoolValue ( CSettings : : SETTING_PVRRECORD_TIMERNOTIFICATIONS ) , <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : GetNextReminderToAnnnounce ( ) <nl> return ret ; <nl> } <nl> <nl> - bool CPVRTimers : : KindMatchesTag ( const TimerKind & eKind , const CPVRTimerInfoTagPtr & tag ) const <nl> + bool CPVRTimers : : KindMatchesTag ( const TimerKind & eKind , const std : : shared_ptr < CPVRTimerInfoTag > & tag ) const <nl> { <nl> return ( eKind = = TimerKindAny ) | | <nl> ( eKind = = TimerKindTV & & ! tag - > m_bIsRadio ) | | <nl> std : : vector < std : : shared_ptr < CPVRTimerInfoTag > > CPVRTimers : : GetActiveTimers ( void ) <nl> { <nl> for ( VecTimerInfoTag : : const_iterator timerIt = it - > second . begin ( ) ; timerIt ! = it - > second . end ( ) ; + + timerIt ) <nl> { <nl> - CPVRTimerInfoTagPtr current = * timerIt ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > current = * timerIt ; <nl> if ( current - > IsActive ( ) & & <nl> ! current - > IsBroken ( ) & & <nl> ! current - > IsReminder ( ) & & <nl> int CPVRTimers : : AmountActiveRadioRecordings ( void ) const <nl> <nl> / * * * * * * * * * * channel methods * * * * * * * * * * / <nl> <nl> - bool CPVRTimers : : DeleteTimersOnChannel ( const CPVRChannelPtr & channel , bool bDeleteTimerRules / * = true * / , bool bCurrentlyActiveOnly / * = false * / ) <nl> + bool CPVRTimers : : DeleteTimersOnChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bDeleteTimerRules / * = true * / , bool bCurrentlyActiveOnly / * = false * / ) <nl> { <nl> bool bReturn = false ; <nl> bool bChanged = false ; <nl> std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : UpdateEntry ( const std : : shared_ptr < <nl> return bChanged ? tag : std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> - bool CPVRTimers : : AddTimer ( const CPVRTimerInfoTagPtr & tag ) <nl> + bool CPVRTimers : : AddTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & tag ) <nl> { <nl> bool bReturn = false ; <nl> if ( tag - > IsOwnedByClient ( ) ) <nl> bool CPVRTimers : : AddTimer ( const CPVRTimerInfoTagPtr & tag ) <nl> return bReturn ; <nl> } <nl> <nl> - TimerOperationResult CPVRTimers : : DeleteTimer ( const CPVRTimerInfoTagPtr & tag , bool bForce / * = false * / , bool bDeleteRule / * = false * / ) <nl> + TimerOperationResult CPVRTimers : : DeleteTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & tag , bool bForce / * = false * / , bool bDeleteRule / * = false * / ) <nl> { <nl> TimerOperationResult ret = TimerOperationResult : : FAILED ; <nl> if ( ! tag ) <nl> TimerOperationResult CPVRTimers : : DeleteTimer ( const CPVRTimerInfoTagPtr & tag , boo <nl> return ret ; <nl> } <nl> <nl> - bool CPVRTimers : : RenameTimer ( const CPVRTimerInfoTagPtr & tag , const std : : string & strNewName ) <nl> + bool CPVRTimers : : RenameTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & tag , const std : : string & strNewName ) <nl> { <nl> bool bReturn = false ; <nl> if ( tag - > IsOwnedByClient ( ) ) <nl> bool CPVRTimers : : RenameTimer ( const CPVRTimerInfoTagPtr & tag , const std : : string & <nl> return bReturn ; <nl> } <nl> <nl> - bool CPVRTimers : : UpdateTimer ( const CPVRTimerInfoTagPtr & tag ) <nl> + bool CPVRTimers : : UpdateTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & tag ) <nl> { <nl> bool bReturn = false ; <nl> if ( tag - > IsOwnedByClient ( ) ) <nl> bool CPVRTimers : : AddLocalTimer ( const std : : shared_ptr < CPVRTimerInfoTag > & tag , boo <nl> if ( persistedTimer - > IsEpgBased ( ) ) <nl> { <nl> / / create and persist children of local epg - based timer rule <nl> - const std : : vector < CPVREpgInfoTagPtr > epgTags = GetEpgTagsForTimerRule ( CPVRTimerRuleMatcher ( persistedTimer , <nl> + const std : : vector < std : : shared_ptr < CPVREpgInfoTag > > epgTags = GetEpgTagsForTimerRule ( CPVRTimerRuleMatcher ( persistedTimer , <nl> CDateTime : : GetUTCDateTime ( ) ) ) ; <nl> for ( const auto & epgTag : epgTags ) <nl> { <nl> bool CPVRTimers : : IsRecordingOnChannel ( const CPVRChannel & channel ) const <nl> return false ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr CPVRTimers : : GetActiveTimerForChannel ( const CPVRChannelPtr & channel ) const <nl> + std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : GetActiveTimerForChannel ( const std : : shared_ptr < CPVRChannel > & channel ) const <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> for ( const auto & tagsEntry : m_tags ) <nl> CPVRTimerInfoTagPtr CPVRTimers : : GetActiveTimerForChannel ( const CPVRChannelPtr & c <nl> } <nl> } <nl> <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr CPVRTimers : : GetTimerForEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const <nl> + std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : GetTimerForEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const <nl> { <nl> if ( epgTag ) <nl> { <nl> CPVRTimerInfoTagPtr CPVRTimers : : GetTimerForEpgTag ( const CPVREpgInfoTagPtr & epgTa <nl> } <nl> } <nl> <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr CPVRTimers : : GetTimerRule ( const CPVRTimerInfoTagPtr & timer ) const <nl> + std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : GetTimerRule ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const <nl> { <nl> if ( timer ) <nl> { <nl> CPVRTimerInfoTagPtr CPVRTimers : : GetTimerRule ( const CPVRTimerInfoTagPtr & timer ) c <nl> } <nl> } <nl> } <nl> - return CPVRTimerInfoTagPtr ( ) ; <nl> + return std : : shared_ptr < CPVRTimerInfoTag > ( ) ; <nl> } <nl> <nl> void CPVRTimers : : Notify ( const PVREvent & event ) <nl> std : : vector < std : : shared_ptr < CPVRTimerInfoTag > > CPVRTimers : : GetAll ( ) const <nl> return timers ; <nl> } <nl> <nl> - CPVRTimerInfoTagPtr CPVRTimers : : GetById ( unsigned int iTimerId ) const <nl> + std : : shared_ptr < CPVRTimerInfoTag > CPVRTimers : : GetById ( unsigned int iTimerId ) const <nl> { <nl> - CPVRTimerInfoTagPtr item ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > item ; <nl> CSingleLock lock ( m_critSection ) ; <nl> for ( MapTags : : const_iterator it = m_tags . begin ( ) ; ! item & & it ! = m_tags . end ( ) ; + + it ) <nl> { <nl> mmm a / xbmc / pvr / timers / PVRTimers . h <nl> ppp b / xbmc / pvr / timers / PVRTimers . h <nl> namespace PVR <nl> * @ param The timer tag <nl> * @ return True , if the update was successful . False , otherwise . <nl> * / <nl> - bool UpdateFromClient ( const CPVRTimerInfoTagPtr & timer ) ; <nl> + bool UpdateFromClient ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) ; <nl> <nl> / * ! <nl> * @ brief Get the timer tag denoted by given client id and timer id . <nl> namespace PVR <nl> * @ param iClientIndex The timer id . <nl> * @ return the timer tag if found , null otherwise . <nl> * / <nl> - CPVRTimerInfoTagPtr GetByClient ( int iClientId , int iClientIndex ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetByClient ( int iClientId , int iClientIndex ) const ; <nl> <nl> - typedef std : : vector < CPVRTimerInfoTagPtr > VecTimerInfoTag ; <nl> + typedef std : : vector < std : : shared_ptr < CPVRTimerInfoTag > > VecTimerInfoTag ; <nl> typedef std : : map < CDateTime , VecTimerInfoTag > MapTags ; <nl> <nl> / * ! <nl> namespace PVR <nl> * @ param channel The channel to check . <nl> * @ return the timer , null otherwise . <nl> * / <nl> - CPVRTimerInfoTagPtr GetActiveTimerForChannel ( const CPVRChannelPtr & channel ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetActiveTimerForChannel ( const std : : shared_ptr < CPVRChannel > & channel ) const ; <nl> <nl> / * ! <nl> * @ return The amount of tv and radio timers that are currently recording <nl> namespace PVR <nl> * @ param bCurrentlyActiveOnly True to delete timers that are currently running only . <nl> * @ return True if timers any were deleted , false otherwise . <nl> * / <nl> - bool DeleteTimersOnChannel ( const CPVRChannelPtr & channel , bool bDeleteTimerRules = true , bool bCurrentlyActiveOnly = false ) ; <nl> + bool DeleteTimersOnChannel ( const std : : shared_ptr < CPVRChannel > & channel , bool bDeleteTimerRules = true , bool bCurrentlyActiveOnly = false ) ; <nl> <nl> / * ! <nl> * @ return Next event time ( timer or daily wake up ) <nl> namespace PVR <nl> * @ param epgTag The epg tag . <nl> * @ return The requested timer tag , or nullptr if none was found . <nl> * / <nl> - CPVRTimerInfoTagPtr GetTimerForEpgTag ( const CPVREpgInfoTagPtr & epgTag ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetTimerForEpgTag ( const std : : shared_ptr < CPVREpgInfoTag > & epgTag ) const ; <nl> <nl> / * ! <nl> * @ brief Get the timer rule for a given timer tag <nl> * @ param timer The timer to query the timer rule for <nl> * @ return The timer rule , or nullptr if none was found . <nl> * / <nl> - CPVRTimerInfoTagPtr GetTimerRule ( const CPVRTimerInfoTagPtr & timer ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetTimerRule ( const std : : shared_ptr < CPVRTimerInfoTag > & timer ) const ; <nl> <nl> / * ! <nl> * @ brief Update the channel pointers . <nl> namespace PVR <nl> * @ param iTimerId The ID to find <nl> * @ return The tag , or an empty one when not found <nl> * / <nl> - CPVRTimerInfoTagPtr GetById ( unsigned int iTimerId ) const ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > GetById ( unsigned int iTimerId ) const ; <nl> <nl> private : <nl> void Process ( ) override ; <nl> namespace PVR <nl> TimerKindRadio <nl> } ; <nl> <nl> - bool KindMatchesTag ( const TimerKind & eKind , const CPVRTimerInfoTagPtr & tag ) const ; <nl> + bool KindMatchesTag ( const TimerKind & eKind , const std : : shared_ptr < CPVRTimerInfoTag > & tag ) const ; <nl> <nl> std : : shared_ptr < CPVRTimerInfoTag > GetNextActiveTimer ( const TimerKind & eKind , bool bIgnoreReminders ) const ; <nl> int AmountActiveTimers ( const TimerKind & eKind ) const ; <nl> mmm a / xbmc / pvr / windows / GUIEPGGridContainer . cpp <nl> ppp b / xbmc / pvr / windows / GUIEPGGridContainer . cpp <nl> void CGUIEPGGridContainer : : UpdateItems ( ) <nl> return ; <nl> <nl> / * Safe currently selected epg tag and grid coordinates . Selection shall be restored after update . * / <nl> - CPVREpgInfoTagPtr prevSelectedEpgTag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > prevSelectedEpgTag ; <nl> if ( m_item ) <nl> prevSelectedEpgTag = m_item - > item - > GetEPGInfoTag ( ) ; <nl> <nl> void CGUIEPGGridContainer : : UpdateItems ( ) <nl> const GridItem * prevItem ( GetPrevItem ( m_channelCursor ) ) ; <nl> if ( prevItem ) <nl> { <nl> - const CPVREpgInfoTagPtr tag ( prevItem - > item - > GetEPGInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > tag ( prevItem - > item - > GetEPGInfoTag ( ) ) ; <nl> if ( tag & & tag - > EndAsUTC ( ) . IsValid ( ) ) <nl> { <nl> if ( oldGridStart > = tag - > StartAsUTC ( ) ) <nl> bool CGUIEPGGridContainer : : SetChannel ( const std : : string & channel ) <nl> return false ; <nl> } <nl> <nl> - bool CGUIEPGGridContainer : : SetChannel ( const CPVRChannelPtr & channel ) <nl> + bool CGUIEPGGridContainer : : SetChannel ( const std : : shared_ptr < CPVRChannel > & channel ) <nl> { <nl> for ( int iIndex = 0 ; iIndex < m_gridModel - > ChannelItemsSize ( ) ; iIndex + + ) <nl> { <nl> bool CGUIEPGGridContainer : : OnMouseWheel ( char wheel , const CPoint & point ) <nl> return true ; <nl> } <nl> <nl> - CPVRChannelPtr CGUIEPGGridContainer : : GetSelectedChannel ( ) const <nl> + std : : shared_ptr < CPVRChannel > CGUIEPGGridContainer : : GetSelectedChannel ( ) const <nl> { <nl> CFileItemPtr fileItem ; <nl> { <nl> CPVRChannelPtr CGUIEPGGridContainer : : GetSelectedChannel ( ) const <nl> if ( fileItem & & fileItem - > HasPVRChannelInfoTag ( ) ) <nl> return fileItem - > GetPVRChannelInfoTag ( ) ; <nl> <nl> - return CPVRChannelPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannel > ( ) ; <nl> } <nl> <nl> CDateTime CGUIEPGGridContainer : : GetSelectedDate ( ) const <nl> mmm a / xbmc / pvr / windows / GUIEPGGridContainerModel . cpp <nl> ppp b / xbmc / pvr / windows / GUIEPGGridContainerModel . cpp <nl> void CGUIEPGGridContainerModel : : Initialize ( const std : : unique_ptr < CFileItemList > <nl> int itemSize = 1 ; / / size of the programme in blocks <nl> int savedBlock = 0 ; <nl> CFileItemPtr item ; <nl> - CPVREpgInfoTagPtr tag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> <nl> for ( int block = 0 ; block < m_blocks ; + + block ) <nl> { <nl> void CGUIEPGGridContainerModel : : FindChannelAndBlockIndex ( int channelUid , unsigne <nl> unsigned long progIdx = m_epgItemsPtr [ newChannelIndex ] . start ; <nl> unsigned long lastIdx = m_epgItemsPtr [ newChannelIndex ] . stop ; <nl> int iEpgId = m_programmeItems [ progIdx ] - > GetEPGInfoTag ( ) - > EpgID ( ) ; <nl> - CPVREpgInfoTagPtr tag ; <nl> + std : : shared_ptr < CPVREpgInfoTag > tag ; <nl> for ( int block = 0 ; block < m_blocks ; + + block ) <nl> { <nl> while ( progIdx < = lastIdx ) <nl> int CGUIEPGGridContainerModel : : GetNowBlock ( ) const <nl> return GetBlock ( CDateTime : : GetUTCDateTime ( ) ) - GetPageNowOffset ( ) ; <nl> } <nl> <nl> - int CGUIEPGGridContainerModel : : GetFirstEventBlock ( const CPVREpgInfoTagPtr & event ) const <nl> + int CGUIEPGGridContainerModel : : GetFirstEventBlock ( const std : : shared_ptr < CPVREpgInfoTag > & event ) const <nl> { <nl> const CDateTime eventStart = event - > StartAsUTC ( ) ; <nl> int diff ; <nl> int CGUIEPGGridContainerModel : : GetFirstEventBlock ( const CPVREpgInfoTagPtr & event <nl> return std : : ceil ( fBlockIndex ) ; <nl> } <nl> <nl> - int CGUIEPGGridContainerModel : : GetLastEventBlock ( const CPVREpgInfoTagPtr & event ) const <nl> + int CGUIEPGGridContainerModel : : GetLastEventBlock ( const std : : shared_ptr < CPVREpgInfoTag > & event ) const <nl> { <nl> / / Last block of a tag is always the block calculated using event ' s end time , not rounded up . <nl> / / Refer to CGUIEPGGridContainerModel : : Refresh , where the model is created , for details ! <nl> mmm a / xbmc / pvr / windows / GUIEPGGridContainerModel . h <nl> ppp b / xbmc / pvr / windows / GUIEPGGridContainerModel . h <nl> namespace PVR <nl> <nl> CDateTime GetStartTimeForBlock ( int block ) const ; <nl> int GetBlock ( const CDateTime & datetime ) const ; <nl> - int GetFirstEventBlock ( const CPVREpgInfoTagPtr & event ) const ; <nl> - int GetLastEventBlock ( const CPVREpgInfoTagPtr & event ) const ; <nl> + int GetFirstEventBlock ( const std : : shared_ptr < CPVREpgInfoTag > & event ) const ; <nl> + int GetLastEventBlock ( const std : : shared_ptr < CPVREpgInfoTag > & event ) const ; <nl> <nl> private : <nl> void FreeItemsMemory ( ) ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRBase . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRBase . cpp <nl> class CGUIPVRChannelGroupsSelector <nl> bool Initialize ( CGUIWindow * parent , bool bRadio ) ; <nl> <nl> bool HasFocus ( ) const ; <nl> - CPVRChannelGroupPtr GetSelectedChannelGroup ( ) const ; <nl> - bool SelectChannelGroup ( const CPVRChannelGroupPtr & newGroup ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetSelectedChannelGroup ( ) const ; <nl> + bool SelectChannelGroup ( const std : : shared_ptr < CPVRChannelGroup > & newGroup ) ; <nl> <nl> private : <nl> CGUIControl * m_control = nullptr ; <nl> - std : : vector < CPVRChannelGroupPtr > m_channelGroups ; <nl> + std : : vector < std : : shared_ptr < CPVRChannelGroup > > m_channelGroups ; <nl> } ; <nl> <nl> } / / namespace PVR <nl> bool CGUIPVRChannelGroupsSelector : : HasFocus ( ) const <nl> return m_control & & m_control - > HasFocus ( ) ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CGUIPVRChannelGroupsSelector : : GetSelectedChannelGroup ( ) const <nl> + std : : shared_ptr < CPVRChannelGroup > CGUIPVRChannelGroupsSelector : : GetSelectedChannelGroup ( ) const <nl> { <nl> if ( m_control ) <nl> { <nl> CPVRChannelGroupPtr CGUIPVRChannelGroupsSelector : : GetSelectedChannelGroup ( ) cons <nl> return * it ; <nl> } <nl> } <nl> - return CPVRChannelGroupPtr ( ) ; <nl> + return std : : shared_ptr < CPVRChannelGroup > ( ) ; <nl> } <nl> <nl> - bool CGUIPVRChannelGroupsSelector : : SelectChannelGroup ( const CPVRChannelGroupPtr & newGroup ) <nl> + bool CGUIPVRChannelGroupsSelector : : SelectChannelGroup ( const std : : shared_ptr < CPVRChannelGroup > & newGroup ) <nl> { <nl> if ( m_control & & newGroup ) <nl> { <nl> bool CGUIWindowPVRBase : : OpenChannelGroupSelectionDialog ( void ) <nl> dialog - > SetHeading ( CVariant { g_localizeStrings . Get ( 19146 ) } ) ; <nl> dialog - > SetItems ( options ) ; <nl> dialog - > SetMultiSelection ( false ) ; <nl> - if ( const CPVRChannelGroupPtr channelGroup = GetChannelGroup ( ) ) <nl> + if ( const std : : shared_ptr < CPVRChannelGroup > channelGroup = GetChannelGroup ( ) ) <nl> { <nl> dialog - > SetSelected ( channelGroup - > GroupName ( ) ) ; <nl> } <nl> bool CGUIWindowPVRBase : : InitChannelGroup ( ) <nl> return false ; <nl> } <nl> <nl> - CPVRChannelGroupPtr CGUIWindowPVRBase : : GetChannelGroup ( void ) <nl> + std : : shared_ptr < CPVRChannelGroup > CGUIWindowPVRBase : : GetChannelGroup ( void ) <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> return m_channelGroup ; <nl> } <nl> <nl> - void CGUIWindowPVRBase : : SetChannelGroup ( CPVRChannelGroupPtr & & group , bool bUpdate / * = true * / ) <nl> + void CGUIWindowPVRBase : : SetChannelGroup ( std : : shared_ptr < CPVRChannelGroup > & & group , bool bUpdate / * = true * / ) <nl> { <nl> if ( ! group ) <nl> return ; <nl> <nl> - CPVRChannelGroupPtr updateChannelGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > updateChannelGroup ; <nl> { <nl> CSingleLock lock ( m_critSection ) ; <nl> if ( m_channelGroup ! = group ) <nl> void CGUIWindowPVRBase : : UpdateButtons ( void ) <nl> { <nl> CGUIMediaWindow : : UpdateButtons ( ) ; <nl> <nl> - const CPVRChannelGroupPtr channelGroup = GetChannelGroup ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > channelGroup = GetChannelGroup ( ) ; <nl> if ( channelGroup ) <nl> { <nl> SET_CONTROL_LABEL ( CONTROL_BTNCHANNELGROUPS , g_localizeStrings . Get ( 19141 ) + " : " + channelGroup - > GroupName ( ) ) ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRBase . h <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRBase . h <nl> namespace PVR <nl> * @ brief Get the channel group for this window . <nl> * @ return the group or null , if no group set . <nl> * / <nl> - CPVRChannelGroupPtr GetChannelGroup ( void ) ; <nl> + std : : shared_ptr < CPVRChannelGroup > GetChannelGroup ( void ) ; <nl> <nl> / * ! <nl> * @ brief Set a new channel group , start listening to this group , optionally update window content . <nl> * @ param group The new group . <nl> * @ param bUpdate if true , window content will be updated . <nl> * / <nl> - void SetChannelGroup ( CPVRChannelGroupPtr & & group , bool bUpdate = true ) ; <nl> + void SetChannelGroup ( std : : shared_ptr < CPVRChannelGroup > & & group , bool bUpdate = true ) ; <nl> <nl> virtual void UpdateSelectedItemPath ( ) ; <nl> <nl> namespace PVR <nl> void HideProgressDialog ( void ) ; <nl> <nl> std : : unique_ptr < CGUIPVRChannelGroupsSelector > m_channelGroupsSelector ; <nl> - CPVRChannelGroupPtr m_channelGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > m_channelGroup ; <nl> XbmcThreads : : EndTime m_refreshTimeout ; <nl> CGUIDialogProgressBarHandle * m_progressHandle ; / * ! < progress dialog that is displayed while the pvr manager is loading * / <nl> } ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRChannels . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRChannels . cpp <nl> bool CGUIWindowPVRChannelsBase : : OnContextButtonManage ( const CFileItemPtr & item , <nl> <nl> void CGUIWindowPVRChannelsBase : : UpdateEpg ( const CFileItemPtr & item ) <nl> { <nl> - const CPVRChannelPtr channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannel > channel ( item - > GetPVRChannelInfoTag ( ) ) ; <nl> <nl> if ( ! CGUIDialogYesNo : : ShowAndGetInput ( CVariant { 19251 } , / / " Update guide information " <nl> CVariant { 19252 } , / / " Schedule guide update for this channel ? " <nl> void CGUIWindowPVRChannelsBase : : UpdateEpg ( const CFileItemPtr & item ) <nl> CVariant { channel - > ChannelName ( ) } ) ) <nl> return ; <nl> <nl> - const CPVREpgPtr epg = channel - > GetEPG ( ) ; <nl> + const std : : shared_ptr < CPVREpg > epg = channel - > GetEPG ( ) ; <nl> if ( epg ) <nl> { <nl> epg - > ForceUpdate ( ) ; <nl> void CGUIWindowPVRChannelsBase : : OnInputDone ( ) <nl> <nl> void CGUIWindowPVRChannelsBase : : GetChannelNumbers ( std : : vector < std : : string > & channelNumbers ) <nl> { <nl> - const CPVRChannelGroupPtr group = GetChannelGroup ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = GetChannelGroup ( ) ; <nl> if ( group ) <nl> group - > GetChannelNumbers ( channelNumbers ) ; <nl> } <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRGuide . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRGuide . cpp <nl> void CGUIWindowPVRGuideBase : : UpdateSelectedItemPath ( ) <nl> CGUIEPGGridContainer * epgGridContainer = GetGridControl ( ) ; <nl> if ( epgGridContainer ) <nl> { <nl> - CPVRChannelPtr channel ( epgGridContainer - > GetSelectedChannel ( ) ) ; <nl> + std : : shared_ptr < CPVRChannel > channel ( epgGridContainer - > GetSelectedChannel ( ) ) ; <nl> if ( channel ) <nl> CServiceBroker : : GetPVRManager ( ) . GUIActions ( ) - > SetSelectedItemPath ( m_bRadio , channel - > Path ( ) ) ; <nl> } <nl> bool CGUIWindowPVRGuideBase : : OnMessage ( CGUIMessage & message ) <nl> break ; <nl> case EPG_SELECT_ACTION_SMART_SELECT : <nl> { <nl> - const CPVREpgInfoTagPtr tag ( pItem - > GetEPGInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > tag ( pItem - > GetEPGInfoTag ( ) ) ; <nl> if ( tag ) <nl> { <nl> const CDateTime start ( tag - > StartAsUTC ( ) ) ; <nl> bool CGUIWindowPVRGuideBase : : RefreshTimelineItems ( ) <nl> CGUIEPGGridContainer * epgGridContainer = GetGridControl ( ) ; <nl> if ( epgGridContainer ) <nl> { <nl> - const CPVRChannelGroupPtr group ( GetChannelGroup ( ) ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group ( GetChannelGroup ( ) ) ; <nl> if ( ! group ) <nl> return false ; <nl> <nl> void CGUIWindowPVRGuideBase : : OnInputDone ( ) <nl> <nl> void CGUIWindowPVRGuideBase : : GetChannelNumbers ( std : : vector < std : : string > & channelNumbers ) <nl> { <nl> - const CPVRChannelGroupPtr group = GetChannelGroup ( ) ; <nl> + const std : : shared_ptr < CPVRChannelGroup > group = GetChannelGroup ( ) ; <nl> if ( group ) <nl> group - > GetChannelNumbers ( channelNumbers ) ; <nl> } <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRGuide . h <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRGuide . h <nl> namespace PVR <nl> std : : atomic_bool m_bRefreshTimelineItems ; <nl> std : : atomic_bool m_bSyncRefreshTimelineItems ; <nl> <nl> - CPVRChannelGroupPtr m_cachedChannelGroup ; <nl> + std : : shared_ptr < CPVRChannelGroup > m_cachedChannelGroup ; <nl> std : : unique_ptr < CFileItemList > m_newTimeline ; <nl> <nl> bool m_bChannelSelectionRestored ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRRecordings . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRRecordings . cpp <nl> void CGUIWindowPVRRecordingsBase : : GetContextButtons ( int itemNumber , CContextButt <nl> <nl> bool isDeletedRecording = false ; <nl> <nl> - CPVRRecordingPtr recording ( pItem - > GetPVRRecordingInfoTag ( ) ) ; <nl> + std : : shared_ptr < CPVRRecording > recording ( pItem - > GetPVRRecordingInfoTag ( ) ) ; <nl> if ( recording ) <nl> { <nl> isDeletedRecording = recording - > IsDeleted ( ) ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRSearch . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRSearch . cpp <nl> void CGUIWindowPVRSearchBase : : SetItemToSearch ( const CFileItemPtr & item ) <nl> } <nl> else <nl> { <nl> - const CPVREpgInfoTagPtr epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> + const std : : shared_ptr < CPVREpgInfoTag > epgTag ( CPVRItem ( item ) . GetEpgInfoTag ( ) ) ; <nl> if ( epgTag & & ! CServiceBroker : : GetPVRManager ( ) . IsParentalLocked ( epgTag ) ) <nl> m_searchfilter - > SetSearchPhrase ( epgTag - > Title ( ) ) ; <nl> } <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRTimersBase . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRTimersBase . cpp <nl> void CGUIWindowPVRTimersBase : : UpdateButtons ( void ) <nl> std : : string strHeaderTitle ; <nl> if ( m_currentFileItem & & m_currentFileItem - > HasPVRTimerInfoTag ( ) ) <nl> { <nl> - CPVRTimerInfoTagPtr timer = m_currentFileItem - > GetPVRTimerInfoTag ( ) ; <nl> + std : : shared_ptr < CPVRTimerInfoTag > timer = m_currentFileItem - > GetPVRTimerInfoTag ( ) ; <nl> strHeaderTitle = timer - > Title ( ) ; <nl> } <nl> <nl>
Refactor out CPVR * Ptr classes in pvr source folder
xbmc/xbmc
328f69a7049ceeeb31ef5f3c0efc8c965379ad3f
2019-09-26T16:28:33Z
mmm a / trunk / src / app / srs_app_mpegts_udp . cpp <nl> ppp b / trunk / src / app / srs_app_mpegts_udp . cpp <nl> int SrsMpegtsOverUdp : : on_ts_video ( SrsTsMessage * msg , SrsStream * avs ) <nl> int ibpframe_size = avs - > size ( ) - avs - > pos ( ) ; <nl> <nl> / / send each frame . <nl> + bool got_sps_pps = false ; <nl> while ( ! avs - > empty ( ) ) { <nl> char * frame = NULL ; <nl> int frame_size = 0 ; <nl> int SrsMpegtsOverUdp : : on_ts_video ( SrsTsMessage * msg , SrsStream * avs ) <nl> <nl> / / for sps <nl> if ( avc - > is_sps ( frame , frame_size ) ) { <nl> + got_sps_pps = true ; <nl> + <nl> std : : string sps ; <nl> if ( ( ret = avc - > sps_demux ( frame , frame_size , sps ) ) ! = ERROR_SUCCESS ) { <nl> return ret ; <nl> int SrsMpegtsOverUdp : : on_ts_video ( SrsTsMessage * msg , SrsStream * avs ) <nl> <nl> / / for pps <nl> if ( avc - > is_pps ( frame , frame_size ) ) { <nl> + got_sps_pps = true ; <nl> + <nl> std : : string pps ; <nl> if ( ( ret = avc - > pps_demux ( frame , frame_size , pps ) ) ! = ERROR_SUCCESS ) { <nl> return ret ; <nl> int SrsMpegtsOverUdp : : on_ts_video ( SrsTsMessage * msg , SrsStream * avs ) <nl> } <nl> continue ; <nl> } <nl> - <nl> - / / regenerat the ibp frame . <nl> - if ( ! avs - > empty ( ) ) { <nl> - ibpframe = avs - > data ( ) + avs - > pos ( ) ; <nl> - ibpframe_size = avs - > size ( ) - avs - > pos ( ) ; <nl> - } else { <nl> - srs_info ( " mpegts : sps / pps frame consumed . " ) ; <nl> - return ret ; <nl> - } <nl> <nl> break ; <nl> } <nl> + <nl> + / / not ibp frame , ignore for already sent . <nl> + if ( got_sps_pps ) { <nl> + srs_info ( " mpegts : already send the sps / pps . " ) ; <nl> + return ret ; <nl> + } <nl> <nl> / / ibp frame . <nl> srs_info ( " mpegts : demux avc ibp frame size = % d , dts = % d " , ibpframe_size , dts ) ; <nl> mmm a / trunk / src / kernel / srs_kernel_flv . cpp <nl> ppp b / trunk / src / kernel / srs_kernel_flv . cpp <nl> int SrsFlvEncoder : : write_header ( char flv_header [ 9 ] ) <nl> return ret ; <nl> } <nl> <nl> + / / previous tag size . <nl> char pts [ ] = { ( char ) 0x00 , ( char ) 0x00 , ( char ) 0x00 , ( char ) 0x00 } ; <nl> if ( ( ret = _fs - > write ( pts , 4 , NULL ) ) ! = ERROR_SUCCESS ) { <nl> return ret ; <nl>
ignore when sps / pps consumed all frame .
ossrs/srs
1401f2e0ab3549be8fa6bb68c5bf15ea465b15b3
2015-03-26T03:07:45Z
mmm a / tensorflow / contrib / kfac / python / ops / fisher_factors . py <nl> ppp b / tensorflow / contrib / kfac / python / ops / fisher_factors . py <nl> def set_global_constants ( init_covariances_at_zero = None , <nl> eigenvalue_clipping_threshold = None , <nl> max_num_outer_products_per_cov_row = None , <nl> sub_sample_outer_products = None , <nl> - inputs_to_extract_ptaches_factor = None , <nl> + inputs_to_extract_patches_factor = None , <nl> sub_sample_inputs = None , <nl> tower_strategy = None ) : <nl> " " " Sets various global constants used by the classes in this module . " " " <nl> def set_global_constants ( init_covariances_at_zero = None , <nl> _MAX_NUM_OUTER_PRODUCTS_PER_COV_ROW = max_num_outer_products_per_cov_row <nl> if sub_sample_outer_products is not None : <nl> _SUB_SAMPLE_OUTER_PRODUCTS = sub_sample_outer_products <nl> - if inputs_to_extract_ptaches_factor is not None : <nl> - _INPUTS_TO_EXTRACT_PATCHES_FACTOR = inputs_to_extract_ptaches_factor <nl> + if inputs_to_extract_patches_factor is not None : <nl> + _INPUTS_TO_EXTRACT_PATCHES_FACTOR = inputs_to_extract_patches_factor <nl> if sub_sample_inputs is not None : <nl> _SUB_SAMPLE_INPUTS = sub_sample_inputs <nl> if tower_strategy is not None : <nl>
BUGFIX : Correct a typo in fisher_factors . py .
tensorflow/tensorflow
04eddab6c926890133ca6f3a11a3ac5fd4b7a6d4
2018-04-25T14:38:04Z
mmm a / dbms / src / Storages / MergeTree / MergeTreeData . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeData . cpp <nl> <nl> <nl> # include < Poco / DirectoryIterator . h > <nl> <nl> + # include < boost / range / adaptor / filtered . hpp > <nl> + <nl> # include < algorithm > <nl> # include < iomanip > <nl> # include < thread > <nl> String MergeTreeData : : MergingParams : : getModeName ( ) const <nl> { <nl> switch ( mode ) <nl> { <nl> - case Ordinary : return " " ; <nl> - case Collapsing : return " Collapsing " ; <nl> - case Summing : return " Summing " ; <nl> - case Aggregating : return " Aggregating " ; <nl> - case Unsorted : return " Unsorted " ; <nl> + case Ordinary : return " " ; <nl> + case Collapsing : return " Collapsing " ; <nl> + case Summing : return " Summing " ; <nl> + case Aggregating : return " Aggregating " ; <nl> + case Unsorted : return " Unsorted " ; <nl> case Replacing : return " Replacing " ; <nl> - case Graphite : return " Graphite " ; <nl> + case Graphite : return " Graphite " ; <nl> <nl> default : <nl> throw Exception ( " Unknown mode of operation for MergeTreeData : " + toString < int > ( mode ) , ErrorCodes : : LOGICAL_ERROR ) ; <nl> String MergeTreeData : : MergingParams : : getModeName ( ) const <nl> <nl> Int64 MergeTreeData : : getMaxDataPartIndex ( ) <nl> { <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> + std : : lock_guard < std : : mutex > lock_all ( data_parts_mutex ) ; <nl> <nl> Int64 max_block_id = 0 ; <nl> - for ( const auto & part : all_data_parts ) <nl> + for ( const auto & part : data_parts ) <nl> max_block_id = std : : max ( max_block_id , part - > info . max_block ) ; <nl> <nl> return max_block_id ; <nl> void MergeTreeData : : loadDataParts ( bool skip_sanity_checks ) <nl> LOG_DEBUG ( log , " Loading data parts " ) ; <nl> <nl> std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> + / / std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> <nl> data_parts . clear ( ) ; <nl> - all_data_parts . clear ( ) ; <nl> + / / all_data_parts . clear ( ) ; <nl> <nl> Strings part_file_names ; <nl> Poco : : DirectoryIterator end ; <nl> void MergeTreeData : : loadDataParts ( bool skip_sanity_checks ) <nl> } <nl> <nl> part - > modification_time = Poco : : File ( full_path + file_name ) . getLastModified ( ) . epochTime ( ) ; <nl> + part - > state = DataPartState : : Committed ; <nl> <nl> data_parts . insert ( part ) ; <nl> } <nl> void MergeTreeData : : loadDataParts ( bool skip_sanity_checks ) <nl> for ( auto & part : broken_parts_to_detach ) <nl> part - > renameAddPrefix ( true , " " ) ; <nl> <nl> - all_data_parts = data_parts ; <nl> + / / all_data_parts = data_parts ; <nl> <nl> / / / Delete from the set of current parts those parts that are covered by another part ( those parts that <nl> / / / were merged ) , but that for some reason are still not deleted from the filesystem . <nl> MergeTreeData : : DataPartsVector MergeTreeData : : grabOldParts ( ) <nl> time_t now = time ( nullptr ) ; <nl> <nl> { <nl> - std : : lock_guard < std : : mutex > lock_all_parts ( all_data_parts_mutex ) ; <nl> + std : : lock_guard < std : : mutex > lock_parts ( data_parts_mutex ) ; <nl> <nl> - for ( auto it = all_data_parts . begin ( ) ; it ! = all_data_parts . end ( ) ; ) <nl> + for ( auto it = data_parts . begin ( ) ; it ! = data_parts . end ( ) ; + + it ) <nl> { <nl> - if ( it - > unique ( ) & & / / / After this ref_count cannot increase . <nl> + if ( ( * it ) - > state = = DataPartState : : Outdated & & <nl> + it - > unique ( ) & & / / / Grab only parts that is not using by anyone ( SELECTs for example ) <nl> ( * it ) - > remove_time < now & & <nl> now - ( * it ) - > remove_time > settings . old_parts_lifetime . totalSeconds ( ) ) <nl> { <nl> + ( * it ) - > state = DataPartState : : Deleting ; <nl> res . push_back ( * it ) ; <nl> - all_data_parts . erase ( it + + ) ; <nl> } <nl> - else <nl> - + + it ; <nl> } <nl> } <nl> <nl> MergeTreeData : : DataPartsVector MergeTreeData : : grabOldParts ( ) <nl> } <nl> <nl> <nl> - void MergeTreeData : : addOldParts ( const MergeTreeData : : DataPartsVector & parts ) <nl> + void MergeTreeData : : rollbackDeletingParts ( const MergeTreeData : : DataPartsVector & parts ) <nl> + { <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + for ( auto & part : parts ) <nl> + { <nl> + / / / We should modify it under data_parts_mutex <nl> + part - > checkState ( { DataPartState : : Deleting } ) ; <nl> + part - > state = DataPartState : : Outdated ; <nl> + } <nl> + } <nl> + <nl> + void MergeTreeData : : removePartsFinally ( const MergeTreeData : : DataPartsVector & parts ) <nl> { <nl> - std : : lock_guard < std : : mutex > lock ( all_data_parts_mutex ) ; <nl> - all_data_parts . insert ( parts . begin ( ) , parts . end ( ) ) ; <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + <nl> + / / / TODO : use data_parts iterators instead of pointers <nl> + for ( auto & part : parts ) <nl> + { <nl> + if ( part - > state ! = DataPartState : : Deleting ) <nl> + throw Exception ( " An attempt to delete part " + part - > getNameWithState ( ) + " with unexpected state " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + <nl> + auto it = data_parts . find ( part ) ; <nl> + if ( it = = data_parts . end ( ) ) <nl> + throw Exception ( " Deleting data part " + part - > name + " is not exist " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + <nl> + data_parts . erase ( it ) ; <nl> + } <nl> } <nl> <nl> void MergeTreeData : : clearOldParts ( ) <nl> void MergeTreeData : : dropAllData ( ) <nl> LOG_TRACE ( log , " dropAllData : waiting for locks . " ) ; <nl> <nl> std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> + / / std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> <nl> LOG_TRACE ( log , " dropAllData : removing data from memory . " ) ; <nl> <nl> data_parts . clear ( ) ; <nl> - all_data_parts . clear ( ) ; <nl> + / / all_data_parts . clear ( ) ; <nl> column_sizes . clear ( ) ; <nl> <nl> context . dropCaches ( ) ; <nl> void MergeTreeData : : renameTempPartAndAdd ( MutableDataPartPtr & part , SimpleIncrem <nl> + " existing part ( s ) ( including " + removed [ 0 ] - > name + " ) " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> } <nl> <nl> + <nl> + <nl> MergeTreeData : : DataPartsVector MergeTreeData : : renameTempPartAndReplace ( <nl> MutableDataPartPtr & part , SimpleIncrement * increment , Transaction * out_transaction ) <nl> { <nl> if ( out_transaction & & out_transaction - > data ) <nl> throw Exception ( " Using the same MergeTreeData : : Transaction for overlapping transactions is invalid " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> - if ( part - > state ! = MergeTreeDataPart : : State : : Temporary ) <nl> - throw Exception ( " Unexpected state of part " + part - > name , ErrorCodes : : LOGICAL_ERROR ) ; <nl> - <nl> - / / / ReplicatedMergeTree engines ( that use out_transaction ) don ' t commit part immediately <nl> - auto res_state = ( out_transaction ) ? MergeTreeDataPart : : State : : Precommitted : MergeTreeDataPart : : State : : Committed ; <nl> + part - > checkState ( { DataPartState : : Temporary } ) ; <nl> <nl> DataPartsVector replaced ; <nl> { <nl> MergeTreeData : : DataPartsVector MergeTreeData : : renameTempPartAndReplace ( <nl> <nl> LOG_TRACE ( log , " Renaming temporary part " < < part - > relative_path < < " to " < < new_name < < " . " ) ; <nl> <nl> - if ( data_parts . count ( part ) ) <nl> - throw Exception ( " Part " + new_name + " already exists " , ErrorCodes : : DUPLICATE_DATA_PART ) ; <nl> - <nl> - bool in_all_data_parts ; <nl> + auto it_duplicate = data_parts . find ( part ) ; <nl> + if ( it_duplicate ! = data_parts . end ( ) ) <nl> { <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> - in_all_data_parts = all_data_parts . count ( part ) ! = 0 ; <nl> + String message = " Part " + ( * it_duplicate ) - > getNameWithState ( ) + " already exists " ; <nl> + if ( ( * it_duplicate ) - > tryCheckState ( { DataPartState : : Outdated , DataPartState : : Deleting } ) ) <nl> + message + = " , but it will be deleted soon " ; <nl> + <nl> + throw Exception ( message , ErrorCodes : : DUPLICATE_DATA_PART ) ; <nl> } <nl> - / / / New part can be removed from data_parts but not from filesystem and ZooKeeper <nl> - if ( in_all_data_parts ) <nl> - clearOldPartsAndRemoveFromZK ( ) ; <nl> - <nl> - / / / Rename the part . <nl> - / / / TODO : What if it is obsolete ? <nl> - part - > renameTo ( new_name ) ; <nl> - part - > is_temp = false ; <nl> + <nl> + / / / Rename the part only in memory . Will rename it on disk only if all check is passed . <nl> + / / / It allows us maintain invariant : if non - temporary parts in filesystem then they are in data_parts <nl> part - > name = new_name ; <nl> <nl> - bool obsolete = false ; / / / Is the part covered by some other part ? <nl> + / / / Is the part covered by some other part ? <nl> + bool obsolete = false ; <nl> + <nl> + auto check_replacing_part_state = [ & ] ( const DataPartPtr & cur_part ) <nl> + { <nl> + cur_part - > checkState ( { DataPartState : : PreCommitted , DataPartState : : Committed } ) ; <nl> + if ( cur_part - > state = = DataPartState : : PreCommitted ) <nl> + throw Exception ( " Could not add part " + new_name + " while replacing part " + cur_part - > name + " is in pre - committed state " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + } ; <nl> + <nl> + / / / Don ' t consider parts going to be deleted <nl> + auto active_parts = getDataPartsRange ( { DataPartState : : Committed , DataPartState : : PreCommitted } ) ; <nl> + / / / Parts contained in the part are consecutive in data_parts , intersecting the insertion place for the part itself . <nl> + auto it_middle = active_parts . convert ( data_parts . lower_bound ( part ) ) ; <nl> <nl> - / / / Parts contained in the part are consecutive in data_parts , intersecting the insertion place <nl> - / / / for the part itself . <nl> - auto it = data_parts . lower_bound ( part ) ; <nl> / / / Go to the left . <nl> - while ( it ! = data_parts . begin ( ) ) <nl> + for ( auto it = it_middle ; it ! = active_parts . begin ( ) ; ) <nl> { <nl> - - it ; <nl> + <nl> if ( ! part - > contains ( * * it ) ) <nl> { <nl> if ( ( * it ) - > contains ( * part ) ) <nl> MergeTreeData : : DataPartsVector MergeTreeData : : renameTempPartAndReplace ( <nl> + + it ; <nl> break ; <nl> } <nl> + <nl> + check_replacing_part_state ( * it ) ; <nl> replaced . push_back ( * it ) ; <nl> - ( * it ) - > remove_time = time ( nullptr ) ; <nl> - ( * it ) - > state = MergeTreeDataPart : : State : : Outdated ; <nl> - removePartContributionToColumnSizes ( * it ) ; <nl> - data_parts . erase ( it + + ) ; / / / Yes , + + , not - - . <nl> + / / replaced . push_back ( * it ) ; <nl> + / / ( * it ) - > remove_time = time ( nullptr ) ; <nl> + / / ( * it ) - > state = replaced_parts_state ; <nl> + / / removePartContributionToColumnSizes ( * it ) ; <nl> + / / data_parts . erase ( it + + ) ; / / / Yes , + + , not - - . <nl> } <nl> - std : : reverse ( replaced . begin ( ) , replaced . end ( ) ) ; / / / Parts must be in ascending order . <nl> + <nl> + / / / Parts must be in ascending order . <nl> + std : : reverse ( replaced . begin ( ) , replaced . end ( ) ) ; <nl> + <nl> / / / Go to the right . <nl> - while ( it ! = data_parts . end ( ) ) <nl> + for ( auto it = it_middle ; it ! = active_parts . end ( ) ; ) <nl> { <nl> + if ( ( * it ) - > name = = part - > name ) <nl> + throw Exception ( " Unexpected duplicate part " + part - > getNameWithState ( ) + " . It is a bug . " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + <nl> if ( ! part - > contains ( * * it ) ) <nl> { <nl> - if ( ( * it ) - > name = = part - > name | | ( * it ) - > contains ( * part ) ) <nl> + if ( ( * it ) - > contains ( * part ) ) <nl> obsolete = true ; <nl> break ; <nl> } <nl> + <nl> + check_replacing_part_state ( * it ) ; <nl> replaced . push_back ( * it ) ; <nl> - ( * it ) - > remove_time = time ( nullptr ) ; <nl> - ( * it ) - > state = MergeTreeDataPart : : State : : Outdated ; <nl> - removePartContributionToColumnSizes ( * it ) ; <nl> - data_parts . erase ( it + + ) ; <nl> + + + it ; <nl> + / / replaced . push_back ( * it ) ; <nl> + / / ( * it ) - > remove_time = time ( nullptr ) ; <nl> + / / ( * it ) - > state = replaced_parts_state ; <nl> + / / removePartContributionToColumnSizes ( * it ) ; <nl> + / / data_parts . erase ( it + + ) ; <nl> } <nl> <nl> if ( obsolete ) <nl> { <nl> LOG_WARNING ( log , " Obsolete part " < < part - > name < < " added " ) ; <nl> - / / / TODO : Why we can ' t delete it immediately ? <nl> - / / / TODO : Maybe Deleting or Temporary state is more appropriate . <nl> - part - > state = MergeTreeDataPart : : State : : Outdated ; <nl> part - > remove_time = time ( nullptr ) ; <nl> + / / / I case of fail , we want to delete part from filesystem immediately ( to avoid any conflicts ) <nl> + part - > is_temp = true ; <nl> } <nl> else <nl> { <nl> - part - > state = res_state ; <nl> + / / / Now we can rename part on filesystem <nl> + part - > is_temp = false ; <nl> + part - > renameTo ( new_name ) ; <nl> + <nl> + if ( ! out_transaction ) <nl> + { <nl> + / / / Ordinary MergeTree engines ( they don ' t use out_transaction ) commit parts immediately <nl> + part - > state = DataPartState : : Committed ; <nl> + addPartContributionToColumnSizes ( part ) ; <nl> + } <nl> + else <nl> + { <nl> + / / / Whereas ReplicatedMergeTree uses intermediate PreCommitted state <nl> + part - > state = DataPartState : : PreCommitted ; <nl> + } <nl> + <nl> data_parts . insert ( part ) ; <nl> - addPartContributionToColumnSizes ( part ) ; <nl> - } <nl> <nl> - { <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> - all_data_parts . insert ( part ) ; <nl> + auto current_time = time ( nullptr ) ; <nl> + for ( auto & replacing_part : replaced ) <nl> + { <nl> + if ( ! out_transaction ) <nl> + { <nl> + replacing_part - > remove_time = current_time ; <nl> + replacing_part - > state = DataPartState : : Outdated ; <nl> + removePartContributionToColumnSizes ( replacing_part ) ; <nl> + } <nl> + } <nl> } <nl> } <nl> <nl> MergeTreeData : : DataPartsVector MergeTreeData : : renameTempPartAndReplace ( <nl> return replaced ; <nl> } <nl> <nl> - void MergeTreeData : : replaceParts ( const DataPartsVector & remove , const DataPartsVector & add , bool clear_without_timeout ) <nl> + void MergeTreeData : : removePartsFromWorkingSet ( const DataPartsVector & remove , bool clear_without_timeout ) <nl> { <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + <nl> for ( auto & part : remove ) <nl> { <nl> - if ( part - > state ! = MergeTreeDataPart : : State : : Precommitted & & part - > state ! = MergeTreeDataPart : : State : : Committed ) <nl> - throw Exception ( " Unexpected state of part " + part - > name , ErrorCodes : : LOGICAL_ERROR ) ; <nl> - } <nl> + if ( ! data_parts . count ( part ) ) <nl> + throw Exception ( " Part " + part - > getNameWithState ( ) + " not found in data_parts " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> - for ( auto & part : add ) <nl> - { <nl> - if ( part - > state ! = MergeTreeDataPart : : State : : Temporary ) <nl> - throw Exception ( " Unexpected state of part " + part - > name , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + part - > checkState ( { DataPartState : : PreCommitted , DataPartState : : Committed , DataPartState : : Outdated } ) ; <nl> } <nl> <nl> - std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - <nl> + auto remove_time = clear_without_timeout ? 0 : time ( nullptr ) ; <nl> for ( const DataPartPtr & part : remove ) <nl> { <nl> - part - > remove_time = clear_without_timeout ? 0 : time ( nullptr ) ; <nl> - part - > state = MergeTreeDataPart : : State : : Outdated ; <nl> - <nl> - if ( data_parts . erase ( part ) ) <nl> + if ( part - > state = = DataPartState : : Committed ) <nl> removePartContributionToColumnSizes ( part ) ; <nl> - } <nl> - <nl> - for ( const DataPartPtr & part : add ) <nl> - { <nl> - if ( data_parts . insert ( part ) . second ) <nl> - { <nl> - part - > state = MergeTreeDataPart : : State : : Precommitted ; <nl> - addPartContributionToColumnSizes ( part ) ; <nl> - } <nl> - / / / TODO : Why there are no assertion in the else branch ? <nl> + part - > state = DataPartState : : Outdated ; <nl> + part - > remove_time = remove_time ; <nl> } <nl> } <nl> <nl> <nl> - void MergeTreeData : : renameAndDetachPart ( const DataPartPtr & part , const String & prefix , bool restore_covered , bool move_to_detached ) <nl> + void MergeTreeData : : renameAndDetachPart ( const DataPartPtr & part_to_detach , const String & prefix , bool restore_covered , <nl> + bool move_to_detached ) <nl> { <nl> - LOG_INFO ( log , " Renaming " < < part - > relative_path < < " to " < < prefix < < part - > name < < " and detaching it . " ) ; <nl> + LOG_INFO ( log , " Renaming " < < part_to_detach - > relative_path < < " to " < < prefix < < part_to_detach - > name < < " and detaching it . " ) ; <nl> <nl> std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> + / / std : : lock_guard < std : : mutex > lock_all ( all_data_parts_mutex ) ; <nl> + <nl> + auto it_part = data_parts . find ( part_to_detach ) ; <nl> + if ( it_part = = data_parts . end ( ) ) <nl> + throw Exception ( " No such data part " + part_to_detach - > getNameWithState ( ) , ErrorCodes : : NO_SUCH_DATA_PART ) ; <nl> <nl> - if ( ! all_data_parts . erase ( part ) ) <nl> - throw Exception ( " No such data part " , ErrorCodes : : NO_SUCH_DATA_PART ) ; <nl> + / / / What if part_to_detach is reference to * it_part ? Make a new owner just in case . <nl> + auto part = * it_part ; <nl> <nl> removePartContributionToColumnSizes ( part ) ; <nl> - data_parts . erase ( part ) ; <nl> + part - > state = DataPartState : : Deleting ; <nl> if ( move_to_detached | | ! prefix . empty ( ) ) <nl> part - > renameAddPrefix ( move_to_detached , prefix ) ; <nl> <nl> if ( restore_covered ) <nl> { <nl> - auto it = all_data_parts . lower_bound ( part ) ; <nl> + auto suitable_parts = getDataPartsRange ( { DataPartState : : PreCommitted , DataPartState : : Committed , DataPartState : : Outdated } ) ; <nl> + auto it = suitable_parts . convert ( data_parts . lower_bound ( part ) ) ; <nl> + <nl> Strings restored ; <nl> bool error = false ; <nl> <nl> Int64 pos = part - > info . min_block ; <nl> <nl> - if ( it ! = all_data_parts . begin ( ) ) <nl> + if ( it ! = suitable_parts . begin ( ) ) <nl> { <nl> - - it ; <nl> if ( part - > contains ( * * it ) ) <nl> { <nl> if ( ( * it ) - > info . min_block ! = part - > info . min_block ) <nl> error = true ; <nl> - data_parts . insert ( * it ) ; <nl> - addPartContributionToColumnSizes ( * it ) ; <nl> + <nl> + if ( ( * it ) - > state ! = DataPartState : : Committed ) <nl> + { <nl> + addPartContributionToColumnSizes ( * it ) ; <nl> + ( * it ) - > state = DataPartState : : Committed ; <nl> + } <nl> + <nl> pos = ( * it ) - > info . max_block + 1 ; <nl> restored . push_back ( ( * it ) - > name ) ; <nl> } <nl> void MergeTreeData : : renameAndDetachPart ( const DataPartPtr & part , const String & <nl> else <nl> error = true ; <nl> <nl> - for ( ; it ! = all_data_parts . end ( ) & & part - > contains ( * * it ) ; + + it ) <nl> + for ( ; it ! = suitable_parts . end ( ) & & part - > contains ( * * it ) ; + + it ) <nl> { <nl> if ( ( * it ) - > info . min_block < pos ) <nl> continue ; <nl> if ( ( * it ) - > info . min_block > pos ) <nl> error = true ; <nl> - data_parts . insert ( * it ) ; <nl> - addPartContributionToColumnSizes ( * it ) ; <nl> + <nl> + if ( ( * it ) - > state ! = DataPartState : : Committed ) <nl> + { <nl> + addPartContributionToColumnSizes ( * it ) ; <nl> + ( * it ) - > state = DataPartState : : Committed ; <nl> + } <nl> + <nl> pos = ( * it ) - > info . max_block + 1 ; <nl> restored . push_back ( ( * it ) - > name ) ; <nl> } <nl> void MergeTreeData : : renameAndDetachPart ( const DataPartPtr & part , const String & <nl> } <nl> } <nl> <nl> - MergeTreeData : : DataParts MergeTreeData : : getDataParts ( ) const <nl> - { <nl> - MergeTreeData : : DataParts res ; <nl> - { <nl> - std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - std : : copy_if ( data_parts . begin ( ) , data_parts . end ( ) , std : : inserter ( res , res . begin ( ) ) , MergeTreeDataPart : : isCommitedPart ) ; <nl> - } <nl> - return res ; <nl> - } <nl> - <nl> - MergeTreeData : : DataPartsVector MergeTreeData : : getDataPartsVector ( ) const <nl> - { <nl> - MergeTreeData : : DataPartsVector res ; <nl> - { <nl> - std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> - std : : copy_if ( data_parts . begin ( ) , data_parts . end ( ) , std : : inserter ( res , res . begin ( ) ) , MergeTreeDataPart : : isCommitedPart ) ; <nl> - } <nl> - return res ; <nl> - } <nl> <nl> size_t MergeTreeData : : getTotalActiveSizeInBytes ( ) const <nl> { <nl> size_t MergeTreeData : : getTotalActiveSizeInBytes ( ) const <nl> <nl> size_t res = 0 ; <nl> for ( auto & part : data_parts ) <nl> - res + = part - > size_in_bytes ; <nl> + { <nl> + if ( part - > state = = DataPartState : : Committed ) <nl> + res + = part - > size_in_bytes ; <nl> + } <nl> <nl> return res ; <nl> } <nl> <nl> - MergeTreeData : : DataParts MergeTreeData : : getAllDataParts ( ) const <nl> - { <nl> - std : : lock_guard < std : : mutex > lock ( all_data_parts_mutex ) ; <nl> - return all_data_parts ; <nl> - } <nl> <nl> size_t MergeTreeData : : getMaxPartsCountForPartition ( ) const <nl> { <nl> size_t MergeTreeData : : getMaxPartsCountForPartition ( ) const <nl> <nl> for ( const auto & part : data_parts ) <nl> { <nl> + if ( part - > state ! = DataPartState : : Committed ) <nl> + continue ; <nl> + <nl> if ( cur_partition_id & & part - > info . partition_id = = * cur_partition_id ) <nl> { <nl> + + cur_count ; <nl> MergeTreeData : : DataPartPtr MergeTreeData : : getActiveContainingPart ( const String & <nl> std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> <nl> / / / The part can be covered only by the previous or the next one in data_parts . <nl> - auto it = data_parts . lower_bound ( part_info ) ; <nl> + auto committed_parts = getDataPartsRange ( { DataPartState : : Committed } ) ; <nl> + auto it = committed_parts . convert ( data_parts . lower_bound ( part_info ) ) ; <nl> <nl> - if ( it ! = data_parts . end ( ) ) <nl> + if ( it ! = committed_parts . end ( ) ) <nl> { <nl> if ( ( * it ) - > name = = part_name ) <nl> return * it ; <nl> MergeTreeData : : DataPartPtr MergeTreeData : : getActiveContainingPart ( const String & <nl> return * it ; <nl> } <nl> <nl> - if ( it ! = data_parts . begin ( ) ) <nl> + if ( it ! = committed_parts . begin ( ) ) <nl> { <nl> - - it ; <nl> if ( ( * it ) - > info . contains ( part_info ) ) <nl> MergeTreeData : : DataPartPtr MergeTreeData : : getPartIfExists ( const String & part_na <nl> { <nl> auto part_info = MergeTreePartInfo : : fromPartName ( part_name , format_version ) ; <nl> <nl> - std : : lock_guard < std : : mutex > lock ( all_data_parts_mutex ) ; <nl> - auto it = all_data_parts . lower_bound ( part_info ) ; <nl> - if ( it ! = all_data_parts . end ( ) & & ( * it ) - > name = = part_name ) <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + auto it = data_parts . lower_bound ( part_info ) ; <nl> + if ( it ! = data_parts . end ( ) & & ( * it ) - > name = = part_name & & ( * it ) - > state = = DataPartState : : Committed ) <nl> return * it ; <nl> <nl> return nullptr ; <nl> String MergeTreeData : : getPartitionIDFromQuery ( const ASTPtr & ast , const Context <nl> return partition_id ; <nl> } <nl> <nl> + MergeTreeData : : DataPartsVector MergeTreeData : : getDataPartsVector ( std : : initializer_list < DataPartState > affordable_states ) const <nl> + { <nl> + DataPartsVector res ; <nl> + { <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + std : : copy_if ( data_parts . begin ( ) , data_parts . end ( ) , std : : back_inserter ( res ) , <nl> + DataPart : : getStatesFilter ( { DataPartState : : Committed } ) ) ; <nl> + } <nl> + return res ; <nl> + } <nl> + <nl> + MergeTreeData : : DataParts MergeTreeData : : getDataParts ( std : : initializer_list < DataPartState > affordable_states ) const <nl> + { <nl> + DataParts res ; <nl> + { <nl> + std : : lock_guard < std : : mutex > lock ( data_parts_mutex ) ; <nl> + std : : copy_if ( data_parts . begin ( ) , data_parts . end ( ) , std : : inserter ( res , res . end ( ) ) , <nl> + DataPart : : getStatesFilter ( { DataPartState : : Committed } ) ) ; <nl> + } <nl> + return res ; <nl> + } <nl> + <nl> + MergeTreeData : : DataParts MergeTreeData : : getDataParts ( ) const <nl> + { <nl> + return getDataParts ( { DataPartState : : Committed } ) ; <nl> + } <nl> + <nl> + MergeTreeData : : DataPartsVector MergeTreeData : : getDataPartsVector ( ) const <nl> + { <nl> + return getDataPartsVector ( { DataPartState : : Committed } ) ; <nl> + } <nl> + <nl> + MergeTreeData : : DataParts MergeTreeData : : getAllDataParts ( ) const <nl> + { <nl> + return getDataParts ( { DataPartState : : PreCommitted , DataPartState : : Committed , DataPartState : : Outdated } ) ; <nl> + } <nl> + <nl> + MergeTreeData : : DataPartPtr MergeTreeData : : getAnyPartInPartition ( <nl> + const String & partition_id , std : : lock_guard < std : : mutex > & data_parts_lock ) <nl> + { <nl> + auto min_block = std : : numeric_limits < Int64 > : : min ( ) ; <nl> + MergeTreePartInfo dummy_part_info ( partition_id , min_block , min_block , 0 ) ; <nl> + <nl> + auto committed_parts = getDataPartsRange ( { DataPartState : : Committed } ) ; <nl> + auto it = committed_parts . convert ( data_parts . lower_bound ( dummy_part_info ) ) ; <nl> + <nl> + if ( it ! = committed_parts . end ( ) & & ( * it ) - > info . partition_id = = partition_id ) <nl> + return * it ; <nl> + return { } ; <nl> + } <nl> + <nl> + <nl> void MergeTreeData : : Transaction : : rollback ( ) <nl> { <nl> if ( data & & ( ! parts_to_remove_on_rollback . empty ( ) | | ! parts_to_add_on_rollback . empty ( ) ) ) <nl> void MergeTreeData : : Transaction : : rollback ( ) <nl> <nl> LOG_DEBUG ( data - > log , " Undoing transaction . " < < ss . str ( ) ) ; <nl> <nl> - data - > replaceParts ( parts_to_remove_on_rollback , parts_to_add_on_rollback , true ) ; <nl> - <nl> + / / / PreCommitted - > Outdated <nl> + replaceParts ( DataPartState : : Outdated , DataPartState : : Committed , true ) ; <nl> clear ( ) ; <nl> } <nl> } <nl> <nl> - MergeTreeData : : DataPartPtr MergeTreeData : : getAnyPartInPartition ( <nl> - const String & partition_id , std : : lock_guard < std : : mutex > & data_parts_lock ) <nl> + void MergeTreeData : : Transaction : : commit ( ) <nl> { <nl> - auto min_block = std : : numeric_limits < Int64 > : : min ( ) ; <nl> - MergeTreePartInfo dummy_part_info ( partition_id , min_block , min_block , 0 ) ; <nl> - auto it = data_parts . lower_bound ( dummy_part_info ) ; <nl> - if ( it ! = data_parts . end ( ) & & ( * it ) - > info . partition_id = = partition_id ) <nl> - return * it ; <nl> - return { } ; <nl> + / / / PreCommitted - > Committed , Committed - > Outdated <nl> + replaceParts ( DataPartState : : Committed , DataPartState : : Outdated , false ) ; <nl> + clear ( ) ; <nl> + } <nl> + <nl> + void MergeTreeData : : Transaction : : replaceParts ( MergeTreeData : : DataPartState move_precommitted_to , <nl> + MergeTreeData : : DataPartState move_committed_to , bool remove_without_delay ) <nl> + { <nl> + auto & committed_parts = parts_to_add_on_rollback ; <nl> + auto & precommitted_parts = parts_to_remove_on_rollback ; <nl> + <nl> + / / / TODO : also make sense to activate CleanupThread ' s cv <nl> + auto remove_time = ( remove_without_delay ) ? 0 : time ( nullptr ) ; <nl> + <nl> + { <nl> + std : : lock_guard < std : : mutex > lock ( data - > data_parts_mutex ) ; <nl> + <nl> + for ( auto & part : committed_parts ) <nl> + part - > checkState ( { DataPartState : : Committed } ) ; <nl> + for ( auto & part : precommitted_parts ) <nl> + part - > checkState ( { DataPartState : : PreCommitted } ) ; <nl> + <nl> + / / / If it is rollback then do nothing , else make it Outdated and remove their size contribution <nl> + if ( move_committed_to ! = DataPartState : : Committed ) <nl> + { <nl> + for ( auto & part : committed_parts ) <nl> + { <nl> + part - > state = move_committed_to ; <nl> + part - > remove_time = remove_time ; <nl> + data - > removePartContributionToColumnSizes ( part ) ; <nl> + } <nl> + } <nl> + <nl> + / / / If it is rollback just change state to Outdated , else change state to Committed and add their size contribution <nl> + for ( auto & part : precommitted_parts ) <nl> + { <nl> + part - > state = move_precommitted_to ; <nl> + if ( move_precommitted_to = = DataPartState : : Committed ) <nl> + data - > addPartContributionToColumnSizes ( part ) ; <nl> + else <nl> + part - > remove_time = remove_time ; <nl> + } <nl> + } <nl> } <nl> <nl> + <nl> } <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeData . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeData . h <nl> <nl> # include < DataStreams / GraphiteRollupSortedBlockInputStream . h > <nl> # include < Storages / MergeTree / MergeTreeDataPart . h > <nl> <nl> + # include < common / RangeFiltered . h > <nl> <nl> namespace DB <nl> { <nl> class MergeTreeData : public ITableDeclaration <nl> / / / After the DataPart is added to the working set , it cannot be changed . <nl> using DataPartPtr = std : : shared_ptr < const DataPart > ; <nl> <nl> + using DataPartState = MergeTreeDataPart : : State ; <nl> + <nl> struct DataPartPtrLess <nl> { <nl> using is_transparent = void ; <nl> class MergeTreeData : public ITableDeclaration <nl> public : <nl> Transaction ( ) { } <nl> <nl> - void commit ( ) <nl> - { <nl> - clear ( ) ; <nl> - } <nl> + void commit ( ) ; <nl> <nl> void rollback ( ) ; <nl> <nl> class MergeTreeData : public ITableDeclaration <nl> parts_to_remove_on_rollback . clear ( ) ; <nl> parts_to_add_on_rollback . clear ( ) ; <nl> } <nl> + <nl> + void replaceParts ( DataPartState move_precommitted_to , DataPartState move_committed_to , bool remove_without_delay ) ; <nl> } ; <nl> <nl> / / / An object that stores the names of temporary files created in the part directory during ALTER of its <nl> class MergeTreeData : public ITableDeclaration <nl> String getLogName ( ) const { return log_name ; } <nl> <nl> / / / Returns a copy of the list so that the caller shouldn ' t worry about locks . <nl> + DataParts getDataParts ( std : : initializer_list < DataPartState > affordable_states ) const ; <nl> + DataPartsVector getDataPartsVector ( std : : initializer_list < DataPartState > affordable_states ) const ; <nl> + <nl> + / / / Returns a virtual container iteration only through parts with specified states <nl> + decltype ( auto ) getDataPartsRange ( std : : initializer_list < DataPartState > affordable_states ) <nl> + { <nl> + return createRangeFiltered ( DataPart : : getStatesFilter ( affordable_states ) , data_parts ) ; <nl> + } <nl> + <nl> + / / / Returns Committed parts <nl> DataParts getDataParts ( ) const ; <nl> DataPartsVector getDataPartsVector ( ) const ; <nl> + <nl> + / / / Returns all parts except Temporary and Deleting ones <nl> DataParts getAllDataParts ( ) const ; <nl> <nl> / / / Total size of active parts in bytes . <nl> class MergeTreeData : public ITableDeclaration <nl> DataPartsVector renameTempPartAndReplace ( <nl> MutableDataPartPtr & part , SimpleIncrement * increment = nullptr , Transaction * out_transaction = nullptr ) ; <nl> <nl> - / / / Removes from the working set parts in remove and adds parts in add . Parts in add must already be in <nl> - / / / all_data_parts . <nl> + / / / Removes parts from the working set parts . <nl> + / / / Parts in add must already be in data_parts with PreCommitted , Committed , or Outdated states . <nl> / / / If clear_without_timeout is true , the parts will be deleted at once , or during the next call to <nl> / / / clearOldParts ( ignoring old_parts_lifetime ) . <nl> - void replaceParts ( const DataPartsVector & remove , const DataPartsVector & add , bool clear_without_timeout ) ; <nl> + void removePartsFromWorkingSet ( const DataPartsVector & remove , bool clear_without_timeout ) ; <nl> <nl> / / / Renames the part to detached / < prefix > _ < part > and forgets about it . The data won ' t be deleted in <nl> / / / clearOldParts . <nl> class MergeTreeData : public ITableDeclaration <nl> / / / but not from the disk . <nl> DataPartsVector grabOldParts ( ) ; <nl> <nl> - / / / Reverts the changes made by grabOldParts ( ) . <nl> - void addOldParts ( const DataPartsVector & parts ) ; <nl> + / / / Reverts the changes made by grabOldParts ( ) , parts should be in Deleting state . <nl> + void rollbackDeletingParts ( const DataPartsVector & parts ) ; <nl> + <nl> + / / / Removes parts from data_parts , they should be in Deleting state <nl> + void removePartsFinally ( const DataPartsVector & parts ) ; <nl> <nl> / / / Delete irrelevant parts . <nl> void clearOldParts ( ) ; <nl> class MergeTreeData : public ITableDeclaration <nl> / / / The set of all data parts including already merged but not yet deleted . Usually it is small ( tens of elements ) . <nl> / / / The part is referenced from here , from the list of current parts and from each thread reading from it . <nl> / / / This means that if reference count is 1 - the part is not used right now and can be deleted . <nl> - DataParts all_data_parts ; <nl> - mutable std : : mutex all_data_parts_mutex ; <nl> + / / DataParts all_data_parts ; <nl> + / / mutable std : : mutex all_data_parts_mutex ; <nl> <nl> / / / Used to serialize calls to grabOldParts . <nl> std : : mutex grab_old_parts_mutex ; <nl> class MergeTreeData : public ITableDeclaration <nl> void addPartContributionToColumnSizes ( const DataPartPtr & part ) ; <nl> void removePartContributionToColumnSizes ( const DataPartPtr & part ) ; <nl> <nl> - / / / If there is no part in the partition with ID ` partition_id ` , returns empty ptr . <nl> + / / / If there is no part in the partition with ID ` partition_id ` , returns empty ptr . Should be called under the lock . <nl> DataPartPtr getAnyPartInPartition ( const String & partition_id , std : : lock_guard < std : : mutex > & data_parts_lock ) ; <nl> } ; <nl> <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeDataPart . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeDataPart . cpp <nl> void MergeTreeDataPart : : remove ( ) const <nl> LOG_WARNING ( storage . log , " Directory " < < from < < " ( part to remove ) doesn ' t exist or one of nested files has gone . " <nl> " Most likely this is due to manual removing . This should be discouraged . Ignoring . " ) ; <nl> <nl> + std : : terminate ( ) ; <nl> return ; <nl> } <nl> <nl> void MergeTreeDataPart : : renameTo ( const String & new_relative_path , bool remove_n <nl> } <nl> } <nl> <nl> - from_file . setLastModified ( Poco : : Timestamp : : fromEpochTime ( time ( 0 ) ) ) ; <nl> + from_file . setLastModified ( Poco : : Timestamp : : fromEpochTime ( time ( nullptr ) ) ) ; <nl> from_file . renameTo ( to ) ; <nl> relative_path = new_relative_path ; <nl> } <nl> size_t MergeTreeDataPart : : getIndexSizeInAllocatedBytes ( ) const <nl> return res ; <nl> } <nl> <nl> + String MergeTreeDataPart : : stateToString ( MergeTreeDataPart : : State state ) <nl> + { <nl> + switch ( state ) <nl> + { <nl> + case State : : Temporary : <nl> + return " Temporary " ; <nl> + case State : : PreCommitted : <nl> + return " PreCommitted " ; <nl> + case State : : Committed : <nl> + return " Committed " ; <nl> + case State : : Outdated : <nl> + return " Outdated " ; <nl> + case State : : Deleting : <nl> + return " Deleting " ; <nl> + default : <nl> + throw Exception ( " Unknown part state " + std : : to_string ( static_cast < int > ( state ) ) , ErrorCodes : : LOGICAL_ERROR ) ; <nl> + } <nl> + } <nl> + <nl> + String MergeTreeDataPart : : stateString ( ) const <nl> + { <nl> + return stateToString ( state ) ; <nl> + } <nl> + <nl> } <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeDataPart . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeDataPart . h <nl> struct MergeTreeDataPart <nl> enum class State <nl> { <nl> Temporary , / / / the part is generating now , it is not in data_parts list <nl> - Precommitted , / / / the part is in data_parts , but not used for SELECTs <nl> + PreCommitted , / / / the part is in data_parts , but not used for SELECTs <nl> Committed , / / / active data part , used by current and upcoming SELECTs <nl> Outdated , / / / not active data part , but could be used by only current SELECTs , could be deleted after SELECTs finishes <nl> Deleting / / / not active data part with identity refcounter , it is deleting right now by a cleaner <nl> } ; <nl> <nl> - State state { State : : Temporary } ; <nl> + mutable State state { State : : Temporary } ; <nl> <nl> - bool isCommited ( ) { return state = = State : : Committed ; } <nl> - static bool isCommitedPart ( const std : : shared_ptr < MergeTreeDataPart > & part ) { return part - > isCommited ( ) ; } <nl> + / / / Returns name of state <nl> + static String stateToString ( State state ) ; <nl> + String stateString ( ) const ; <nl> + <nl> + String getNameWithState ( ) const <nl> + { <nl> + return name + " ( state " + stateString ( ) + " ) " ; <nl> + } <nl> + <nl> + / / / Returns true if state of part is one of affordable_states <nl> + bool tryCheckState ( std : : initializer_list < State > affordable_states ) const <nl> + { <nl> + for ( auto affordable_state : affordable_states ) <nl> + { <nl> + if ( state = = affordable_state ) <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + / / / Throws an exception if state of the part is not in affordable_states <nl> + void checkState ( std : : initializer_list < State > affordable_states ) const <nl> + { <nl> + if ( ! tryCheckState ( affordable_states ) ) <nl> + { <nl> + String states_str ; <nl> + for ( auto state : affordable_states ) <nl> + states_str + = stateToString ( state ) + " " ; <nl> + <nl> + throw Exception ( " Unexpected state of part " + getNameWithState ( ) + " . Expected : " + states_str ) ; <nl> + } <nl> + } <nl> + <nl> + / / / Returns a lambda that returns true only for part with states from specified list <nl> + static inline decltype ( auto ) getStatesFilter ( std : : initializer_list < State > affordable_states ) <nl> + { <nl> + return [ affordable_states ] ( const std : : shared_ptr < const MergeTreeDataPart > & part ) { <nl> + return part - > tryCheckState ( affordable_states ) ; <nl> + } ; <nl> + } <nl> <nl> / / / For resharding . <nl> size_t shard_no = 0 ; <nl> mmm a / dbms / src / Storages / StorageMergeTree . cpp <nl> ppp b / dbms / src / Storages / StorageMergeTree . cpp <nl> void StorageMergeTree : : dropPartition ( const ASTPtr & query , const ASTPtr & partit <nl> if ( detach ) <nl> data . renameAndDetachPart ( part , " " ) ; <nl> else <nl> - data . replaceParts ( { part } , { } , false ) ; <nl> + data . removePartsFromWorkingSet ( { part } , false ) ; <nl> } <nl> <nl> LOG_INFO ( log , ( detach ? " Detached " : " Removed " ) < < removed_parts < < " parts inside partition ID " < < partition_id < < " . " ) ; <nl> mmm a / dbms / src / Storages / StorageReplicatedMergeTree . cpp <nl> ppp b / dbms / src / Storages / StorageReplicatedMergeTree . cpp <nl> void StorageReplicatedMergeTree : : executeDropRange ( const StorageReplicatedMergeTr <nl> <nl> / / / If the part needs to be removed , it is more reliable to delete the directory after the changes in ZooKeeper . <nl> if ( ! entry . detach ) <nl> - data . replaceParts ( { part } , { } , true ) ; <nl> + data . removePartsFromWorkingSet ( { part } , true ) ; <nl> } <nl> <nl> LOG_INFO ( log , ( entry . detach ? " Detached " : " Removed " ) < < removed_parts < < " parts inside " < < entry . new_part_name < < " . " ) ; <nl> void StorageReplicatedMergeTree : : clearOldPartsAndRemoveFromZK ( Logger * log_ ) <nl> auto zookeeper = getZooKeeper ( ) ; <nl> <nl> MergeTreeData : : DataPartsVector parts = data . grabOldParts ( ) ; <nl> + MergeTreeData : : DataPartsVector parts_deleted_from_filesystem ; <nl> size_t count = parts . size ( ) ; <nl> <nl> if ( ! count ) <nl> return ; <nl> <nl> / / / Part names that were successfully deleted from filesystem and should be deleted from ZooKeeper <nl> - Strings part_names ; <nl> auto remove_from_zookeeper = [ & ] ( ) <nl> { <nl> - LOG_DEBUG ( log , " Removed " < < part_names . size ( ) < < " old parts from filesystem . Removing them from ZooKeeper . " ) ; <nl> + LOG_DEBUG ( log , " Removed " < < parts_deleted_from_filesystem . size ( ) < < " old parts from filesystem . Removing them from ZooKeeper . " ) ; <nl> <nl> try <nl> { <nl> + Strings part_names ; <nl> + for ( auto & part : parts_deleted_from_filesystem ) <nl> + part_names . emplace_back ( part - > name ) ; <nl> + <nl> + / / / It is important to delete parts from ZooKeeper as reliable as possible <nl> removePartsFromZooKeeper ( zookeeper , part_names ) ; <nl> } <nl> catch ( . . . ) <nl> void StorageReplicatedMergeTree : : clearOldPartsAndRemoveFromZK ( Logger * log_ ) <nl> { <nl> MergeTreeData : : DataPartPtr & part = parts . back ( ) ; <nl> part - > remove ( ) ; <nl> - part_names . emplace_back ( part - > name ) ; <nl> + parts_deleted_from_filesystem . emplace_back ( part ) ; <nl> parts . pop_back ( ) ; <nl> } <nl> } <nl> void StorageReplicatedMergeTree : : clearOldPartsAndRemoveFromZK ( Logger * log_ ) <nl> tryLogCurrentException ( __PRETTY_FUNCTION__ ) ; <nl> <nl> / / / Finalize deletion of parts already deleted from filesystem , rollback remaining parts <nl> - data . addOldParts ( parts ) ; <nl> + data . rollbackDeletingParts ( parts ) ; <nl> remove_from_zookeeper ( ) ; <nl> + data . removePartsFinally ( parts_deleted_from_filesystem ) ; <nl> <nl> throw ; <nl> } <nl> <nl> / / / Finalize deletion <nl> remove_from_zookeeper ( ) ; <nl> + data . removePartsFinally ( parts_deleted_from_filesystem ) ; <nl> <nl> LOG_DEBUG ( log , " Removed " < < count < < " old parts " ) ; <nl> } <nl> new file mode 100644 <nl> index 00000000000 . . 5479d06864a <nl> mmm / dev / null <nl> ppp b / libs / libcommon / include / common / RangeFiltered . h <nl> <nl> + # pragma once <nl> + # include < type_traits > <nl> + # include < boost / range / adaptor / filtered . hpp > <nl> + <nl> + <nl> + / / / Similar to boost : : filtered_range but a little bit easier and allows to convert ordinary iterators to filtered <nl> + template < typename F , typename C > <nl> + struct RangeFiltered : public boost : : iterator_range < boost : : filter_iterator < F , decltype ( std : : end ( C ( ) ) ) > > <nl> + { <nl> + using RawIterator = decltype ( std : : end ( C ( ) ) ) ; <nl> + using FilterIterator = boost : : filter_iterator < F , RawIterator > ; <nl> + using Base = boost : : iterator_range < FilterIterator > ; <nl> + <nl> + RangeFiltered ( const F & filter , const C & container ) <nl> + : Base ( <nl> + FilterIterator ( filter , std : : begin ( container ) , std : : end ( container ) ) , <nl> + FilterIterator ( filter , std : : end ( container ) , std : : end ( container ) ) ) , <nl> + filter ( filter ) { } <nl> + <nl> + / / / Convert ordinary iterator to filtered one <nl> + / / / Real position will be in range [ ordinary_iterator ; end ( ) ] , so it is suitable to use with lower [ upper ] _bound ( ) <nl> + inline FilterIterator convert ( RawIterator ordinary_iterator ) const <nl> + { <nl> + return { filter , ordinary_iterator , std : : end ( * this ) . end ( ) } ; <nl> + } <nl> + <nl> + F filter ; <nl> + } ; <nl> + <nl> + template < typename F , typename C > <nl> + inline decltype ( auto ) createRangeFiltered ( F & & filter , C & & container ) <nl> + { <nl> + return RangeFiltered < std : : decay_t < F > , std : : decay_t < C > > { std : : forward < F > ( filter ) , std : : forward < C > ( container ) } ; <nl> + } ; <nl>
Introduced logic for MergeTree parts states . [ # CLICKHOUSE - 3178 ]
ClickHouse/ClickHouse
e2a12d1088ace294a1d86e7de199fa5a51861401
2017-10-26T14:16:06Z
mmm a / libraries / chain / controller . cpp <nl> ppp b / libraries / chain / controller . cpp <nl> struct controller_impl { <nl> cfg . shared_memory_size ) , <nl> unconfirmed_blocks ( cfg . block_log_dir / " unconfirmed " , <nl> cfg . read_only ? database : : read_only : database : : read_write , <nl> - cfg . unconfirmed_cache_size ) , <nl> + cfg . unconfirmed_cache_size , true / * allow dirty * / ) , <nl> blog ( cfg . block_log_dir ) , <nl> fork_db ( cfg . shared_memory_dir ) , <nl> wasmif ( cfg . wasm_runtime ) , <nl> struct controller_impl { <nl> FC_ASSERT ( db . revision ( ) = = head - > block_num , " fork database is inconsistent with shared memory " , <nl> ( " db " , db . revision ( ) ) ( " head " , head - > block_num ) ( " unconfimed " , unconf_blocknum ) ) ; <nl> <nl> + / * <nl> edump ( ( unconf_blocknum ) ) ; <nl> FC_ASSERT ( head - > block_num = = unconf_blocknum , " unconfirmed block database out of sync " , <nl> ( " db " , db . revision ( ) ) ( " head " , head - > block_num ) ( " unconfimed " , unconf_blocknum ) ) ; <nl> + * / <nl> <nl> } <nl> <nl> mmm a / plugins / bnet_plugin / bnet_plugin . cpp <nl> ppp b / plugins / bnet_plugin / bnet_plugin . cpp <nl> using bnet_message = fc : : static_variant < hello , <nl> <nl> struct by_id ; <nl> struct by_num ; <nl> + struct by_received ; <nl> + struct by_expired ; <nl> <nl> namespace eosio { <nl> using namespace chain : : plugin_interface ; <nl> namespace eosio { <nl> idle_state <nl> } ; <nl> <nl> - struct block_status : std : : enable_shared_from_this < block_status > { <nl> + struct block_status { <nl> block_status ( block_id_type i , <nl> bool kby_peer = false , <nl> bool nto_peer = false , <nl> namespace eosio { <nl> > <nl> > block_status_index ; <nl> <nl> + <nl> + struct transaction_status { <nl> + bool known_by_peer = false ; <nl> + time_point received ; <nl> + time_point expired ; <nl> + transaction_id_type id ; <nl> + transaction_metadata_ptr trx ; <nl> + } ; <nl> + <nl> + typedef boost : : multi_index_container < transaction_status , <nl> + indexed_by < <nl> + ordered_unique < tag < by_id > , member < transaction_status , transaction_id_type , & transaction_status : : id > > , <nl> + ordered_non_unique < tag < by_received > , member < transaction_status , time_point , & transaction_status : : received > > , <nl> + ordered_non_unique < tag < by_expired > , member < transaction_status , time_point , & transaction_status : : expired > > <nl> + > <nl> + > transaction_status_index ; <nl> + <nl> auto get_status ( block_id_type id ) { <nl> return _block_status . find ( id ) ; <nl> } <nl> <nl> - block_status_index _block_status ; <nl> + block_status_index _block_status ; <nl> + transaction_status_index _transaction_status ; <nl> + <nl> uint32_t _local_lib = 0 ; <nl> uint32_t _local_head_block_num = 0 ; <nl> block_id_type _local_head_block_id ; / / / the last block id received on local channel <nl> namespace eosio { <nl> methods : : get_block_by_number : : method_type & _get_block_by_number ; <nl> <nl> <nl> + string _peer ; <nl> string _remote_host ; <nl> string _remote_port ; <nl> <nl> namespace eosio { <nl> auto host = peer . substr ( 0 , c ) ; <nl> auto port = peer . substr ( c + 1 , peer . size ( ) ) ; <nl> <nl> + _peer = peer ; <nl> _remote_host = host ; <nl> _remote_port = port ; <nl> <nl> namespace eosio { <nl> do_read ( ) ; <nl> } <nl> <nl> + void on_accepted_transaction ( transaction_metadata_ptr t ) { <nl> + auto itr = _transaction_status . find ( t - > id ) ; <nl> + if ( itr ! = _transaction_status . end ( ) ) { <nl> + return ; / / / this peer obviously knows this trx <nl> + } <nl> + <nl> + idump ( ( t - > id ) ) ; <nl> + transaction_status stat ; <nl> + stat . id = t - > id ; <nl> + stat . trx = t ; <nl> + stat . received = fc : : time_point : : now ( ) ; <nl> + stat . expired = std : : min < fc : : time_point > ( t - > trx . expiration , fc : : time_point : : now ( ) + fc : : seconds ( 30 ) ) ; <nl> + <nl> + _transaction_status . insert ( stat ) ; <nl> + <nl> + auto & idx = _transaction_status . get < by_expired > ( ) ; <nl> + auto start = idx . begin ( ) ; <nl> + if ( start ! = idx . end ( ) & & start - > expired < fc : : time_point : : now ( ) ) { <nl> + idx . erase ( start ) ; <nl> + start = idx . begin ( ) ; <nl> + } <nl> + } <nl> + <nl> / * * <nl> * When our local LIB advances we can purge our known history up to <nl> * the LIB or up to the last block known by the remote peer . <nl> namespace eosio { <nl> do_send_next_message ( ) ; <nl> } <nl> <nl> + <nl> void on_bad_block ( signed_block_ptr b ) { <nl> auto id = b - > id ( ) ; <nl> auto itr = _block_status . find ( id ) ; <nl> namespace eosio { <nl> } <nl> if ( _last_sent_block_num < _local_head_block_num ) <nl> send_next_block ( ) ; <nl> + else <nl> + send_next_trx ( ) ; <nl> } <nl> <nl> bool is_known_by_peer ( block_id_type id ) { <nl> namespace eosio { <nl> return itr - > known_by_peer ; <nl> } <nl> <nl> + void send_next_trx ( ) { <nl> + auto & idx = _transaction_status . get < by_received > ( ) ; <nl> + auto start = idx . begin ( ) ; <nl> + while ( start ! = idx . end ( ) & & start - > expired < fc : : time_point : : now ( ) ) { <nl> + idx . erase ( start ) ; <nl> + start = idx . begin ( ) ; <nl> + idump ( ( idx . size ( ) ) ) ; <nl> + } <nl> + <nl> + while ( start ! = idx . end ( ) & & start - > received < fc : : time_point : : maximum ( ) ) { <nl> + if ( ! start - > known_by_peer ) { <nl> + idx . modify ( start , [ & ] ( auto & stat ) { <nl> + stat . received = fc : : time_point : : maximum ( ) ; <nl> + stat . known_by_peer = true ; <nl> + } ) ; <nl> + auto ptrx_ptr = std : : make_shared < packed_transaction > ( start - > trx - > packed_trx ) ; <nl> + wlog ( " sending trx $ { id } " , ( " id " , start - > id ) ) ; <nl> + send ( ptrx_ptr ) ; <nl> + return ; <nl> + } <nl> + + + start ; <nl> + } <nl> + } <nl> + <nl> void send_next_block ( ) { <nl> _state = sending_state ; <nl> async_get_block_num ( _last_sent_block_num + 1 , <nl> namespace eosio { <nl> } <nl> <nl> void on_message ( const bnet_message & msg ) { <nl> - switch ( msg . which ( ) ) { <nl> - case bnet_message : : tag < hello > : : value : <nl> - on ( msg . get < hello > ( ) ) ; <nl> - break ; <nl> - case bnet_message : : tag < signed_block_ptr > : : value : <nl> - on ( msg . get < signed_block_ptr > ( ) ) ; <nl> - break ; <nl> + try { <nl> + switch ( msg . which ( ) ) { <nl> + case bnet_message : : tag < hello > : : value : <nl> + on ( msg . get < hello > ( ) ) ; <nl> + break ; <nl> + case bnet_message : : tag < signed_block_ptr > : : value : <nl> + on ( msg . get < signed_block_ptr > ( ) ) ; <nl> + break ; <nl> + case bnet_message : : tag < packed_transaction_ptr > : : value : <nl> + on ( msg . get < packed_transaction_ptr > ( ) ) ; <nl> + break ; <nl> + } <nl> + do_send_next_message ( ) ; <nl> + } catch ( const fc : : exception & e ) { <nl> + elog ( " $ { e } " , ( " e " , e . to_detail_string ( ) ) ) ; <nl> } <nl> - do_send_next_message ( ) ; <nl> } <nl> <nl> void on ( const hello & hi ) { <nl> namespace eosio { <nl> mark_block_known_by_peer ( stat . block_id , true ) ; <nl> } <nl> <nl> - <nl> void on ( const signed_block_ptr & b ) { <nl> auto id = b - > id ( ) ; <nl> mark_block_known_by_peer ( id , true , true ) ; <nl> namespace eosio { <nl> } ) ; <nl> } <nl> <nl> + void on ( const packed_transaction_ptr & p ) { <nl> + auto id = p - > id ( ) ; <nl> + wlog ( " received trx $ { id } " , ( " id " , id ) ) ; <nl> + auto itr = _transaction_status . find ( id ) ; <nl> + if ( itr ! = _transaction_status . end ( ) ) { <nl> + _transaction_status . modify ( itr , [ & ] ( auto & stat ) { <nl> + stat . known_by_peer = true ; <nl> + stat . received = fc : : time_point : : maximum ( ) ; / / / don ' t send it back <nl> + stat . expired = std : : min < fc : : time_point > ( stat . trx - > trx . expiration , stat . trx - > trx . expiration + fc : : seconds ( 30 ) ) ; <nl> + } ) ; <nl> + if ( itr - > trx ) return ; / / / we already know it <nl> + } <nl> + else <nl> + { <nl> + transaction_status stat ; <nl> + stat . id = id ; <nl> + stat . trx = std : : make_shared < transaction_metadata > ( * p ) ; <nl> + <nl> + if ( stat . trx - > trx . expiration < fc : : time_point : : now ( ) ) <nl> + return ; / / / nothing to do here <nl> + <nl> + stat . received = fc : : time_point : : maximum ( ) ; / / / don ' t send it back <nl> + stat . expired = std : : min < fc : : time_point > ( stat . trx - > trx . expiration , stat . trx - > trx . expiration + fc : : seconds ( 30 ) ) ; <nl> + _transaction_status . insert ( stat ) ; <nl> + } <nl> + <nl> + _app_ios . post ( [ id , p ] { <nl> + app ( ) . get_channel < incoming : : channels : : transaction > ( ) . publish ( p ) ; <nl> + } ) ; <nl> + } <nl> + <nl> void on_write ( boost : : system : : error_code ec , std : : size_t bytes_transferred ) { <nl> boost : : ignore_unused ( bytes_transferred ) ; <nl> _state = idle_state ; <nl> namespace eosio { <nl> <nl> class bnet_plugin_impl { <nl> public : <nl> - string _bnet_endpoint_address = " 0 . 0 . 0 . 0 " ; <nl> - uint16_t _bnet_endpoint_port = 4321 ; <nl> - <nl> - std : : vector < std : : string > _connect_to_peers ; / / / list of peers to connect to <nl> - std : : vector < std : : thread > _socket_threads ; <nl> - int32_t _num_threads = 1 ; <nl> - std : : unique_ptr < boost : : asio : : io_context > _ioc ; <nl> - std : : shared_ptr < listener > _listener ; <nl> + string _bnet_endpoint_address = " 0 . 0 . 0 . 0 " ; <nl> + uint16_t _bnet_endpoint_port = 4321 ; <nl> + <nl> + std : : vector < std : : string > _connect_to_peers ; / / / list of peers to connect to <nl> + std : : vector < std : : thread > _socket_threads ; <nl> + int32_t _num_threads = 1 ; <nl> + std : : unique_ptr < boost : : asio : : io_context > _ioc ; <nl> + std : : shared_ptr < listener > _listener ; <nl> + std : : shared_ptr < boost : : asio : : deadline_timer > _timer ; <nl> <nl> std : : map < const session * , std : : weak_ptr < session > > _sessions ; <nl> <nl> channels : : irreversible_block : : channel_type : : handle _on_irb_handle ; <nl> channels : : accepted_block : : channel_type : : handle _on_accepted_block_handle ; <nl> channels : : rejected_block : : channel_type : : handle _on_bad_block_handle ; <nl> + channels : : accepted_transaction : : channel_type : : handle _on_appled_trx_handle ; <nl> <nl> void async_add_session ( std : : weak_ptr < session > wp ) { <nl> app ( ) . get_io_service ( ) . post ( [ wp , this ] { <nl> namespace eosio { <nl> } ) ; <nl> } <nl> <nl> + void on_accepted_transaction ( transaction_metadata_ptr trx ) { <nl> + if ( trx - > trx . signatures . size ( ) = = 0 ) return ; <nl> + <nl> + for ( const auto & item : _sessions ) { <nl> + auto ses = item . second . lock ( ) ; <nl> + if ( ses ) { <nl> + / / ses - > _local_lib = s - > block_num ; <nl> + / / wdump ( ( ses - > _local_lib ) ) ; <nl> + ses - > _ios . post ( boost : : asio : : bind_executor ( <nl> + ses - > _strand , <nl> + [ ses , trx ] ( ) { <nl> + ses - > on_accepted_transaction ( trx ) ; <nl> + } <nl> + ) ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> / * * <nl> * Notify all active connection of the new irreversible block so they <nl> * can purge their block cache <nl> namespace eosio { <nl> } <nl> } <nl> } ; <nl> + <nl> + void on_reconnect_peers ( ) { <nl> + wlog ( " attempt to connect to missing peers " ) ; <nl> + <nl> + idump ( ( _connect_to_peers ) ( _sessions . size ( ) ) ) ; <nl> + for ( const auto & peer : _connect_to_peers ) { <nl> + bool found = false ; <nl> + for ( const auto & con : _sessions ) { <nl> + auto ses = con . second . lock ( ) ; <nl> + if ( ses & & ( ses - > _peer = = peer ) ) { <nl> + found = true ; <nl> + break ; <nl> + } <nl> + } <nl> + if ( ! found ) { <nl> + ilog ( " reconnecting . . . " ) ; <nl> + auto s = std : : make_shared < session > ( * _ioc , std : : ref ( * this ) ) ; <nl> + ilog ( " reconnecting . . . " ) ; <nl> + _sessions [ s . get ( ) ] = s ; <nl> + ilog ( " reconnecting . . . " ) ; <nl> + s - > run ( peer ) ; <nl> + ilog ( " reconnecting . . . " ) ; <nl> + } <nl> + } <nl> + <nl> + start_reconnect_timer ( ) ; <nl> + } <nl> + void start_reconnect_timer ( ) { <nl> + / / / add some random delay so that all my peers don ' t attempt to reconnect to me <nl> + / / / at the same time after shutting down . . TODO : verify srand is called <nl> + _timer - > expires_from_now ( boost : : posix_time : : microseconds ( 1000000 * ( 10 + rand ( ) % 5 ) ) ) ; <nl> + _timer - > async_wait ( [ = ] ( const boost : : system : : error_code & ec ) { <nl> + if ( ec ) { <nl> + elog ( " reconnect timer error " ) ; <nl> + return ; <nl> + } <nl> + on_reconnect_peers ( ) ; <nl> + } ) ; <nl> + } <nl> } ; <nl> <nl> <nl> namespace eosio { <nl> void bnet_plugin : : set_program_options ( options_description & cli , options_description & cfg ) { <nl> cfg . add_options ( ) <nl> ( " bnet_endpoint " , bpo : : value < string > ( ) - > default_value ( " 0 . 0 . 0 . 0 : 4321 " ) , " the endpoint upon which to listen for incoming connections " ) <nl> - ( " bnet_threads " , bpo : : value < int > ( ) , " the number of threads to use to process network messages " ) <nl> + ( " bnet_threads " , bpo : : value < uint32_t > ( ) , " the number of threads to use to process network messages " ) <nl> ( " bnet_connect " , bpo : : value < vector < string > > ( ) - > composing ( ) , " the endpoint upon which to listen for incoming connections " ) <nl> ; <nl> } <nl> namespace eosio { <nl> void bnet_plugin : : plugin_initialize ( const variables_map & options ) { <nl> ilog ( " Initialize bnet plugin " ) ; <nl> <nl> + my - > _on_appled_trx_handle = app ( ) . get_channel < channels : : accepted_transaction > ( ) <nl> + . subscribe ( [ this ] ( transaction_metadata_ptr t ) { <nl> + my - > on_accepted_transaction ( t ) ; <nl> + } ) ; <nl> + <nl> my - > _on_irb_handle = app ( ) . get_channel < channels : : irreversible_block > ( ) <nl> . subscribe ( [ this ] ( block_state_ptr s ) { <nl> my - > on_irreversible_block ( s ) ; <nl> namespace eosio { <nl> if ( options . count ( " bnet_connect " ) ) { <nl> my - > _connect_to_peers = options . at ( " bnet_connect " ) . as < vector < string > > ( ) ; <nl> } <nl> + if ( options . count ( " bnet_threads " ) ) { <nl> + my - > _num_threads = options . at ( " bnet_threads " ) . as < uint32_t > ( ) ; <nl> + if ( my - > _num_threads > 8 ) <nl> + my - > _num_threads = 8 ; <nl> + } <nl> } <nl> <nl> void bnet_plugin : : plugin_startup ( ) { <nl> namespace eosio { <nl> const auto address = boost : : asio : : ip : : make_address ( my - > _bnet_endpoint_address ) ; <nl> my - > _ioc . reset ( new boost : : asio : : io_context { my - > _num_threads } ) ; <nl> <nl> + <nl> auto & ioc = * my - > _ioc ; <nl> + my - > _timer = std : : make_shared < boost : : asio : : deadline_timer > ( app ( ) . get_io_service ( ) ) ; <nl> + <nl> + my - > start_reconnect_timer ( ) ; <nl> <nl> my - > _listener = std : : make_shared < listener > ( ioc , <nl> tcp : : endpoint { address , my - > _bnet_endpoint_port } , <nl> namespace eosio { <nl> } <nl> <nl> void bnet_plugin : : plugin_shutdown ( ) { <nl> + try { <nl> + my - > _timer - > cancel ( ) ; <nl> + my - > _timer . reset ( ) ; <nl> + } catch ( . . . ) { <nl> + elog ( " exception thrown on timer shutdown " ) ; <nl> + } <nl> + <nl> my - > _listener . reset ( ) ; <nl> my - > _ioc - > stop ( ) ; <nl> <nl> mmm a / plugins / chain_plugin / chain_plugin . cpp <nl> ppp b / plugins / chain_plugin / chain_plugin . cpp <nl> void chain_plugin : : plugin_initialize ( const variables_map & options ) { <nl> } <nl> <nl> if ( options . at ( " replay - blockchain " ) . as < bool > ( ) ) { <nl> - ilog ( " Replay requested : wiping database " ) ; <nl> + ilog ( " Replay requested : wiping database $ { db } " , <nl> + ( " db " , ( app ( ) . data_dir ( ) / default_shared_memory_dir ) . generic_string ( ) ) ) ; <nl> fc : : remove_all ( app ( ) . data_dir ( ) / default_shared_memory_dir ) ; <nl> } <nl> if ( options . at ( " resync - blockchain " ) . as < bool > ( ) ) { <nl> void chain_plugin : : plugin_initialize ( const variables_map & options ) { <nl> if ( my - > wasm_runtime ) <nl> my - > chain_config - > wasm_runtime = * my - > wasm_runtime ; <nl> <nl> + wdump ( ( * my - > chain_config ) ) ; <nl> my - > chain . emplace ( * my - > chain_config ) ; <nl> <nl> / / set up method providers <nl> mmm a / plugins / producer_plugin / producer_plugin . cpp <nl> ppp b / plugins / producer_plugin / producer_plugin . cpp <nl> class producer_plugin_impl { <nl> <nl> <nl> if ( fc : : time_point : : now ( ) - block - > timestamp < fc : : seconds ( 5 ) | | ( block - > block_num ( ) % 1000 = = 0 ) ) { <nl> - ilog ( " Received block $ { id } . . . # $ { n } @ $ { t } signed by $ { p } [ trxs : $ { count } , lib : $ { lib } , confirmed : $ { confs } ] " , <nl> - ( " p " , block - > producer ) ( " id " , fc : : variant ( block - > id ( ) ) . as_string ( ) . substr ( 0 , 16 ) ) <nl> + ilog ( " Received block $ { id } . . . # $ { n } @ $ { t } signed by $ { p } [ trxs : $ { count } , lib : $ { lib } , conf : $ { confs } , latency : $ { latency } ms ] " , <nl> + ( " p " , block - > producer ) ( " id " , fc : : variant ( block - > id ( ) ) . as_string ( ) . substr ( 8 , 16 ) ) <nl> ( " n " , block_header : : num_from_id ( block - > id ( ) ) ) ( " t " , block - > timestamp ) <nl> - ( " count " , block - > transactions . size ( ) ) ( " lib " , chain . last_irreversible_block_num ( ) ) ( " confs " , block - > confirmed ) ) ; <nl> + ( " count " , block - > transactions . size ( ) ) ( " lib " , chain . last_irreversible_block_num ( ) ) ( " confs " , block - > confirmed ) ( " latency " , ( fc : : time_point : : now ( ) - block - > timestamp ) . count ( ) / 1000 ) ) ; <nl> } <nl> <nl> } <nl>
Progress on bnet
EOSIO/eos
1f832dc6011029b797324cfcc67693e1f9137f53
2018-05-21T19:56:31Z
mmm a / include / spdlog / details / os . h <nl> ppp b / include / spdlog / details / os . h <nl> <nl> # include < Windows . h > <nl> # endif <nl> <nl> - # endif / / _WIN32 <nl> - <nl> namespace spdlog <nl> { <nl> namespace details <nl>
undo last commit
gabime/spdlog
7674bdb40a9c3ef442f03cd2c1d99b4696300db7
2014-12-19T19:36:11Z
mmm a / modules / planning / conf / planning_config . pb . txt <nl> ppp b / modules / planning / conf / planning_config . pb . txt <nl> default_task_config : { <nl> obstacle_collision_cost : 1e8 <nl> path_l_cost : 6 . 5 <nl> path_dl_cost : 8e3 <nl> - path_ddl_cost : 5e1 <nl> + path_ddl_cost : 1 . 0 <nl> path_l_cost_param_l0 : 1 . 50 <nl> path_l_cost_param_b : 0 . 40 <nl> path_l_cost_param_k : 1 . 5 <nl> mmm a / modules / planning / testdata / sunnyvale_loop_test / result_change_lane_0 . pb . txt <nl> ppp b / modules / planning / testdata / sunnyvale_loop_test / result_change_lane_0 . pb . txt <nl> <nl> header { <nl> timestamp_sec : 1508187638 . 77 <nl> } <nl> - total_path_length : 14 . 301911685115 <nl> + total_path_length : 14 . 301911685114996 <nl> total_path_time : 6 . 999999999999992 <nl> is_replan : true <nl> gear : GEAR_DRIVE <nl> trajectory_point { <nl> ddkappa : 0 <nl> } <nl> v : 3 . 4694469519536142e - 18 <nl> - a : 0 . 026486858020276231 <nl> + a : 0 . 026486858020276224 <nl> relative_time : 0 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22476706409 <nl> - y : 4140851 . 2260801932 <nl> - theta : 1 . 2656533573685733 <nl> - kappa : 2 . 7359192748659138e - 08 <nl> - s : 6 . 9939052256549105e - 06 <nl> - dkappa : 2 . 7314504884855921e - 08 <nl> + x : 587581 . 22476705047 <nl> + y : 4140851 . 2260801978 <nl> + theta : 1 . 2656533988922876 <nl> + kappa : 1 . 0631309320955807e - 07 <nl> + s : 6 . 9939052256549063e - 06 <nl> + dkappa : 1 . 0615028062192603e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0007837402857147148 <nl> - a : 0 . 051791891532074814 <nl> + v : 0 . 00078374028571471415 <nl> + a : 0 . 051791891532074759 <nl> relative_time : 0 . 02 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22477536555 <nl> - y : 4140851 . 2261066115 <nl> - theta : 1 . 2656534119631333 <nl> - kappa : 1 . 35685345798704e - 07 <nl> - s : 3 . 4685615827346167e - 05 <nl> - dkappa : 1 . 3546372053698598e - 07 <nl> + x : 587581 . 2247752985 <nl> + y : 4140851 . 2261066325 <nl> + theta : 1 . 265653617896092 <nl> + kappa : 5 . 2724979671687163e - 07 <nl> + s : 3 . 4685615827346133e - 05 <nl> + dkappa : 5 . 2644234298618777e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0020678854139242796 <nl> - a : 0 . 076528387940065931 <nl> + v : 0 . 0020678854139242774 <nl> + a : 0 . 07652838794006582 <nl> relative_time : 0 . 04 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22479283821 <nl> - y : 4140851 . 2261622152 <nl> - theta : 1 . 2656535268714189 <nl> - kappa : 3 . 6368558231891247e - 07 <nl> - s : 9 . 2969939502331072e - 05 <nl> - dkappa : 3 . 6309154681794949e - 07 <nl> + x : 587581 . 224792658 <nl> + y : 4140851 . 2261622711 <nl> + theta : 1 . 2656540788458983 <nl> + kappa : 1 . 4132192995327434e - 06 <nl> + s : 9 . 296993950233095e - 05 <nl> + dkappa : 1 . 4110550327984758e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0038411273827708091 <nl> - a : 0 . 10070262126607558 <nl> + v : 0 . 0038411273827708039 <nl> + a : 0 . 10070262126607545 <nl> relative_time : 0 . 06 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22482238081 <nl> - y : 4140851 . 2262562294 <nl> - theta : 1 . 2656537211577659 <nl> - kappa : 7 . 4918722722292266e - 07 <nl> - s : 0 . 00019151677871507438 <nl> - dkappa : 7 . 4796352237600142e - 07 <nl> + x : 587581 . 2248220098 <nl> + y : 4140851 . 2262563459 <nl> + theta : 1 . 2656548582174949 <nl> + kappa : 2 . 9112120467465588e - 06 <nl> + s : 0 . 00019151677871507414 <nl> + dkappa : 2 . 9067536874591805e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0060922836708329348 <nl> - a : 0 . 12432086553192981 <nl> + v : 0 . 0060922836708329244 <nl> + a : 0 . 12432086553192961 <nl> relative_time : 0 . 08 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22486682574 <nl> - y : 4140851 . 2263976675 <nl> - theta : 1 . 2656540134480547 <nl> - kappa : 1 . 3291476244124973e - 06 <nl> - s : 0 . 00033977364030597862 <nl> - dkappa : 1 . 3269766258541031e - 06 <nl> + x : 587581 . 22486616753 <nl> + y : 4140851 . 2263978738 <nl> + theta : 1 . 2656560307278255 <nl> + kappa : 5 . 1648378876364241e - 06 <nl> + s : 0 . 00033977364030597819 <nl> + dkappa : 5 . 15692822575182e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0088102972371258068 <nl> - a : 0 . 14738939475945462 <nl> + v : 0 . 0088102972371257929 <nl> + a : 0 . 14738939475945434 <nl> relative_time : 0 . 1 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 224928939 <nl> - y : 4140851 . 2265953328 <nl> - theta : 1 . 2656544219346575 <nl> - kappa : 2 . 1396639540207895e - 06 <nl> - s : 0 . 00054696814510011465 <nl> - dkappa : 2 . 136169077097933e - 06 <nl> + x : 587581 . 22492787929 <nl> + y : 4140851 . 2265956644 <nl> + theta : 1 . 265657669354832 <nl> + kappa : 8 . 3143642237793142e - 06 <nl> + s : 0 . 00054696814510011389 <nl> + dkappa : 8 . 3016312375314827e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 011984236521101097 <nl> - a : 0 . 16991448297047596 <nl> + v : 0 . 011984236521101078 <nl> + a : 0 . 16991448297047571 <nl> relative_time : 0 . 12000000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 225011422 <nl> - y : 4140851 . 2268578205 <nl> - theta : 1 . 2656549643813841 <nl> - kappa : 3 . 21598304965561e - 06 <nl> - s : 0 . 00082211053751595192 <nl> - dkappa : 3 . 2107301383639e - 06 <nl> + x : 587581 . 22500982916 <nl> + y : 4140851 . 2268583197 <nl> + theta : 1 . 2656598453573045 <nl> + kappa : 1 . 2496754157161206e - 05 <nl> + s : 0 . 00082211053751595072 <nl> + dkappa : 1 . 2477616073413255e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 015603295442646995 <nl> - a : 0 . 19190240418681995 <nl> + v : 0 . 015603295442646973 <nl> + a : 0 . 19190240418681964 <nl> relative_time : 0 . 14 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22511691111 <nl> - y : 4140851 . 2271935223 <nl> - theta : 1 . 2656556581284351 <nl> - kappa : 4 . 5925112156426881e - 06 <nl> - s : 0 . 0011739961951740885 <nl> - dkappa : 4 . 5850099155271482e - 06 <nl> + x : 587581 . 22511463671 <nl> + y : 4140851 . 2271942347 <nl> + theta : 1 . 2656626282947299 <nl> + kappa : 1 . 7845704638287232e - 05 <nl> + s : 0 . 0011739961951740868 <nl> + dkappa : 1 . 7818374934460653e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 019656793402088216 <nl> - a : 0 . 21335943243031255 <nl> + v : 0 . 019656793402088184 <nl> + a : 0 . 21335943243031219 <nl> relative_time : 0 . 16 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22524797975 <nl> - y : 4140851 . 2276106258 <nl> - theta : 1 . 2656565200973438 <nl> - kappa : 6 . 3028240442689444e - 06 <nl> - s : 0 . 0016112081385059821 <nl> - dkappa : 6 . 2925291592895759e - 06 <nl> + x : 587581 . 22524485819 <nl> + y : 4140851 . 2276116032 <nl> + theta : 1 . 2656660860471369 <nl> + kappa : 2 . 4491684614291804e - 05 <nl> + s : 0 . 00161120813850598 <nl> + dkappa : 2 . 4454176961874065e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 02413417528018599 <nl> - a : 0 . 23429184172277973 <nl> + v : 0 . 024134175280185952 <nl> + a : 0 . 23429184172277934 <nl> relative_time : 0 . 18 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22540713777 <nl> - y : 4140851 . 2281171195 <nl> - theta : 1 . 2656575667959276 <nl> - kappa : 8 . 3796762330257567e - 06 <nl> - s : 0 . 0021421195403626813 <nl> - dkappa : 8 . 3659890663878428e - 06 <nl> + x : 587581 . 22540298768 <nl> + y : 4140851 . 2281184187 <nl> + theta : 1 . 2656702848349468 <nl> + kappa : 3 . 2561973177048796e - 05 <nl> + s : 0 . 0021421195403626783 <nl> + dkappa : 3 . 2512106326679188e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 029025011438138071 <nl> - a : 0 . 2547059060860476 <nl> + v : 0 . 029025011438138029 <nl> + a : 0 . 25470590608604715 <nl> relative_time : 0 . 19999999999999998 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22559683316 <nl> - y : 4140851 . 228720793 <nl> - theta : 1 . 265658814323233 <nl> - kappa : 1 . 0855011401852214e - 05 <nl> - s : 0 . 0027748962356235534 <nl> - dkappa : 1 . 0837281080801378e - 05 <nl> + x : 587581 . 22559145722 <nl> + y : 4140851 . 2287224764 <nl> + theta : 1 . 2656752892388168 <nl> + kappa : 4 . 2180697711281632e - 05 <nl> + s : 0 . 0027748962356235495 <nl> + dkappa : 4 . 2116100319415442e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 034318997717578723 <nl> - a : 0 . 27460789954194209 <nl> + v : 0 . 034318997717578681 <nl> + a : 0 . 27460789954194165 <nl> relative_time : 0 . 21999999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22581945278 <nl> - y : 4140851 . 2294292422 <nl> - theta : 1 . 2656602783744848 <nl> - kappa : 1 . 3759971910378402e - 05 <nl> - s : 0 . 0035174992308050178 <nl> - dkappa : 1 . 37374966949604e - 05 <nl> + x : 587581 . 22581263806 <nl> + y : 4140851 . 2294313759 <nl> + theta : 1 . 2656811622194919 <nl> + kappa : 5 . 3468872042673482e - 05 <nl> + s : 0 . 0035174992308050126 <nl> + dkappa : 5 . 338698743982444e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 040005955440578764 <nl> - a : 0 . 29400409611228923 <nl> + v : 0 . 040005955440578708 <nl> + a : 0 . 29400409611228884 <nl> relative_time : 0 . 23999999999999996 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22607732215 <nl> - y : 4140851 . 2302498678 <nl> - theta : 1 . 2656619742460373 <nl> - kappa : 1 . 7124908675168649e - 05 <nl> - s : 0 . 0043776872136692731 <nl> - dkappa : 1 . 7096937250953914e - 05 <nl> + x : 587581 . 226068841 <nl> + y : 4140851 . 2302525234 <nl> + theta : 1 . 2656879651376514 <nl> + kappa : 6 . 6544434585977372e - 05 <nl> + s : 0 . 0043776872136692671 <nl> + dkappa : 6 . 6442525486538383e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 046075831409645496 <nl> - a : 0 . 31290076981891513 <nl> + v : 0 . 046075831409645412 <nl> + a : 0 . 31290076981891463 <nl> relative_time : 0 . 25999999999999995 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22637270764 <nl> - y : 4140851 . 2311898815 <nl> - theta : 1 . 2656639168403139 <nl> - kappa : 2 . 0979390986964806e - 05 <nl> - s : 0 . 0053630190628330323 <nl> - dkappa : 2 . 0945123741737736e - 05 <nl> + x : 587581 . 22636231745 <nl> + y : 4140851 . 231193135 <nl> + theta : 1 . 2656957577737522 <nl> + kappa : 8 . 1522286493126311e - 05 <nl> + s : 0 . 0053630190628330245 <nl> + dkappa : 8 . 1397439646768528e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 052518697907722733 <nl> - a : 0 . 33130419468364569 <nl> + v : 0 . 052518697907722664 <nl> + a : 0 . 33130419468364519 <nl> relative_time : 0 . 27999999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22670781589 <nl> - y : 4140851 . 2322563073 <nl> - theta : 1 . 2656661206707618 <nl> - kappa : 2 . 5352216327929515e - 05 <nl> - s : 0 . 0064808563573762494 <nl> - dkappa : 2 . 5310806612342504e - 05 <nl> + x : 587581 . 22669525992 <nl> + y : 4140851 . 2322602384 <nl> + theta : 1 . 2657045983478836 <nl> + kappa : 9 . 8514329801343542e - 05 <nl> + s : 0 . 0064808563573762407 <nl> + dkappa : 9 . 8363460585993627e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 059324752698190861 <nl> - a : 0 . 34922064472830705 <nl> + v : 0 . 059324752698190777 <nl> + a : 0 . 3492206447283065 <nl> relative_time : 0 . 3 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22708479536 <nl> - y : 4140851 . 2334559807 <nl> - theta : 1 . 2656685998667969 <nl> - kappa : 3 . 0271420188889446e - 05 <nl> - s : 0 . 0077383658864508464 <nl> - dkappa : 3 . 0221975561081663e - 05 <nl> + x : 587581 . 2270698034 <nl> + y : 4140851 . 233460675 <nl> + theta : 1 . 2657145435396098 <nl> + kappa : 0 . 00011762950558125241 <nl> + s : 0 . 0077383658864508343 <nl> + dkappa : 0 . 00011744936253764821 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 066484319024866748 <nl> - a : 0 . 36665639397472505 <nl> + v : 0 . 06648431902486665 <nl> + a : 0 . 36665639397472455 <nl> relative_time : 0 . 32 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2275057371 <nl> - y : 4140851 . 2347955559 <nl> - theta : 1 . 2656713681787526 <nl> - kappa : 3 . 576428588657861e - 05 <nl> - s : 0 . 0091425221588894538 <nl> - dkappa : 3 . 570586934075952e - 05 <nl> + x : 587581 . 22748802463 <nl> + y : 4140851 . 234801102 <nl> + theta : 1 . 2657256485078188 <nl> + kappa : 0 . 0001389738320849869 <nl> + s : 0 . 00914252215888944 <nl> + dkappa : 0 . 00013876100139281134 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 073987845612003764 <nl> - a : 0 . 38361771644472581 <nl> + v : 0 . 073987845612003653 <nl> + a : 0 . 38361771644472525 <nl> relative_time : 0 . 34 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22797267488 <nl> - y : 4140851 . 2362815063 <nl> - theta : 1 . 2656744389828258 <nl> - kappa : 4 . 1857354380881576e - 05 <nl> - s : 0 . 010700109912814133 <nl> - dkappa : 4 . 1788985559879225e - 05 <nl> + x : 587581 . 22795194481 <nl> + y : 4140851 . 2362879976 <nl> + theta : 1 . 26573796691057 <nl> + kappa : 0 . 00016265044289430147 <nl> + s : 0 . 010700109912814115 <nl> + dkappa : 0 . 00016240135278989472 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 081825906664291848 <nl> - a : 0 . 4001108861601354 <nl> + v : 0 . 081825906664291709 <nl> + a : 0 . 40011088616013474 <nl> relative_time : 0 . 36000000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2284875866 <nl> - y : 4140851 . 2379201259 <nl> - theta : 1 . 2656778252860263 <nl> - kappa : 4 . 8576434092076768e - 05 <nl> - s : 0 . 012417726625245106 <nl> - dkappa : 4 . 8497090483850759e - 05 <nl> + x : 587581 . 22846352879 <nl> + y : 4140851 . 2379276589 <nl> + theta : 1 . 2657515509249428 <nl> + kappa : 0 . 00018875962506868132 <nl> + s : 0 . 012417726625245085 <nl> + dkappa : 0 . 00018847055020433133 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 089989201866857424 <nl> - a : 0 . 41614217714277968 <nl> + v : 0 . 0899892018668573 <nl> + a : 0 . 41614217714277912 <nl> relative_time : 0 . 38000000000000006 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22905239463 <nl> - y : 4140851 . 2397175315 <nl> - theta : 1 . 2656815397311254 <nl> - kappa : 5 . 5946610718079728e - 05 <nl> - s : 0 . 014301785021709493 <nl> - dkappa : 5 . 585522883619902e - 05 <nl> + x : 587581 . 22902468673 <nl> + y : 4140851 . 2397262077 <nl> + theta : 1 . 2657664512668836 <nl> + kappa : 0 . 0002173988572934525 <nl> + s : 0 . 01430178502170947 <nl> + dkappa : 0 . 00021706592303826375 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 098468556385263445 <nl> - a : 0 . 43171786341448481 <nl> + v : 0 . 0984685563852633 <nl> + a : 0 . 43171786341448415 <nl> relative_time : 0 . 40000000000000008 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 22966896673 <nl> - y : 4140851 . 241679668 <nl> - theta : 1 . 2656855946015995 <nl> - kappa : 6 . 39922570516864e - 05 <nl> - s : 0 . 016358515585850039 <nl> - dkappa : 6 . 388773359977177e - 05 <nl> + x : 587581 . 22963727429 <nl> + y : 4140851 . 2416895917 <nl> + theta : 1 . 2657827172110503 <nl> + kappa : 0 . 00024866284802789218 <nl> + s : 0 . 016358515585850018 <nl> + dkappa : 0 . 00024828203471023279 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 1072549208655094 <nl> - a : 0 . 44684421899707671 <nl> + v : 0 . 10725492086550924 <nl> + a : 0 . 44684421899707605 <nl> relative_time : 0 . 4200000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 230339117 <nl> - y : 4140851 . 2438123072 <nl> - theta : 1 . 2656900018265818 <nl> - kappa : 7 . 2737042797816308e - 05 <nl> - s : 0 . 01859396906903384 <nl> - dkappa : 7 . 261823581794765e - 05 <nl> + x : 587581 . 23030309356 <nl> + y : 4140851 . 243823587 <nl> + theta : 1 . 2658003966106666 <nl> + kappa : 0 . 00028264357365333838 <nl> + s : 0 . 018593969069033815 <nl> + dkappa : 0 . 00028221072074486545 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 11633937143403131 <nl> - a : 0 . 46152751791238139 <nl> + v : 0 . 1163393714340311 <nl> + a : 0 . 46152751791238072 <nl> relative_time : 0 . 44000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 231064606 <nl> - y : 4140851 . 2461210536 <nl> - theta : 1 . 2656947729858103 <nl> - kappa : 8 . 2203944390755958e - 05 <nl> - s : 0 . 021014018999961082 <nl> - dkappa : 8 . 2069674395844253e - 05 <nl> + x : 587581 . 231023894 <nl> + y : 4140851 . 2461338011 <nl> + theta : 1 . 2658195359173616 <nl> + kappa : 0 . 00031943031662130063 <nl> + s : 0 . 021014018999961043 <nl> + dkappa : 0 . 00031894112686256391 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 12571310969770161 <nl> - a : 0 . 47577403418222491 <nl> + v : 0 . 12571310969770141 <nl> + a : 0 . 4757740341822243 <nl> relative_time : 0 . 46000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23184714222 <nl> - y : 4140851 . 2486113426 <nl> - theta : 1 . 2656999193145708 <nl> - kappa : 9 . 2415254811401947e - 05 <nl> - s : 0 . 023624364194273748 <nl> - dkappa : 9 . 2264305901525949e - 05 <nl> + x : 587581 . 231801373 <nl> + y : 4140851 . 2486256734 <nl> + theta : 1 . 2658401802010264 <nl> + kappa : 0 . 00035910970360157 <nl> + s : 0 . 023624364194273717 <nl> + dkappa : 0 . 00035855974706919388 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 13536746274382941 <nl> - a : 0 . 4895900418284333 <nl> + v : 0 . 13536746274382919 <nl> + a : 0 . 48959004182843263 <nl> relative_time : 0 . 48000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2326883825 <nl> - y : 4140851 . 2512884471 <nl> - theta : 1 . 2657054517086506 <nl> - kappa : 0 . 00010339259340450444 <nl> - s : 0 . 0264305312641644 <nl> - dkappa : 0 . 00010322371436721225 <nl> + x : 587581 . 23263717676 <nl> + y : 4140851 . 2513044802 <nl> + theta : 1 . 2658623731696519 <nl> + kappa : 0 . 0004017657436303287 <nl> + s : 0 . 026430531264164357 <nl> + dkappa : 0 . 00040115046174577233 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 1452938831401602 <nl> - a : 0 . 50298181487283256 <nl> + v : 0 . 14529388314015998 <nl> + a : 0 . 50298181487283189 <nl> relative_time : 0 . 50000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23358993256 <nl> - y : 4140851 . 2541574775 <nl> - theta : 1 . 2657113807292824 <nl> - kappa : 0 . 0001151569156959102 <nl> - s : 0 . 029437877127984853 <nl> - dkappa : 0 . 00011496882109048544 <nl> + x : 587581 . 23353290046 <nl> + y : 4140851 . 2541753352 <nl> + theta : 1 . 2658861571891853 <nl> + kappa : 0 . 00044747986625826128 <nl> + s : 0 . 029437877127984804 <nl> + dkappa : 0 . 00044679457573815721 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 15548394893487613 <nl> - a : 0 . 51595562733724865 <nl> + v : 0 . 15548394893487591 <nl> + a : 0 . 515955627337248 <nl> relative_time : 0 . 52000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23455334851 <nl> - y : 4140851 . 2572233854 <nl> - theta : 1 . 2657177166080924 <nl> - kappa : 0 . 000127728523209806 <nl> - s : 0 . 032651591519854924 <nl> - dkappa : 0 . 00012751989443549877 <nl> + x : 587581 . 23449009017 <nl> + y : 4140851 . 2572431923 <nl> + theta : 1 . 265911573303371 <nl> + kappa : 0 . 00049633095969866376 <nl> + s : 0 . 032651591519854882 <nl> + dkappa : 0 . 00049557085644673479 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 16592936365659577 <nl> - a : 0 . 52851775324350758 <nl> + v : 0 . 16592936365659555 <nl> + a : 0 . 52851775324350692 <nl> relative_time : 0 . 54000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23558013642 <nl> - y : 4140851 . 2604909637 <nl> - theta : 1 . 2657244692520493 <nl> - kappa : 0 . 00014112707328596189 <nl> - s : 0 . 036076699499271205 <nl> - dkappa : 0 . 00014089655963418459 <nl> + x : 587581 . 23551024252 <nl> + y : 4140851 . 2605128493 <nl> + theta : 1 . 2659386612536014 <nl> + kappa : 0 . 00054839540897555408 <nl> + s : 0 . 036076699499271149 <nl> + dkappa : 0 . 00054755557191610825 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 17662195631437427 <nl> - a : 0 . 54067446661343554 <nl> + v : 0 . 17662195631437402 <nl> + a : 0 . 54067446661343488 <nl> relative_time : 0 . 56000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23667175439 <nl> - y : 4140851 . 2639648532 <nl> - theta : 1 . 265731648248412 <nl> - kappa : 0 . 00015537158889697436 <nl> - s : 0 . 0397180639607157 <nl> - dkappa : 0 . 00015511780858746201 <nl> + x : 587581 . 23659480573 <nl> + y : 4140851 . 263988947 <nl> + theta : 1 . 2659674594987651 <nl> + kappa : 0 . 00060374713407178261 <nl> + s : 0 . 039718063960715644 <nl> + dkappa : 0 . 00060282252892478682 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 1875536813977032 <nl> - a : 0 . 55243204146885838 <nl> + v : 0 . 18755368139770293 <nl> + a : 0 . 5524320414688576 <nl> relative_time : 0 . 58000000000000018 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2378296121 <nl> - y : 4140851 . 2676495393 <nl> - theta : 1 . 2657392628696762 <nl> - kappa : 0 . 00017048046846550977 <nl> - s : 0 . 043580388143264655 <nl> - dkappa : 0 . 00017020200966644532 <nl> + x : 587581 . 23774518084 <nl> + y : 4140851 . 2676759763 <nl> + theta : 1 . 2659980052350921 <nl> + kappa : 0 . 00066245762807714181 <nl> + s : 0 . 043580388143264592 <nl> + dkappa : 0 . 00066144311107487321 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 19871661887651071 <nl> - a : 0 . 56379675183160216 <nl> + v : 0 . 19871661887651049 <nl> + a : 0 . 56379675183160138 <nl> relative_time : 0 . 6000000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 23905507277 <nl> - y : 4140851 . 27154936 <nl> - theta : 1 . 2657473220785231 <nl> - kappa : 0 . 00018647149568154733 <nl> - s : 0 . 04766821814019722 <nl> - dkappa : 0 . 00018616691751365157 <nl> + x : 587581 . 23896272178 <nl> + y : 4140851 . 271578277 <nl> + theta : 1 . 2660303344160031 <nl> + kappa : 0 . 00072459599533647651 <nl> + s : 0 . 047668218140197151 <nl> + dkappa : 0 . 00072348631688175279 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 21010297420116161 <nl> - a : 0 . 57477487172349284 <nl> + v : 0 . 21010297420116131 <nl> + a : 0 . 57477487172349206 <nl> relative_time : 0 . 62000000000000022 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24034945248 <nl> - y : 4140851 . 2756685042 <nl> - theta : 1 . 2657558345327651 <nl> - kappa : 0 . 00020336184931962279 <nl> - s : 0 . 051985945408604212 <nl> - dkappa : 0 . 00020302968284420907 <nl> + x : 587581 . 24024873646 <nl> + y : 4140851 . 2757000411 <nl> + theta : 1 . 2660644817719575 <nl> + kappa : 0 . 00079022898959779436 <nl> + s : 0 . 051985945408604135 <nl> + dkappa : 0 . 00078901879786378182 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 22170507830245695 <nl> - a : 0 . 58537267516635638 <nl> + v : 0 . 2217050783024567 <nl> + a : 0 . 58537267516635572 <nl> relative_time : 0 . 64000000000000024 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24171402236 <nl> - y : 4140851 . 2800110164 <nl> - theta : 1 . 2657648085902968 <nl> - kappa : 0 . 00022116811305607133 <nl> - s : 0 . 056537809278996848 <nl> - dkappa : 0 . 000220806862247065 <nl> + x : 587581 . 24160448776 <nl> + y : 4140851 . 2800453142 <nl> + theta : 1 . 2661004808302998 <nl> + kappa : 0 . 0008594210521603756 <nl> + s : 0 . 056537809278996765 <nl> + dkappa : 0 . 000858104896631976 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 23351538759163454 <nl> - a : 0 . 59559643618201907 <nl> + v : 0 . 23351538759163423 <nl> + a : 0 . 59559643618201841 <nl> relative_time : 0 . 66000000000000025 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24315000838 <nl> - y : 4140851 . 2845807988 <nl> - theta : 1 . 2657742523140403 <nl> - kappa : 0 . 00023990628528627091 <nl> - s : 0 . 061327899464915438 <nl> - dkappa : 0 . 00023951442798619349 <nl> + x : 587581 . 2430311935 <nl> + y : 4140851 . 2846180024 <nl> + theta : 1 . 2661383639351058 <nl> + kappa : 0 . 00093223435002288317 <nl> + s : 0 . 061327899464915347 <nl> + dkappa : 0 . 00093080668497969813 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 24552648396036858 <nl> - a : 0 . 60545242879230676 <nl> + v : 0 . 24552648396036825 <nl> + a : 0 . 605452428792306 <nl> relative_time : 0 . 68000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24465859239 <nl> - y : 4140851 . 2893816121 <nl> - theta : 1 . 2657841734768942 <nl> - kappa : 0 . 00025959178894188577 <nl> - s : 0 . 066360158572538172 <nl> - dkappa : 0 . 00025916777780180396 <nl> + x : 587581 . 2445300282 <nl> + y : 4140851 . 2894218676 <nl> + theta : 1 . 2661781622670336 <nl> + kappa : 0 . 0010087288140314735 <nl> + s : 0 . 066360158572538075 <nl> + dkappa : 0 . 0010071840019723482 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 25773107478076984 <nl> - a : 0 . 6149469270190453 <nl> + v : 0 . 25773107478076951 <nl> + a : 0 . 61494692701904452 <nl> relative_time : 0 . 70000000000000029 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24624091294 <nl> - y : 4140851 . 2944170791 <nl> - theta : 1 . 2657945795666796 <nl> - kappa : 0 . 00028023948130810941 <nl> - s : 0 . 0716383846102898 <nl> - dkappa : 0 . 00027978174471154861 <nl> + x : 587581 . 24610212294 <nl> + y : 4140851 . 2944605369 <nl> + theta : 1 . 2662199058631698 <nl> + kappa : 0 . 0010889621770279053 <nl> + s : 0 . 0716383846102897 <nl> + dkappa : 0 . 0010872944920370495 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 27012199290538558 <nl> - a : 0 . 624086204884061 <nl> + v : 0 . 27012199290538524 <nl> + a : 0 . 62408620488406019 <nl> relative_time : 0 . 72000000000000031 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2478980663 <nl> - y : 4140851 . 2996906885 <nl> - theta : 1 . 2658054777910905 <nl> - kappa : 0 . 000301863663840908 <nl> - s : 0 . 077166233498450393 <nl> - dkappa : 0 . 00030137060681173088 <nl> + x : 587581 . 24774856667 <nl> + y : 4140851 . 2997375 <nl> + theta : 1 . 2662636236368767 <nl> + kappa : 0 . 0011729900119976518 <nl> + s : 0 . 077166233498450282 <nl> + dkappa : 0 . 0011711936430523397 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 28269219666719964 <nl> - a : 0 . 63287653640917962 <nl> + v : 0 . 28269219666719925 <nl> + a : 0 . 63287653640917885 <nl> relative_time : 0 . 74000000000000032 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 24963110615 <nl> - y : 4140851 . 3052057945 <nl> - theta : 1 . 2658168750826402 <nl> - kappa : 0 . 00032447809198426342 <nl> - s : 0 . 082947221578764038 <nl> - dkappa : 0 . 00032394809707851304 <nl> + x : 587581 . 24947040679 <nl> + y : 4140851 . 3052561129 <nl> + theta : 1 . 2663093433976389 <nl> + kappa : 0 . 0012608657702180082 <nl> + s : 0 . 082947221578763927 <nl> + dkappa : 0 . 0012589348244378569 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 29543476987963235 <nl> - a : 0 . 64132419561622733 <nl> + v : 0 . 29543476987963196 <nl> + a : 0 . 64132419561622656 <nl> relative_time : 0 . 76000000000000034 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 25144104613 <nl> - y : 4140851 . 3109656218 <nl> - theta : 1 . 2658287781036055 <nl> - kappa : 0 . 00034809598498741713 <nl> - s : 0 . 088984728124047646 <nl> - dkappa : 0 . 00034752741316912487 <nl> + x : 587581 . 25126864971 <nl> + y : 4140851 . 3110196018 <nl> + theta : 1 . 2663570918709119 <nl> + kappa : 0 . 0013526408194062044 <nl> + s : 0 . 088984728124047521 <nl> + dkappa : 0 . 0013505693252440294 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 30834292183654044 <nl> - a : 0 . 64943545652702994 <nl> + v : 0 . 30834292183654005 <nl> + a : 0 . 64943545652702939 <nl> relative_time : 0 . 78000000000000036 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 25332885841 <nl> - y : 4140851 . 3169732643 <nl> - theta : 1 . 2658411932509832 <nl> - kappa : 0 . 00037273003572211249 <nl> - s : 0 . 095281997847799574 <nl> - dkappa : 0 . 00037212122722307071 <nl> + x : 587581 . 25314426178 <nl> + y : 4140851 . 317031065 <nl> + theta : 1 . 2664068947179734 <nl> + kappa : 0 . 0014483644818675135 <nl> + s : 0 . 095281997847799449 <nl> + dkappa : 0 . 001446146392241764 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 32140998731221737 <nl> - a : 0 . 65721659316341385 <nl> + v : 0 . 32140998731221704 <nl> + a : 0 . 65721659316341319 <nl> relative_time : 0 . 80000000000000038 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 25529547606 <nl> - y : 4140851 . 323231692 <nl> - theta : 1 . 2658541266614289 <nl> - kappa : 0 . 00039839242049983918 <nl> - s : 0 . 10184214341380847 <nl> - dkappa : 0 . 00039774169566333858 <nl> + x : 587581 . 25509817025 <nl> + y : 4140851 . 3232934726 <nl> + theta : 1 . 266458776555762 <nl> + kappa : 0 . 001548084072643363 <nl> + s : 0 . 10184214341380834 <nl> + dkappa : 0 . 0015457132680121346 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 33462942656139305 <nl> - a : 0 . 66467387954720469 <nl> + v : 0 . 33462942656139266 <nl> + a : 0 . 664673879547204 <nl> relative_time : 0 . 8200000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 257341794 <nl> - y : 4140851 . 3297437523 <nl> - theta : 1 . 265867584216207 <nl> - kappa : 0 . 00042509480888907507 <nl> - s : 0 . 10866814794576185 <nl> - dkappa : 0 . 00042440046899760693 <nl> + x : 587581 . 25713126361 <nl> + y : 4140851 . 3298096731 <nl> + theta : 1 . 2665127609767337 <nl> + kappa : 0 . 0016518449376594433 <nl> + s : 0 . 10866814794576174 <nl> + dkappa : 0 . 0016493152290360691 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 34799482531923381 <nl> - a : 0 . 67181358970022875 <nl> + v : 0 . 34799482531923348 <nl> + a : 0 . 6718135897002282 <nl> relative_time : 0 . 84000000000000041 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 25946866791 <nl> - y : 4140851 . 3365121679 <nl> - theta : 1 . 265881571546144 <nl> - kappa : 0 . 00045284837353253118 <nl> - s : 0 . 11576286753685508 <nl> - dkappa : 0 . 00045210870161945416 <nl> + x : 587581 . 25924439239 <nl> + y : 4140851 . 3365823934 <nl> + theta : 1 . 2665688705687055 <nl> + kappa : 0 . 0017596904918738198 <nl> + s : 0 . 11576286753685491 <nl> + dkappa : 0 . 00175699562378404 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 3614998948013427 <nl> - a : 0 . 678641997644312 <nl> + v : 0 . 36149989480134226 <nl> + a : 0 . 67864199764431143 <nl> relative_time : 0 . 86000000000000043 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 26167691685 <nl> - y : 4140851 . 3435395453 <nl> - theta : 1 . 2658960940365676 <nl> - kappa : 0 . 00048166379996439313 <nl> - s : 0 . 12312903375939976 <nl> - dkappa : 0 . 00048087706160956489 <nl> + x : 587581 . 26143837033 <nl> + y : 4140851 . 3436142397 <nl> + theta : 1 . 2666271269347016 <nl> + kappa : 0 . 0018716622574250429 <nl> + s : 0 . 12312903375939961 <nl> + dkappa : 0 . 0018687959108057524 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 37513847170375886 <nl> - a : 0 . 68516537740128025 <nl> + v : 0 . 37513847170375847 <nl> + a : 0 . 68516537740127959 <nl> relative_time : 0 . 88000000000000045 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 263967323 <nl> - y : 4140851 . 3508283757 <nl> - theta : 1 . 2659111568322619 <nl> - kappa : 0 . 00051155129642756593 <nl> - s : 0 . 1307692561744328 <nl> - dkappa : 0 . 00051071574053693973 <nl> + x : 587581 . 26371397451 <nl> + y : 4140851 . 3509077039 <nl> + theta : 1 . 2666875507128053 <nl> + kappa : 0 . 0019877999017802552 <nl> + s : 0 . 13076925617443264 <nl> + dkappa : 0 . 00198475569681983 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 38890451820295863 <nl> - a : 0 . 69139000299295972 <nl> + v : 0 . 38890451820295818 <nl> + a : 0 . 691390002992959 <nl> relative_time : 0 . 90000000000000047 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 26634063292 <nl> - y : 4140851 . 358381032 <nl> - theta : 1 . 2659267648424093 <nl> - kappa : 0 . 00054252060369091638 <nl> - s : 0 . 13868602484132492 <nl> - dkappa : 0 . 00054163446326010187 <nl> + x : 587581 . 26607194683 <nl> + y : 4140851 . 3584651635 <nl> + theta : 1 . 2667501615960024 <nl> + kappa : 0 . 0021081412758833062 <nl> + s : 0 . 1386860248413247 <nl> + dkappa : 0 . 0021049127748035074 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 40279212195585418 <nl> - a : 0 . 69732214844117624 <nl> + v : 0 . 40279212195585379 <nl> + a : 0 . 69732214844117568 <nl> relative_time : 0 . 92000000000000048 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 26879755815 <nl> - y : 4140851 . 3661997807 <nl> - theta : 1 . 2659429227455439 <nl> - kappa : 0 . 00057458100486651648 <nl> - s : 0 . 14688171282738943 <nl> - dkappa : 0 . 0005736424977283058 <nl> + x : 587581 . 26851299382 <nl> + y : 4140851 . 3662888836 <nl> + theta : 1 . 2668149783520306 <nl> + kappa : 0 . 0022327224523028587 <nl> + s : 0 . 14688171282738921 <nl> + dkappa : 0 . 0022293031620823161 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 41679549609979477 <nl> - a : 0 . 70296808776775588 <nl> + v : 0 . 41679549609979427 <nl> + a : 0 . 70296808776775543 <nl> relative_time : 0 . 9400000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 27133877552 <nl> - y : 4140851 . 3742867745 <nl> - theta : 1 . 265959634994493 <nl> - kappa : 0 . 00060774133522688669 <nl> - s : 0 . 15535857871749104 <nl> - dkappa : 0 . 00060674866478274529 <nl> + x : 587581 . 27103778848 <nl> + y : 4140851 . 3743810197 <nl> + theta : 1 . 2668820188432273 <nl> + kappa : 0 . 0023615777633805009 <nl> + s : 0 . 15535857871749084 <nl> + dkappa : 0 . 0023579611384197722 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 43090897925256577 <nl> - a : 0 . 70833409499452482 <nl> + v : 0 . 43090897925256527 <nl> + a : 0 . 70833409499452427 <nl> relative_time : 0 . 96000000000000052 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 2739649287 <nl> - y : 4140851 . 3826440619 <nl> - theta : 1 . 2659769058213302 <nl> - kappa : 0 . 00064200999202224 <nl> - s : 0 . 16411876912365453 <nl> - dkappa : 0 . 00064096134795776135 <nl> + x : 587581 . 27364696993 <nl> + y : 4140851 . 3827436212 <nl> + theta : 1 . 2669513000463768 <nl> + kappa : 0 . 0024947398393788565 <nl> + s : 0 . 16411876912365436 <nl> + dkappa : 0 . 002490919284107068 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 44512703551238919 <nl> - a : 0 . 713426444143309 <nl> + v : 0 . 4451270355123888 <nl> + a : 0 . 71342644414330847 <nl> relative_time : 0 . 98000000000000054 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 27667662839 <nl> - y : 4140851 . 3912735861 <nl> - theta : 1 . 2659947392423208 <nl> - kappa : 0 . 00067739494429772346 <nl> - s : 0 . 17316432119467345 <nl> - dkappa : 0 . 00067628850328205 <nl> + x : 587581 . 276341145 <nl> + y : 4140851 . 3913786332 <nl> + theta : 1 . 2670228380725588 <nl> + kappa : 0 . 002632239646629691 <nl> + s : 0 . 17316432119467323 <nl> + dkappa : 0 . 0026282085180527547 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 4594442544579237 <nl> - a : 0 . 71825140923593445 <nl> + v : 0 . 4594442544579232 <nl> + a : 0 . 71825140923593389 <nl> relative_time : 1 . 0000000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 29153749626 <nl> - y : 4140851 . 4385657804 <nl> - theta : 1 . 2660924713456723 <nl> - kappa : 0 . 0008713143170753705 <nl> - s : 0 . 22273646051489149 <nl> - dkappa : 0 . 000869891132704021 <nl> + x : 587581 . 2911059733 <nl> + y : 4140851 . 438700899 <nl> + theta : 1 . 2674148863381314 <nl> + kappa : 0 . 0033857768047850074 <nl> + s : 0 . 22273646051489127 <nl> + dkappa : 0 . 0033805916759726013 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 5323372083548682 <nl> - a : 0 . 73858506462058993 <nl> + v : 0 . 53233720835486764 <nl> + a : 0 . 73858506462058948 <nl> relative_time : 1 . 1000000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 30861107924 <nl> - y : 4140851 . 492899566 <nl> - theta : 1 . 2662047553113904 <nl> - kappa : 0 . 0010941073958918067 <nl> - s : 0 . 27968966423287384 <nl> - dkappa : 0 . 0010923203065304867 <nl> + x : 587581 . 30806921679 <nl> + y : 4140851 . 4930692334 <nl> + theta : 1 . 2678653087940228 <nl> + kappa : 0 . 0042515121929687823 <nl> + s : 0 . 2796896642328735 <nl> + dkappa : 0 . 0042450012385736478 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 60696981744437284 <nl> - a : 0 . 753175221875178 <nl> + v : 0 . 60696981744437217 <nl> + a : 0 . 75317522187517749 <nl> relative_time : 1 . 2000000000000006 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 327941312 <nl> - y : 4140851 . 5544147557 <nl> - theta : 1 . 26633188007475 <nl> - kappa : 0 . 00134634748415205 <nl> - s : 0 . 34417048746510642 <nl> - dkappa : 0 . 0013441483917461287 <nl> + x : 587581 . 32727452624 <nl> + y : 4140851 . 55462354 <nl> + theta : 1 . 2683752644920734 <nl> + kappa : 0 . 0052316735691011786 <nl> + s : 0 . 344170487465106 <nl> + dkappa : 0 . 005223661552088742 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 68280694454984336 <nl> - a : 0 . 7628061337279507 <nl> + v : 0 . 68280694454984281 <nl> + a : 0 . 76280613372795025 <nl> relative_time : 1 . 3000000000000007 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 34955726226 <nl> - y : 4140851 . 6232038555 <nl> - theta : 1 . 2664740367988756 <nl> - kappa : 0 . 0016284138864200443 <nl> - s : 0 . 41627589287405714 <nl> - dkappa : 0 . 0016257540733677113 <nl> + x : 587581 . 34875078173 <nl> + y : 4140851 . 6234563803 <nl> + theta : 1 . 2689455202751931 <nl> + kappa : 0 . 0063277348451441411 <nl> + s : 0 . 41627589287405664 <nl> + dkappa : 0 . 0063180442712656576 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 759391877767511 <nl> - a : 0 . 76826205290715921 <nl> + v : 0 . 75939187776751038 <nl> + a : 0 . 76826205290715888 <nl> relative_time : 1 . 4000000000000008 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 37347548187 <nl> - y : 4140851 . 6993195363 <nl> - theta : 1 . 2666313343363775 <nl> - kappa : 0 . 001940522587303866 <nl> - s : 0 . 49606109319545844 <nl> - dkappa : 0 . 0019373529832191177 <nl> + x : 587581 . 37251442787 <nl> + y : 4140851 . 699620462 <nl> + theta : 1 . 269576512801101 <nl> + kappa : 0 . 0075405352999455928 <nl> + s : 0 . 49606109319545794 <nl> + dkappa : 0 . 0075289873896434555 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 83634633046643159 <nl> - a : 0 . 77032723214105581 <nl> + v : 0 . 83634633046643092 <nl> + a : 0 . 77032723214105536 <nl> relative_time : 1 . 5000000000000009 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 399702358 <nl> - y : 4140851 . 7827821253 <nl> - theta : 1 . 2668038146909968 <nl> - kappa : 0 . 0022827569303409275 <nl> - s : 0 . 58354739376558951 <nl> - dkappa : 0 . 0022790283287063809 <nl> + x : 587581 . 39857181057 <nl> + y : 4140851 . 7831361229 <nl> + theta : 1 . 2702684105660591 <nl> + kappa : 0 . 0088703987920836277 <nl> + s : 0 . 583547393765589 <nl> + dkappa : 0 . 0088568142698288339 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 9133704412884871 <nl> - a : 0 . 76978592415789249 <nl> + v : 0 . 91337044128848621 <nl> + a : 0 . 769785924157892 <nl> relative_time : 1 . 600000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 42823646334 <nl> - y : 4140851 . 8735870812 <nl> - theta : 1 . 2669914684792483 <nl> - kappa : 0 . 002655098296883185 <nl> - s : 0 . 67873003504855867 <nl> - dkappa : 0 . 00265076152159272 <nl> + x : 587581 . 426921512 <nl> + y : 4140851 . 8739988189 <nl> + theta : 1 . 2710211759286061 <nl> + kappa : 0 . 010317252972710706 <nl> + s : 0 . 678730035048558 <nl> + dkappa : 0 . 010301452673772488 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 99024277414838335 <nl> - a : 0 . 76742238168592036 <nl> + v : 0 . 99024277414838269 <nl> + a : 0 . 76742238168591992 <nl> relative_time : 1 . 7000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 45907089056 <nl> - y : 4140851 . 9717124216 <nl> - theta : 1 . 2671942502720972 <nl> - kappa : 0 . 0030574565469495439 <nl> - s : 0 . 78158597431461119 <nl> - dkappa : 0 . 0030524625691295709 <nl> + x : 587581 . 457556669 <nl> + y : 4140851 . 9721865552 <nl> + theta : 1 . 2718346266520575 <nl> + kappa : 0 . 01188074757344355 <nl> + s : 0 . 78158597431461074 <nl> + dkappa : 0 . 011862552869507683 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0668154244920514 <nl> - a : 0 . 76372465059943206 <nl> + v : 1 . 0668154244920509 <nl> + a : 0 . 76372465059943273 <nl> relative_time : 1 . 8000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 49219415255 <nl> - y : 4140852 . 0771215903 <nl> - theta : 1 . 2674120845269137 <nl> - kappa : 0 . 0034896817893702069 <nl> - s : 0 . 89207689447430094 <nl> - dkappa : 0 . 003483981824975859 <nl> + x : 587581 . 49046586931 <nl> + y : 4140852 . 0776627511 <nl> + theta : 1 . 2727084597003007 <nl> + kappa : 0 . 013560300143109256 <nl> + s : 0 . 89207689447430039 <nl> + dkappa : 0 . 013539533297853082 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1428993846150921 <nl> - a : 0 . 75751381273404383 <nl> + v : 1 . 1428993846150919 <nl> + a : 0 . 75751381273404428 <nl> relative_time : 1 . 9000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 5275561983 <nl> - y : 4140852 . 1897653379 <nl> - theta : 1 . 2676761156928489 <nl> - kappa : 0 . 0039466412167628315 <nl> - s : 1 . 0101408692490323 <nl> - dkappa : 0 . 0039069786347305634 <nl> + x : 587581 . 52550773206 <nl> + y : 4140852 . 1904056445 <nl> + theta : 1 . 2737569686289412 <nl> + kappa : 0 . 015322187503945846 <nl> + s : 1 . 0101408692490319 <nl> + dkappa : 0 . 015168068019731272 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2182348465469131 <nl> - a : 0 . 74880276011023994 <nl> + v : 1 . 2182348465469128 <nl> + a : 0 . 74880276011024027 <nl> relative_time : 2 . 0000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 564729143 <nl> - y : 4140852 . 3096862067 <nl> - theta : 1 . 2683852034105971 <nl> - kappa : 0 . 0043655805240341841 <nl> - s : 1 . 1356910284792436 <nl> - dkappa : 0 . 0038348878448614221 <nl> + x : 587581 . 561109005 <nl> + y : 4140852 . 3108024546 <nl> + theta : 1 . 2764242271403177 <nl> + kappa : 0 . 016752468833893391 <nl> + s : 1 . 135691028479243 <nl> + dkappa : 0 . 014690322220075614 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2925862108122343 <nl> - a : 0 . 73787993273925512 <nl> + v : 1 . 2925862108122339 <nl> + a : 0 . 73787993273925534 <nl> relative_time : 2 . 1000000000000014 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 60408633132 <nl> - y : 4140852 . 4366535004 <nl> - theta : 1 . 269135956383856 <nl> - kappa : 0 . 0048091362685172461 <nl> - s : 1 . 2686183842579009 <nl> - dkappa : 0 . 0037585610752893625 <nl> + x : 587581 . 59880217165 <nl> + y : 4140852 . 4382736553 <nl> + theta : 1 . 2792482109828658 <nl> + kappa : 0 . 018266792004610323 <nl> + s : 1 . 2686183842579002 <nl> + dkappa : 0 . 014184504574984923 <nl> ddkappa : 0 <nl> } <nl> v : 1 . 3657467219368993 <nl> - a : 0 . 7250337706323241 <nl> + a : 0 . 72503377063232421 <nl> relative_time : 2 . 2000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 64558979927 <nl> - y : 4140852 . 5705447467 <nl> - theta : 1 . 2699276504389809 <nl> - kappa : 0 . 0052768805979191771 <nl> - s : 1 . 4087947153306106 <nl> - dkappa : 0 . 0036780719505447221 <nl> + x : 587581 . 63855087326 <nl> + y : 4140852 . 572696289 <nl> + theta : 1 . 282226196151818 <nl> + kappa : 0 . 019863696305354523 <nl> + s : 1 . 4087947153306102 <nl> + dkappa : 0 . 013651102994359818 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 4375384684478756 <nl> + v : 1 . 4375384684478754 <nl> a : 0 . 71055271380068186 <nl> relative_time : 2 . 3000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 68919674261 <nl> - y : 4140852 . 7112218589 <nl> - theta : 1 . 2707594690660207 <nl> - kappa : 0 . 005768331106319519 <nl> - s : 1 . 5560754514957327 <nl> - dkappa : 0 . 0035935034827088222 <nl> + x : 587581 . 68031411525 <nl> + y : 4140852 . 7139317202 <nl> + theta : 1 . 2853551113161386 <nl> + kappa : 0 . 021541534776364724 <nl> + s : 1 . 556075451495732 <nl> + dkappa : 0 . 01309066759941889 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 5078123828732535 <nl> + v : 1 . 507812382873253 <nl> a : 0 . 694725202255563 <nl> relative_time : 2 . 4000000000000017 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 73486037017 <nl> - y : 4140852 . 8585338863 <nl> - theta : 1 . 2716305197093618 <nl> - kappa : 0 . 0062829604589177213 <nl> - s : 1 . 7103025580044919 <nl> - dkappa : 0 . 0035049464151939835 <nl> + x : 587581 . 724047085 <nl> + y : 4140852 . 8618283994 <nl> + theta : 1 . 2886315990963428 <nl> + kappa : 0 . 023298507068266291 <nl> + s : 1 . 7103025580044915 <nl> + dkappa : 0 . 01250379974692575 <nl> ddkappa : 0 <nl> } <nl> v : 1 . 5764482417422467 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 78253075841 <nl> - y : 4140853 . 0123197753 <nl> - theta : 1 . 2725398500583713 <nl> - kappa : 0 . 006820206016780672 <nl> - s : 1 . 8713074199610906 <nl> - dkappa : 0 . 0034124975665235447 <nl> + x : 587581 . 76970196969 <nl> + y : 4140853 . 0162246334 <nl> + theta : 1 . 2920520773423263 <nl> + kappa : 0 . 025132692301476991 <nl> + s : 1 . 8713074199610902 <nl> + dkappa : 0 . 011891141053416147 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 6433546655851936 <nl> + v : 1 . 6433546655851934 <nl> a : 0 . 66018457506983463 <nl> relative_time : 2 . 6000000000000019 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 83190775441 <nl> - y : 4140853 . 1724869967 <nl> - theta : 1 . 27359622446164 <nl> - kappa : 0 . 0073599752784859361 <nl> - s : 2 . 0389137267228215 <nl> - dkappa : 0 . 0033173527668095004 <nl> + x : 587581 . 8163037101 <nl> + y : 4140853 . 1772116837 <nl> + theta : 1 . 2959629514241717 <nl> + kappa : 0 . 026913009488188935 <nl> + s : 2 . 0389137267228206 <nl> + dkappa : 0 . 01126312747813356 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 7084691189335548 <nl> - a : 0 . 64204833945169482 <nl> + v : 1 . 7084691189335546 <nl> + a : 0 . 64204833945169471 <nl> relative_time : 2 . 700000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 88222912455 <nl> - y : 4140853 . 3390793963 <nl> - theta : 1 . 2751122980055074 <nl> - kappa : 0 . 0078459238296910636 <nl> - s : 2 . 2129403563001784 <nl> - dkappa : 0 . 0032227441985349047 <nl> + x : 587581 . 86123598937 <nl> + y : 4140853 . 345337702 <nl> + theta : 1 . 3013312492560907 <nl> + kappa : 0 . 028279511674421109 <nl> + s : 2 . 2129403563001779 <nl> + dkappa : 0 . 010647524144406407 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 7717579103199148 <nl> + v : 1 . 7717579103199146 <nl> a : 0 . 62371940916501756 <nl> relative_time : 2 . 800000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 9343540587 <nl> - y : 4140853 . 51164262 <nl> - theta : 1 . 2766827090144943 <nl> - kappa : 0 . 00834928922228732 <nl> - s : 2 . 3932042597569714 <nl> - dkappa : 0 . 00312474477247548 <nl> + x : 587581 . 90777868289 <nl> + y : 4140853 . 5194895114 <nl> + theta : 1 . 3068919518017337 <nl> + kappa : 0 . 02969499055124987 <nl> + s : 2 . 3932042597569705 <nl> + dkappa : 0 . 010009857023068849 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 8332161922779817 <nl> + v : 1 . 8332161922779815 <nl> a : 0 . 60548622422103771 <nl> relative_time : 2 . 9000000000000021 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587581 . 98822990339 <nl> - y : 4140853 . 6900023548 <nl> - theta : 1 . 2783058711562081 <nl> - kappa : 0 . 0088695629875854519 <nl> - s : 2 . 5795233456104363 <nl> - dkappa : 0 . 0030234534816101803 <nl> + x : 587581 . 95588477585 <nl> + y : 4140853 . 6994911926 <nl> + theta : 1 . 3126394419821814 <nl> + kappa : 0 . 031158016289172148 <nl> + s : 2 . 5795233456104354 <nl> + dkappa : 0 . 0093507702461373722 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 8928679613425869 <nl> + v : 1 . 8928679613425867 <nl> a : 0 . 58763722463099 <nl> relative_time : 3 . 0000000000000022 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 04380511644 <nl> - y : 4140853 . 8739879667 <nl> - theta : 1 . 2799802315674595 <nl> - kappa : 0 . 0094062473848127749 <nl> - s : 2 . 7717193642313487 <nl> - dkappa : 0 . 0029189672303165572 <nl> + x : 587582 . 00550824567 <nl> + y : 4140853 . 8851705426 <nl> + theta : 1 . 318568221230346 <nl> + kappa : 0 . 032667189225914287 <nl> + s : 2 . 7717193642313478 <nl> + dkappa : 0 . 0086708943554218865 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 9507660580496855 <nl> - a : 0 . 57046085040610928 <nl> + v : 1 . 9507660580496851 <nl> + a : 0 . 57046085040610939 <nl> relative_time : 3 . 1000000000000023 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 1010300999 <nl> - y : 4140854 . 0634352588 <nl> - theta : 1 . 2817042959823857 <nl> - kappa : 0 . 00995886345545552 <nl> - s : 2 . 969620792244136 <nl> - dkappa : 0 . 002811379266283357 <nl> + x : 587582 . 05660480633 <nl> + y : 4140854 . 0763618518 <nl> + theta : 1 . 324672998467685 <nl> + kappa : 0 . 034221162515489095 <nl> + s : 2 . 9696207922441347 <nl> + dkappa : 0 . 0079708360992233381 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 0069921669363557 <nl> + v : 2 . 0069921669363553 <nl> a : 0 . 55424554155763039 <nl> relative_time : 3 . 2000000000000024 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 15824083169 <nl> - y : 4140854 . 2586689121 <nl> - theta : 1 . 2839043586869012 <nl> - kappa : 0 . 010440083902527198 <nl> - s : 3 . 1730657169269891 <nl> - dkappa : 0 . 0027055746569742798 <nl> + x : 587582 . 10348853061 <nl> + y : 4140854 . 2743140678 <nl> + theta : 1 . 3320004999910893 <nl> + kappa : 0 . 035254675962692952 <nl> + s : 3 . 1730657169269882 <nl> + dkappa : 0 . 0072886449849153068 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 0616568165407996 <nl> + v : 2 . 0616568165407991 <nl> a : 0 . 539279738096788 <nl> relative_time : 3 . 3000000000000025 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 21662412328 <nl> - y : 4140854 . 4591810582 <nl> - theta : 1 . 2862538132048735 <nl> - kappa : 0 . 010915567229497037 <nl> - s : 3 . 3819047206119759 <nl> - dkappa : 0 . 0025979860844891063 <nl> + x : 587582 . 15047238127 <nl> + y : 4140854 . 4777993187 <nl> + theta : 1 . 3397352542405763 <nl> + kappa : 0 . 03620138393754798 <nl> + s : 3 . 381904720611975 <nl> + dkappa : 0 . 0065959554993900334 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 1148993794023423 <nl> - a : 0 . 52585188003481675 <nl> + v : 2 . 1148993794023419 <nl> + a : 0 . 52585188003481687 <nl> relative_time : 3 . 4000000000000026 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 27647791838 <nl> - y : 4140854 . 6647435161 <nl> - theta : 1 . 2886624435778176 <nl> - kappa : 0 . 011403026584171631 <nl> - s : 3 . 5960037650851517 <nl> - dkappa : 0 . 002487687672033289 <nl> + x : 587582 . 198639617 <nl> + y : 4140854 . 6864097649 <nl> + theta : 1 . 3476648242195068 <nl> + kappa : 0 . 037171936704201353 <nl> + s : 3 . 5960037650851513 <nl> + dkappa : 0 . 0058858192013291621 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 166888072061433 <nl> + v : 2 . 1668880720614325 <nl> a : 0 . 5142504073829518 <nl> relative_time : 3 . 5000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 33776927856 <nl> - y : 4140854 . 8752431613 <nl> - theta : 1 . 2911289243004038 <nl> - kappa : 0 . 011902193710375236 <nl> - s : 3 . 815245028439211 <nl> - dkappa : 0 . 0023747401184733745 <nl> + x : 587582 . 24796373071 <nl> + y : 4140854 . 900030605 <nl> + theta : 1 . 3557848461668849 <nl> + kappa : 0 . 038165800152945149 <nl> + s : 3 . 8152450284392105 <nl> + dkappa : 0 . 0051586268893618554 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 2177382916392472 <nl> + v : 2 . 2177382916392467 <nl> a : 0 . 50232578145018492 <nl> relative_time : 3 . 6000000000000028 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 40006038069 <nl> - y : 4140855 . 0906789023 <nl> - theta : 1 . 2937196254628827 <nl> - kappa : 0 . 012395987927256519 <nl> + x : 587582 . 29706082412 <nl> + y : 4140855 . 118829703 <nl> + theta : 1 . 3641957930044937 <nl> + kappa : 0 . 039073611418922127 <nl> s : 4 . 039507648016591 <nl> - dkappa : 0 . 0022599966631503907 <nl> + dkappa : 0 . 0044246429706981429 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 2672771647042271 <nl> + v : 2 . 2672771647042267 <nl> a : 0 . 488119246100132 <nl> relative_time : 3 . 7000000000000028 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 46140788519 <nl> - y : 4140855 . 3114564335 <nl> - theta : 1 . 2967520880510088 <nl> - kappa : 0 . 01280490157979924 <nl> - s : 4 . 2686500373086611 <nl> - dkappa : 0 . 0021472572121136661 <nl> + x : 587582 . 33990464883 <nl> + y : 4140855 . 343931105 <nl> + theta : 1 . 3733561226944442 <nl> + kappa : 0 . 039413946929417451 <nl> + s : 4 . 26865003730866 <nl> + dkappa : 0 . 00372791748299932 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 315305231006803 <nl> + v : 2 . 3153052310068025 <nl> a : 0 . 47220541517596321 <nl> relative_time : 3 . 8000000000000029 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 52401935635 <nl> - y : 4140855 . 5367827304 <nl> - theta : 1 . 2998470296516498 <nl> - kappa : 0 . 013222240240226701 <nl> - s : 4 . 5025135368510476 <nl> - dkappa : 0 . 0020321949460816494 <nl> + x : 587582 . 38363120169 <nl> + y : 4140855 . 57367036 <nl> + theta : 1 . 3827051862390487 <nl> + kappa : 0 . 039761294505520156 <nl> + s : 4 . 5025135368510467 <nl> + dkappa : 0 . 0030168370876302291 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 3616804916817218 <nl> - a : 0 . 4551589025208489 <nl> + v : 2 . 3616804916817213 <nl> + a : 0 . 45515890252084884 <nl> relative_time : 3 . 900000000000003 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 58784928429 <nl> - y : 4140855 . 7664940124 <nl> - theta : 1 . 303002200672136 <nl> - kappa : 0 . 013647700561299051 <nl> - s : 4 . 7409281603620688 <nl> - dkappa : 0 . 001914893499340166 <nl> + x : 587582 . 42820869945 <nl> + y : 4140855 . 807880478 <nl> + theta : 1 . 3922361881676473 <nl> + kappa : 0 . 040115401673787264 <nl> + s : 4 . 7409281603620679 <nl> + dkappa : 0 . 0022919186412727497 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 4063184092480467 <nl> + v : 2 . 4063184092480463 <nl> a : 0 . 43755432197795918 <nl> relative_time : 4 . 0000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 652850665 <nl> - y : 4140856 . 0004211208 <nl> - theta : 1 . 3062152776652809 <nl> - kappa : 0 . 014080969236834355 <nl> + x : 587582 . 47360431566 <nl> + y : 4140856 . 0463889888 <nl> + theta : 1 . 4019421099131115 <nl> + kappa : 0 . 040476007672029246 <nl> s : 4 . 9837183408811656 <nl> - dkappa : 0 . 0017954392519030349 <nl> + dkappa : 0 . 0015536959691025577 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 44919190760916 <nl> + v : 2 . 4491919076091593 <nl> a : 0 . 41996628739046438 <nl> relative_time : 4 . 1000000000000023 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 71591730986 <nl> - y : 4140856 . 2392219477 <nl> - theta : 1 . 3098415305410782 <nl> - kappa : 0 . 014416246121040963 <nl> - s : 5 . 2307086769073328 <nl> - dkappa : 0 . 001679124760730101 <nl> + x : 587582 . 51083684177 <nl> + y : 4140856 . 2905399785 <nl> + theta : 1 . 4118501961336456 <nl> + kappa : 0 . 040247101127687521 <nl> + s : 5 . 2307086769073319 <nl> + dkappa : 0 . 00089316016261290756 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 4903313720527582 <nl> + v : 2 . 4903313720527578 <nl> a : 0 . 40296941260153463 <nl> relative_time : 4 . 200000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 77970679558 <nl> - y : 4140856 . 4820025996 <nl> - theta : 1 . 3135627698683603 <nl> - kappa : 0 . 01474643094632609 <nl> - s : 5 . 48172967853755 <nl> - dkappa : 0 . 0015614334739046381 <nl> + x : 587582 . 54776509176 <nl> + y : 4140856 . 538829824 <nl> + theta : 1 . 4219234645120391 <nl> + kappa : 0 . 039953749682029763 <nl> + s : 5 . 4817296785375484 <nl> + dkappa : 0 . 0002310629924955484 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 5298246492508576 <nl> + v : 2 . 5298246492508571 <nl> a : 0 . 38713831145434019 <nl> relative_time : 4 . 3000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 84448044619 <nl> - y : 4140856 . 7285289494 <nl> - theta : 1 . 317341421683051 <nl> - kappa : 0 . 015081709970198573 <nl> + x : 587582 . 58526308264 <nl> + y : 4140856 . 7909503663 <nl> + theta : 1 . 4321521465424647 <nl> + kappa : 0 . 039655872315113284 <nl> s : 5 . 7366235136052142 <nl> - dkappa : 0 . 0014419264077302216 <nl> + dkappa : - 0 . 00044124922752846471 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 5678170472597897 <nl> - a : 0 . 3730475977920511 <nl> + v : 2 . 5678170472597892 <nl> + a : 0 . 37304759779205116 <nl> relative_time : 4 . 4000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 91020257608 <nl> - y : 4140856 . 97866518 <nl> - theta : 1 . 321175404217974 <nl> - kappa : 0 . 015421898477870902 <nl> - s : 5 . 9952497538185732 <nl> - dkappa : 0 . 0013206694020619061 <nl> + x : 587582 . 62331015593 <nl> + y : 4140857 . 0467627048 <nl> + theta : 1 . 442530606951931 <nl> + kappa : 0 . 03935363313608483 <nl> + s : 5 . 9952497538185714 <nl> + dkappa : - 0 . 0011234061014604971 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 6045113355202032 <nl> + v : 2 . 6045113355202028 <nl> a : 0 . 36127188545783784 <nl> relative_time : 4 . 5000000000000009 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587582 . 97309687885 <nl> - y : 4140857 . 2332514478 <nl> - theta : 1 . 3253382045949973 <nl> - kappa : 0 . 015655516643722642 <nl> - s : 6 . 2574911208991528 <nl> - dkappa : 0 . 0012040860898025634 <nl> + x : 587582 . 65228372789 <nl> + y : 4140857 . 3073860058 <nl> + theta : 1 . 4524904357471584 <nl> + kappa : 0 . 038519372621343521 <nl> + s : 6 . 2574911208991519 <nl> + dkappa : - 0 . 0016907818738175534 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 6401677448570648 <nl> + v : 2 . 6401677448570644 <nl> a : 0 . 35238578829487038 <nl> relative_time : 4 . 6000000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 03666590108 <nl> - y : 4140857 . 4913050635 <nl> - theta : 1 . 3295695585303076 <nl> - kappa : 0 . 015887192090091054 <nl> - s : 6 . 5232592327201919 <nl> - dkappa : 0 . 0010862257831104425 <nl> + x : 587582 . 68096592 <nl> + y : 4140857 . 5716018667 <nl> + theta : 1 . 4625442416720986 <nl> + kappa : 0 . 037636471128803986 <nl> + s : 6 . 523259232720191 <nl> + dkappa : - 0 . 0022569737883270024 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 6751039674796577 <nl> - a : 0 . 34696392014631916 <nl> + v : 2 . 6751039674796573 <nl> + a : 0 . 3469639201463191 <nl> relative_time : 4 . 7 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 10106563079 <nl> - y : 4140857 . 7527308729 <nl> - theta : 1 . 3338562069584983 <nl> - kappa : 0 . 016121895025181968 <nl> - s : 6 . 7925003494450769 <nl> - dkappa : 0 . 00096682530133747444 <nl> + x : 587582 . 71002292517 <nl> + y : 4140857 . 8392704483 <nl> + theta : 1 . 4727294287361854 <nl> + kappa : 0 . 036742032054903812 <nl> + s : 6 . 7925003494450751 <nl> + dkappa : - 0 . 0028305645863297914 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 7096951569815815 <nl> + v : 2 . 709695156981581 <nl> a : 0 . 3455808948553542 <nl> relative_time : 4 . 8 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 16537057131 <nl> - y : 4140858 . 0177351665 <nl> - theta : 1 . 3382361040498436 <nl> - kappa : 0 . 016335314956940274 <nl> - s : 7 . 0652011196657654 <nl> - dkappa : 0 . 000847446647640134 <nl> + x : 587582 . 73793615878 <nl> + y : 4140858 . 110515377 <nl> + theta : 1 . 4828673725555923 <nl> + kappa : 0 . 035768560839646177 <nl> + s : 7 . 0652011196657645 <nl> + dkappa : - 0 . 0033884782080702862 <nl> ddkappa : 0 <nl> } <nl> v : 2 . 7443739283407536 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 22705964046 <nl> - y : 4140858 . 2869509654 <nl> - theta : 1 . 3428144236820563 <nl> - kappa : 0 . 016460853818463343 <nl> + x : 587582 . 75776382117 <nl> + y : 4140858 . 3859959589 <nl> + theta : 1 . 4921439003413548 <nl> + kappa : 0 . 034406761966175356 <nl> s : 7 . 3413943265412254 <nl> - dkappa : 0 . 00073234200909874615 <nl> + dkappa : - 0 . 0038252747411520556 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 7796303579194079 <nl> + v : 2 . 7796303579194075 <nl> a : 0 . 35722982821886418 <nl> relative_time : 4 . 9999999999999991 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 28954767191 <nl> - y : 4140858 . 5596534968 <nl> - theta : 1 . 3474520391590818 <nl> - kappa : 0 . 016588018589369959 <nl> - s : 7 . 6211646339358641 <nl> - dkappa : 0 . 00061574659941586549 <nl> + x : 587582 . 77784828027 <nl> + y : 4140858 . 665044412 <nl> + theta : 1 . 5015405725460704 <nl> + kappa : 0 . 033027325832496679 <nl> + s : 7 . 6211646339358623 <nl> + dkappa : - 0 . 0042677284195450265 <nl> ddkappa : 0 <nl> } <nl> v : 2 . 8160119834640955 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 35286644707 <nl> - y : 4140858 . 835981458 <nl> - theta : 1 . 3521513091643609 <nl> - kappa : 0 . 016716873945448945 <nl> - s : 7 . 9046543325579579 <nl> - dkappa : 0 . 0004976011183620287 <nl> + x : 587582 . 79819975118 <nl> + y : 4140858 . 9478026605 <nl> + theta : 1 . 5110621683014331 <nl> + kappa : 0 . 031629550859710226 <nl> + s : 7 . 9046543325579561 <nl> + dkappa : - 0 . 0047160642744466337 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 854123804105686 <nl> + v : 2 . 8541238041056856 <nl> a : 0 . 391929499130762 <nl> relative_time : 5 . 1999999999999984 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 41404920781 <nl> - y : 4140859 . 1167991343 <nl> - theta : 1 . 3569642416505623 <nl> - kappa : 0 . 01677632741677472 <nl> - s : 8 . 1920690860980869 <nl> - dkappa : 0 . 00038343844969950463 <nl> + x : 587582 . 81405619648 <nl> + y : 4140859 . 2347440352 <nl> + theta : 1 . 5198618291354133 <nl> + kappa : 0 . 03004502856515006 <nl> + s : 8 . 1920690860980852 <nl> + dkappa : - 0 . 005094209724627625 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 8946282803593628 <nl> - a : 0 . 41935989577528188 <nl> + v : 2 . 8946282803593624 <nl> + a : 0 . 41935989577528193 <nl> relative_time : 5 . 299999999999998 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 47440988943 <nl> - y : 4140859 . 4020983768 <nl> - theta : 1 . 3618751860744833 <nl> - kappa : 0 . 016796100260396782 <nl> + x : 587582 . 82581201778 <nl> + y : 4140859 . 5261215754 <nl> + theta : 1 . 528015750555558 <nl> + kappa : 0 . 028285533923024724 <nl> s : 8 . 4836836773675639 <nl> - dkappa : 0 . 00027080808257267828 <nl> + dkappa : - 0 . 00540859170823163 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 9382453341246291 <nl> - a : 0 . 45427681833640948 <nl> + v : 2 . 9382453341246286 <nl> + a : 0 . 45427681833640943 <nl> relative_time : 5 . 3999999999999977 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 53571225947 <nl> - y : 4140859 . 69184858 <nl> - theta : 1 . 3668627462528598 <nl> - kappa : 0 . 016816181580597094 <nl> - s : 8 . 779847754436874 <nl> - dkappa : 0 . 00015642056655408077 <nl> + x : 587582 . 83775124187 <nl> + y : 4140859 . 822044902 <nl> + theta : 1 . 5362968814872442 <nl> + kappa : 0 . 026498589365398322 <nl> + s : 8 . 7798477544368723 <nl> + dkappa : - 0 . 00572787837223555 <nl> ddkappa : 0 <nl> } <nl> - v : 2 . 9857523486853035 <nl> + v : 2 . 985752348685303 <nl> a : 0 . 49725488065731488 <nl> relative_time : 5 . 4999999999999973 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 59686229879 <nl> - y : 4140859 . 9867106015 <nl> - theta : 1 . 3719230167905625 <nl> - kappa : 0 . 0168112444481148 <nl> - s : 9 . 0809915767740943 <nl> - dkappa : 4 . 2503210070165848e - 05 <nl> + x : 587582 . 8494466627 <nl> + y : 4140860 . 1229562177 <nl> + theta : 1 . 5446012368130742 <nl> + kappa : 0 . 02466963827220052 <nl> + s : 9 . 0809915767740925 <nl> + dkappa : - 0 . 0060452533232576511 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 037984168709523 <nl> + v : 3 . 0379841687095226 <nl> a : 0 . 54886869658116832 <nl> relative_time : 5 . 599999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 65527383192 <nl> - y : 4140860 . 2877360079 <nl> - theta : 1 . 3770393136803634 <nl> - kappa : 0 . 016723604313825149 <nl> + x : 587582 . 85403388226 <nl> + y : 4140860 . 429562089 <nl> + theta : 1 . 5511464051275929 <nl> + kappa : 0 . 022610317372223077 <nl> s : 9 . 3876317613833269 <nl> - dkappa : - 6 . 569508425629339e - 05 <nl> + dkappa : - 0 . 0062485167634330251 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 0958331002497408 <nl> + v : 3 . 0958331002497403 <nl> a : 0 . 60969287995113985 <nl> relative_time : 5 . 6999999999999966 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 71484831523 <nl> - y : 4140860 . 59475471 <nl> - theta : 1 . 3822574739868969 <nl> - kappa : 0 . 016634219299651858 <nl> - s : 9 . 70037702894315 <nl> - dkappa : - 0 . 00017604756317802085 <nl> + x : 587582 . 85871243139 <nl> + y : 4140860 . 7422723603 <nl> + theta : 1 . 5578218851151782 <nl> + kappa : 0 . 020509996220004531 <nl> + s : 9 . 7003770289431461 <nl> + dkappa : - 0 . 0064558270970860848 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 1602489107427272 <nl> - a : 0 . 68030204461040011 <nl> + v : 3 . 1602489107427267 <nl> + a : 0 . 6803020446104 <nl> relative_time : 5 . 7999999999999963 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 77558205067 <nl> - y : 4140860 . 9084859872 <nl> - theta : 1 . 3875858400616234 <nl> - kappa : 0 . 016540189512069113 <nl> - s : 10 . 019933949945017 <nl> - dkappa : - 0 . 00028849683767840267 <nl> + x : 587582 . 86349288025 <nl> + y : 4140861 . 0617935224 <nl> + theta : 1 . 5646427583699092 <nl> + kappa : 0 . 018363929659973594 <nl> + s : 10 . 019933949945015 <nl> + dkappa : - 0 . 0066676526905824623 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 2322388290095696 <nl> - a : 0 . 76127080440211892 <nl> + v : 3 . 2322388290095687 <nl> + a : 0 . 76127080440211881 <nl> relative_time : 5 . 8999999999999959 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 83257679443 <nl> - y : 4140861 . 2306622243 <nl> - theta : 1 . 3929119991590131 <nl> - kappa : 0 . 016342712279746111 <nl> - s : 10 . 347112690831718 <nl> - dkappa : - 0 . 00039212320593006963 <nl> + x : 587582 . 86370443681 <nl> + y : 4140861 . 3889626423 <nl> + theta : 1 . 569818963655762 <nl> + kappa : 0 . 016072774625606179 <nl> + s : 10 . 347112690831716 <nl> + dkappa : - 0 . 0068065919010142284 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 3128675452556711 <nl> + v : 3 . 3128675452556706 <nl> a : 0 . 85317377316946652 <nl> relative_time : 5 . 9999999999999956 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 89105944312 <nl> - y : 4140861 . 5612491947 <nl> - theta : 1 . 398377202969181 <nl> - kappa : 0 . 016140079706670661 <nl> - s : 10 . 682832760135799 <nl> - dkappa : - 0 . 00049845484421712769 <nl> + x : 587582 . 86255194328 <nl> + y : 4140861 . 7246807329 <nl> + theta : 1 . 574601716829072 <nl> + kappa : 0 . 013694343888556462 <nl> + s : 10 . 682832760135797 <nl> + dkappa : - 0 . 00692636416718047 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 4032572110707551 <nl> + v : 3 . 4032572110707542 <nl> a : 0 . 9565855647556134 <nl> relative_time : 6 . 0999999999999952 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587583 . 95099949127 <nl> - y : 4140861 . 9013012243 <nl> - theta : 1 . 4039881757413486 <nl> - kappa : 0 . 015927915830628463 <nl> - s : 11 . 028128754617985 <nl> - dkappa : - 0 . 00060730904166358751 <nl> + x : 587582 . 86136657652 <nl> + y : 4140862 . 069974693 <nl> + theta : 1 . 5795208910588538 <nl> + kappa : 0 . 011248071884743919 <nl> + s : 11 . 028128754617983 <nl> + dkappa : - 0 . 0070495527624973566 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 504587439428859 <nl> - a : 1 . 0720807930037295 <nl> + v : 3 . 5045874394288581 <nl> + a : 1 . 072080793003729 <nl> relative_time : 6 . 1999999999999948 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 00741976453 <nl> - y : 4140862 . 25282964 <nl> - theta : 1 . 4095150914560044 <nl> - kappa : 0 . 015613335448372935 <nl> - s : 11 . 384156105405632 <nl> - dkappa : - 0 . 00070650951642839735 <nl> + x : 587582 . 85734537267 <nl> + y : 4140862 . 4259751467 <nl> + theta : 1 . 5826772406164142 <nl> + kappa : 0 . 0086881887318223366 <nl> + s : 11 . 384156105405628 <nl> + dkappa : - 0 . 0071208118401101519 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 6180953046883384 <nl> - a : 1 . 2002340717569853 <nl> + v : 3 . 618095304688338 <nl> + a : 1 . 2002340717569848 <nl> relative_time : 6 . 2999999999999945 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 065743817 <nl> - y : 4140862 . 6162196174 <nl> - theta : 1 . 4152285009102421 <nl> - kappa : 0 . 01528814023590926 <nl> - s : 11 . 752196824131136 <nl> - dkappa : - 0 . 00080905729527061391 <nl> + x : 587582 . 85208737827 <nl> + y : 4140862 . 7939783046 <nl> + theta : 1 . 5851864704697736 <nl> + kappa : 0 . 0060271425821463312 <nl> + s : 11 . 752196824131135 <nl> + dkappa : - 0 . 0071725406157086263 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 7450753425918655 <nl> - a : 1 . 3416200148585509 <nl> + v : 3 . 745075342591865 <nl> + a : 1 . 3416200148585504 <nl> relative_time : 6 . 3999999999999941 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 12448959914 <nl> - y : 4140862 . 9931282303 <nl> - theta : 1 . 4210353084918204 <nl> - kappa : 0 . 014923432180347446 <nl> - s : 12 . 13366524907039 <nl> - dkappa : - 0 . 00091106461453200737 <nl> + x : 587582 . 84663754981 <nl> + y : 4140863 . 175407798 <nl> + theta : 1 . 5877872478057329 <nl> + kappa : 0 . 0032690100393049193 <nl> + s : 12 . 133665249070384 <nl> + dkappa : - 0 . 0072261566792244207 <nl> ddkappa : 0 <nl> } <nl> - v : 3 . 8868795502664297 <nl> + v : 3 . 8868795502664293 <nl> a : 1 . 4968132361515958 <nl> relative_time : 6 . 4999999999999938 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 18138158484 <nl> - y : 4140863 . 3854734208 <nl> - theta : 1 . 4267895807073074 <nl> - kappa : 0 . 014476978580352105 <nl> - s : 12 . 530113791281185 <nl> - dkappa : - 0 . 0010066359581500201 <nl> + x : 587582 . 83979308559 <nl> + y : 4140863 . 5717971111 <nl> + theta : 1 . 5877369654914437 <nl> + kappa : 0 . 000408770685269599 <nl> + s : 12 . 530113791281179 <nl> + dkappa : - 0 . 0072243241573780323 <nl> ddkappa : 0 <nl> } <nl> - v : 4 . 0449173862233394 <nl> - a : 1 . 6663883494792915 <nl> + v : 4 . 0449173862233376 <nl> + a : 1 . 6663883494792908 <nl> relative_time : 6 . 5999999999999934 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 24066669436 <nl> - y : 4140863 . 7943223538 <nl> - theta : 1 . 4327859025999103 <nl> - kappa : 0 . 014011745203231398 <nl> - s : 12 . 943238680741668 <nl> - dkappa : - 0 . 0011062274474959136 <nl> + x : 587582 . 8325617899 <nl> + y : 4140863 . 984858708 <nl> + theta : 1 . 5874538798088969 <nl> + kappa : - 0 . 0025712629281933082 <nl> + s : 12 . 943238680741665 <nl> + dkappa : - 0 . 0072175921301006057 <nl> ddkappa : 0 <nl> } <nl> - v : 4 . 2206557703582144 <nl> - a : 1 . 8509199686848077 <nl> + v : 4 . 2206557703582135 <nl> + a : 1 . 850919968684807 <nl> relative_time : 6 . 6999999999999931 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 29776918853 <nl> - y : 4140864 . 2221690752 <nl> - theta : 1 . 4386039243054478 <nl> - kappa : 0 . 013454145460950659 <nl> - s : 13 . 374885712488769 <nl> - dkappa : - 0 . 0011970915679111063 <nl> + x : 587582 . 82580329967 <nl> + y : 4140864 . 4164517378 <nl> + theta : 1 . 5858615588666849 <nl> + kappa : - 0 . 0056550857493642137 <nl> + s : 13 . 374885712488766 <nl> + dkappa : - 0 . 0071846196290840667 <nl> ddkappa : 0 <nl> } <nl> - v : 4 . 4156190839509986 <nl> - a : 2 . 0509827076113143 <nl> + v : 4 . 4156190839509977 <nl> + a : 2 . 0509827076113134 <nl> relative_time : 6 . 7999999999999927 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 35638726538 <nl> - y : 4140864 . 6705237157 <nl> - theta : 1 . 4445877769662481 <nl> - kappa : 0 . 01285231526002834 <nl> - s : 13 . 827055992756621 <nl> - dkappa : - 0 . 0012890070468393033 <nl> + x : 587582 . 81995771441 <nl> + y : 4140864 . 8685842315 <nl> + theta : 1 . 5821857200125686 <nl> + kappa : - 0 . 00883935686879752 <nl> + s : 13 . 827055992756618 <nl> + dkappa : - 0 . 0071099111778592369 <nl> ddkappa : 0 <nl> } <nl> - v : 4 . 6313891696659484 <nl> - a : 2 . 2671511801019815 <nl> + v : 4 . 6313891696659475 <nl> + a : 2 . 267151180101981 <nl> relative_time : 6 . 8999999999999924 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587584 . 41457163054 <nl> - y : 4140865 . 1417918038 <nl> - theta : 1 . 450498748782044 <nl> - kappa : 0 . 0121749428789961 <nl> - s : 14 . 301911685115 <nl> - dkappa : - 0 . 0013759093563060179 <nl> + x : 587582 . 81460489193 <nl> + y : 4140865 . 3434056505 <nl> + theta : 1 . 5778652273805438 <nl> + kappa : - 0 . 01216019550362701 <nl> + s : 14 . 301911685114996 <nl> + dkappa : - 0 . 0070197441822975526 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 8696053315516368 <nl> - a : 2 . 49999999999998 <nl> + a : 2 . 4999999999999796 <nl> relative_time : 6 . 999999999999992 <nl> } <nl> decision { <nl> mmm a / modules / planning / testdata / sunnyvale_loop_test / result_follow_01_0 . pb . txt <nl> ppp b / modules / planning / testdata / sunnyvale_loop_test / result_follow_01_0 . pb . txt <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 69082303916 <nl> - y : 4140989 . 8548492528 <nl> - theta : - 1 . 926311959670076 <nl> - kappa : - 0 . 034617662453144842 <nl> + x : 587270 . 69084372756 <nl> + y : 4140989 . 8548412514 <nl> + theta : - 1 . 9262460055967272 <nl> + kappa : - 0 . 034489520707671119 <nl> s : 0 . 14199072585897166 <nl> - dkappa : 0 . 0012605630390411773 <nl> + dkappa : 0 . 0013900811664027616 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0990315611458046 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 63960221643 <nl> - y : 4140989 . 7224423084 <nl> - theta : - 1 . 930895257921436 <nl> - kappa : - 0 . 033370717592639577 <nl> + x : 587270 . 63964359008 <nl> + y : 4140989 . 7224263074 <nl> + theta : - 1 . 9307633599078269 <nl> + kappa : - 0 . 033114453789204829 <nl> s : 0 . 28395963646790451 <nl> - dkappa : 0 . 002520932406997712 <nl> + dkappa : 0 . 0027799487627428597 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0978193188740439 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 5883910039 <nl> - y : 4140989 . 5900602071 <nl> - theta : - 1 . 935477696226175 <nl> - kappa : - 0 . 032124006691602008 <nl> + x : 587270 . 58845305908 <nl> + y : 4140989 . 5900362073 <nl> + theta : - 1 . 9352798666451136 <nl> + kappa : - 0 . 031739644869255138 <nl> s : 0 . 42590190999623512 <nl> - dkappa : 0 . 003781065296697853 <nl> + dkappa : 0 . 0041695555835721 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0963687818516918 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 53719110135 <nl> - y : 4140989 . 4577073418 <nl> - theta : - 1 . 9400591225152943 <nl> - kappa : - 0 . 030877571122346681 <nl> + x : 587270 . 5372738333 <nl> + y : 4140989 . 4576753452 <nl> + theta : - 1 . 9397953759275386 <nl> + kappa : - 0 . 03036513957109125 <nl> s : 0 . 56781283606533384 <nl> - dkappa : 0 . 0050409198904160808 <nl> + dkappa : 0 . 0055588555145504046 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0946854912377422 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 4860041684 <nl> - y : 4140989 . 3253880031 <nl> - theta : - 1 . 944639388277291 <nl> - kappa : - 0 . 029631451289325692 <nl> + x : 587270 . 48610757175 <nl> + y : 4140989 . 3253480112 <nl> + theta : - 1 . 9443097413803649 <nl> + kappa : - 0 . 028990982450673275 <nl> s : 0 . 709687814490997 <nl> - dkappa : 0 . 00630045534870922 <nl> + dkappa : 0 . 0069478035201348933 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0927749253157781 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 4348318252 <nl> - y : 4140989 . 19310638 <nl> - theta : - 1 . 9492183485175625 <nl> - kappa : - 0 . 028385686640173716 <nl> + x : 587270 . 43495589436 <nl> + y : 4140989 . 1930583953 <nl> + theta : - 1 . 9488228200951543 <nl> + kappa : - 0 . 02761721700883206 <nl> s : 0 . 85152235402593845 <nl> - dkappa : 0 . 0075596317992525563 <nl> + dkappa : 0 . 0083363556312689348 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0906424994939679 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 38357645448 <nl> - y : 4140989 . 060906481 <nl> - theta : - 1 . 953762632206633 <nl> - kappa : - 0 . 027144125645740987 <nl> + x : 587270 . 38372440985 <nl> + y : 4140989 . 0608491427 <nl> + theta : - 1 . 9532981296646879 <nl> + kappa : - 0 . 02624850961645887 <nl> s : 0 . 99331207110228081 <nl> - dkappa : 0 . 0087793801781132861 <nl> + dkappa : 0 . 0096810244083405123 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0882935663050688 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 32889033132 <nl> - y : 4140988 . 930140161 <nl> - theta : - 1 . 957150169793511 <nl> - kappa : - 0 . 026035442255407527 <nl> + x : 587270 . 32917238644 <nl> + y : 4140988 . 9300268223 <nl> + theta : - 1 . 9565077409472227 <nl> + kappa : - 0 . 025041113899540928 <nl> s : 1 . 1350526885740484 <nl> - dkappa : 0 . 0086418835510068751 <nl> + dkappa : 0 . 0095140576812687734 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 085733415406426 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 27422476117 <nl> - y : 4140988 . 7994229868 <nl> - theta : - 1 . 9605364342132217 <nl> - kappa : - 0 . 024927175551016336 <nl> + x : 587270 . 27464086574 <nl> + y : 4140988 . 7992536705 <nl> + theta : - 1 . 9597161459341521 <nl> + kappa : - 0 . 023834171968461573 <nl> s : 1 . 276740034459658 <nl> - dkappa : 0 . 0085044386004314958 <nl> + dkappa : 0 . 0093471537067272934 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 082967273579972 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 2195813139 <nl> - y : 4140988 . 6687587136 <nl> - theta : - 1 . 963921328240593 <nl> - kappa : - 0 . 023819357352711366 <nl> + x : 587270 . 22013141355 <nl> + y : 4140988 . 6685334416 <nl> + theta : - 1 . 962923252506938 <nl> + kappa : - 0 . 022627718476491365 <nl> s : 1 . 4183700406844109 <nl> - dkappa : 0 . 008367049272655764 <nl> + dkappa : 0 . 00918031727680129 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 080000304732228 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 16496151919 <nl> - y : 4140988 . 5381509988 <nl> - theta : - 1 . 9673047571037268 <nl> - kappa : - 0 . 022712018677721595 <nl> + x : 587270 . 16564555606 <nl> + y : 4140988 . 5378697952 <nl> + theta : - 1 . 9661289708714618 <nl> + kappa : - 0 . 021421787202497891 <nl> s : 1 . 5599387418229849 <nl> - dkappa : 0 . 0082297194143724356 <nl> + dkappa : 0 . 0090135530626577129 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0768376098943 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 11036686786 <nl> - y : 4140988 . 4076034073 <nl> - theta : - 1 . 9706866284539459 <nl> - kappa : - 0 . 021605189750197228 <nl> + x : 587270 . 11118478014 <nl> + y : 4140988 . 4072662983 <nl> + theta : - 1 . 969333213529548 <nl> + kappa : - 0 . 020216411061657676 <nl> s : 1 . 701442273841925 <nl> - dkappa : 0 . 0080924527739182715 <nl> + dkappa : 0 . 00884686561602655 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0734842272218845 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 05579881219 <nl> - y : 4140988 . 2771194121 <nl> - theta : - 1 . 9740668523357394 <nl> - kappa : - 0 . 020498900011045765 <nl> + x : 587270 . 0567505348 <nl> + y : 4140988 . 2767264242 <nl> + theta : - 1 . 9725358952504901 <nl> + kappa : - 0 . 019011622116168022 <nl> s : 1 . 8428768728421376 <nl> - dkappa : 0 . 0079552530024938912 <nl> + dkappa : 0 . 00868025937068214 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0699451319952651 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587270 . 00118940847 <nl> - y : 4140988 . 1467321888 <nl> - theta : - 1 . 9774086629200627 <nl> - kappa : - 0 . 019396915750883852 <nl> + x : 587270 . 0022803793 <nl> + y : 4140988 . 1462808484 <nl> + theta : - 1 . 975697931507117 <nl> + kappa : - 0 . 017811932069162657 <nl> s : 1 . 9842388738013792 <nl> - dkappa : 0 . 0078181611881186219 <nl> + dkappa : 0 . 0085138438085091625 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0662252366193128 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 94417303009 <nl> - y : 4140988 . 0174618522 <nl> - theta : - 1 . 9794602389105367 <nl> - kappa : - 0 . 01842682055719029 <nl> + x : 587269 . 94559724245 <nl> + y : 4140988 . 0168640441 <nl> + theta : - 1 . 9774886015088042 <nl> + kappa : - 0 . 016770234783300048 <nl> s : 2 . 12552470931675 <nl> - dkappa : 0 . 0076824616892984254 <nl> + dkappa : 0 . 00835121109834712 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0623293906234874 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 88718878932 <nl> - y : 4140987 . 8882643795 <nl> - theta : - 1 . 9815106585196944 <nl> - kappa : - 0 . 01745727216262204 <nl> + x : 587269 . 88894605532 <nl> + y : 4140987 . 8875201866 <nl> + theta : - 1 . 9792782621901721 <nl> + kappa : - 0 . 01572912465544879 <nl> s : 2 . 2667309083471858 <nl> - dkappa : 0 . 00754683867819587 <nl> + dkappa : 0 . 0081886700569452579 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0582623806618336 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 83023804845 <nl> - y : 4140987 . 7591428594 <nl> - theta : - 1 . 9835598727264097 <nl> - kappa : - 0 . 016488293746997451 <nl> + x : 587269 . 83232817217 <nl> + y : 4140987 . 7582523669 <nl> + theta : - 1 . 9810668707642802 <nl> + kappa : - 0 . 014688626576314475 <nl> s : 2 . 4078540949559484 <nl> - dkappa : 0 . 00741129539726567 <nl> + dkappa : 0 . 0080262245703105421 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0540289305129864 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 773322132 <nl> - y : 4140987 . 6301002949 <nl> - theta : - 1 . 9856078338722825 <nl> - kappa : - 0 . 015519907845764933 <nl> + x : 587269 . 77574491012 <nl> + y : 4140987 . 6290635923 <nl> + theta : - 1 . 9828543856336114 <nl> + kappa : - 0 . 013648764744672224 <nl> s : 2 . 548890987053118 <nl> - dkappa : 0 . 0072758349988263516 <nl> + dkappa : 0 . 0078638784164238064 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0496337010801673 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 71644232713 <nl> - y : 4140987 . 5011396045 <nl> - theta : - 1 . 9876544956433786 <nl> - kappa : - 0 . 01455213635863721 <nl> + x : 587269 . 71919754846 <nl> + y : 4140987 . 4999567852 <nl> + theta : - 1 . 9846407663741341 <nl> + kappa : - 0 . 012609562676638252 <nl> s : 2 . 6898383951380866 <nl> - dkappa : 0 . 0071404605462680477 <nl> + dkappa : 0 . 0077016352666872566 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0450812903911872 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 65959988406 <nl> - y : 4140987 . 3722636234 <nl> - theta : - 1 . 98969981305197 <nl> - kappa : - 0 . 013585000558225651 <nl> + x : 587269 . 66268733051 <nl> + y : 4140987 . 3709347825 <nl> + theta : - 1 . 9864259737193648 <nl> + kappa : - 0 . 011571043214941457 <nl> s : 2 . 8306932210420461 <nl> - dkappa : 0 . 0070051750152602789 <nl> + dkappa : 0 . 0075394986873719757 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0403762335984421 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 60279601684 <nl> - y : 4140987 . 2434751024 <nl> - theta : - 1 . 9917437424182749 <nl> - kappa : - 0 . 012618521098674505 <nl> + x : 587269 . 60621546267 <nl> + y : 4140987 . 2420003396 <nl> + theta : - 1 . 98820996954443 <nl> + kappa : - 0 . 010533228538194987 <nl> s : 2 . 9714524566704847 <nl> - dkappa : 0 . 0068699812949597388 <nl> + dkappa : 0 . 0073774721410654279 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 035523002978918 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 54444088682 <nl> - y : 4140987 . 1154906079 <nl> - theta : - 1 . 9932167995056418 <nl> - kappa : - 0 . 011772438538681936 <nl> + x : 587269 . 54844785656 <nl> + y : 4140987 . 1137494813 <nl> + theta : - 1 . 9893651356252628 <nl> + kappa : - 0 . 0096389312826427476 <nl> s : 3 . 1121131827456745 <nl> - dkappa : 0 . 006745757738765447 <nl> + dkappa : 0 . 0072293249524014282 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0305260079341858 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 48608187737 <nl> - y : 4140986 . 9876189278 <nl> - theta : - 1 . 9946723592382303 <nl> - kappa : - 0 . 01093042110179723 <nl> + x : 587269 . 49068377283 <nl> + y : 4140986 . 9856079528 <nl> + theta : - 1 . 9905015635351064 <nl> + kappa : - 0 . 00874935240054969 <nl> s : 3 . 2526725675491646 <nl> - dkappa : 0 . 0066219375875104913 <nl> + dkappa : 0 . 0070816772641020152 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0253895949904086 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 42776608386 <nl> - y : 4140986 . 8598419381 <nl> - theta : - 1 . 9961268411033215 <nl> - kappa : - 0 . 010089027193584664 <nl> + x : 587269 . 43296246463 <nl> + y : 4140986 . 8575613163 <nl> + theta : - 1 . 9916371499001619 <nl> + kappa : - 0 . 00786043226721268 <nl> s : 3 . 3931278656642747 <nl> - dkappa : 0 . 006498209127248045 <nl> + dkappa : 0 . 006934138911503975 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0201180477983325 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 3694946107 <nl> - y : 4140986 . 73216206 <nl> - theta : - 1 . 9975802175514854 <nl> - kappa : - 0 . 0092482727509378918 <nl> + x : 587269 . 375285025 <nl> + y : 4140986 . 7296119947 <nl> + theta : - 1 . 9927718732112181 <nl> + kappa : - 0 . 006972187719722512 <nl> s : 3 . 5334764167185835 <nl> - dkappa : 0 . 0063745747015264628 <nl> + dkappa : 0 . 0067867126891402989 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0147155871332938 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 31126852788 <nl> - y : 4140986 . 6045816382 <nl> - theta : - 1 . 9990324619009434 <nl> - kappa : - 0 . 00840817320882813 <nl> + x : 587269 . 31765251281 <nl> + y : 4140986 . 601762339 <nl> + theta : - 1 . 993905712636483 <nl> + kappa : - 0 . 0060846350648964091 <nl> s : 3 . 6737156441264247 <nl> - dkappa : 0 . 0062510365800855254 <nl> + dkappa : 0 . 0066394013035319189 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0091863708952165 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 25308887067 <nl> - y : 4140986 . 47710294 <nl> - theta : - 2 . 0004835483245471 <nl> - kappa : - 0 . 0075687435078372525 <nl> + x : 587269 . 260065953 <nl> + y : 4140986 . 4740146222 <nl> + theta : - 1 . 9950386480114168 <nl> + kappa : - 0 . 0051977900872366171 <nl> s : 3 . 8138430538313748 <nl> - dkappa : 0 . 0061275969599641862 <nl> + dkappa : 0 . 006492207374508641 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 003534494108612 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 194956641 <nl> - y : 4140986 . 349728161 <nl> - theta : - 2 . 0019334518367562 <nl> - kappa : - 0 . 0067299981016908676 <nl> + x : 587269 . 20252633735 <nl> + y : 4140986 . 3463710444 <nl> + theta : - 1 . 9961706598285645 <nl> + kappa : - 0 . 0043116680568889816 <nl> s : 3 . 9538562330487452 <nl> - dkappa : 0 . 0060042579666083227 <nl> + dkappa : 0 . 0063451334365300571 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9977639889225784 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 13612576423 <nl> - y : 4140986 . 2228033571 <nl> - theta : - 2 . 0026677906352215 <nl> - kappa : - 0 . 0059973962253460919 <nl> + x : 587269 . 14455679478 <nl> + y : 4140986 . 2190503431 <nl> + theta : - 1 . 9965544424594983 <nl> + kappa : - 0 . 003550805585855851 <nl> s : 4 . 0937528490080783 <nl> - dkappa : 0 . 00588463091087681 <nl> + dkappa : 0 . 0062038341769170341 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9918788246108026 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 0772508597 <nl> - y : 4140986 . 0960296271 <nl> - theta : - 2 . 0033116240175293 <nl> - kappa : - 0 . 0052786838706518988 <nl> + x : 587269 . 08657698112 <nl> + y : 4140986 . 0918647535 <nl> + theta : - 1 . 9968448363438089 <nl> + kappa : - 0 . 0028060965660996482 <nl> s : 4 . 233530647695634 <nl> - dkappa : 0 . 0057655595799120905 <nl> + dkappa : 0 . 006063358822914173 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9858829075715594 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587269 . 01842691808 <nl> - y : 4140985 . 9693656345 <nl> - theta : - 2 . 0039549000878787 <nl> - kappa : - 0 . 0045605936442919392 <nl> + x : 587269 . 0286473555 <nl> + y : 4140985 . 9647892574 <nl> + theta : - 1 . 9971349788587613 <nl> + kappa : - 0 . 0020620321777859454 <nl> s : 4 . 3731874525968824 <nl> - dkappa : 0 . 005646591318900605 <nl> + dkappa : 0 . 0059230050665120982 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9797800813277107 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 95965482411 <nl> - y : 4140985 . 8428132837 <nl> - theta : - 2 . 0045976091721607 <nl> - kappa : - 0 . 0038431363454921306 <nl> + x : 587268 . 97076878953 <nl> + y : 4140985 . 8378257668 <nl> + theta : - 1 . 9974248656409557 <nl> + kappa : - 0 . 001318623610761272 <nl> s : 4 . 512721163439 <nl> - dkappa : 0 . 0055277279169840005 <nl> + dkappa : 0 . 0057827750184649574 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9735741265267057 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 900935431 <nl> - y : 4140985 . 7163744122 <nl> - theta : - 2 . 0052397419416512 <nl> - kappa : - 0 . 0031263223879231319 <nl> + x : 587268 . 9129421229 <nl> + y : 4140985 . 7109761233 <nl> + theta : - 1 . 997714492482775 <nl> + kappa : - 0 . 00057588165537091421 <nl> s : 4 . 6521297549333562 <nl> - dkappa : 0 . 0054089710994277675 <nl> + dkappa : 0 . 0056426707141685028 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9672687609405832 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 84226956044 <nl> - y : 4140985 . 5900507895 <nl> - theta : - 2 . 0058812894072213 <nl> - kappa : - 0 . 0024101618061662094 <nl> + x : 587268 . 85516816517 <nl> + y : 4140985 . 5842421036 <nl> + theta : - 1 . 9980038553297725 <nl> + kappa : 0 . 00016618329084134187 <nl> s : 4 . 7914112755180067 <nl> - dkappa : 0 . 0052903225286924718 <nl> + dkappa : 0 . 0055026941149238654 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9608676394659668 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 78365800413 <nl> - y : 4140985 . 4638441205 <nl> - theta : - 2 . 006522242913543 <nl> - kappa : - 0 . 0016946642621791207 <nl> + x : 587268 . 797447696 <nl> + y : 4140985 . 457625417 <nl> + theta : - 1 . 9982929502780593 <nl> + kappa : 0 . 0009075612164334433 <nl> s : 4 . 9305638461001857 <nl> - dkappa : 0 . 0051717838055049727 <nl> + dkappa : 0 . 0053628471092013463 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 95437435412407 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 724956149 <nl> - y : 4140985 . 3378236941 <nl> - theta : - 2 . 0066471978590092 <nl> - kappa : - 0 . 0010624780724164502 <nl> + x : 587268 . 739880547 <nl> + y : 4140985 . 3310826025 <nl> + theta : - 1 . 9980529070136008 <nl> + kappa : 0 . 0015511992425546902 <nl> s : 5 . 0695856587987986 <nl> - dkappa : 0 . 0050590460486279621 <nl> + dkappa : 0 . 00523058189512042 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9477924340606938 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 66626104771 <nl> - y : 4140985 . 2119462634 <nl> - theta : - 2 . 0065976324535129 <nl> - kappa : - 0 . 00045885802014961009 <nl> + x : 587268 . 68240140018 <nl> + y : 4140985 . 2046453059 <nl> + theta : - 1 . 9976362177000273 <nl> + kappa : 0 . 0021617685739582218 <nl> s : 5 . 2084749756869124 <nl> - dkappa : 0 . 0049483409932113576 <nl> + dkappa : 0 . 0051009344526712595 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9411253455462267 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 6076226451 <nl> - y : 4140985 . 0861904291 <nl> - theta : - 2 . 0065481149274698 <nl> - kappa : 0 . 00014417894400978832 <nl> + x : 587268 . 62497777725 <nl> + y : 4140985 . 0783301461 <nl> + theta : - 1 . 9972199309022127 <nl> + kappa : 0 . 0027717481043527037 <nl> s : 5 . 347230127534246 <nl> - dkappa : 0 . 0048377428772527877 <nl> + dkappa : 0 . 0049714122477478705 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9343764919756437 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 54904161813 <nl> - y : 4140984 . 9605576424 <nl> - theta : - 2 . 006498645852512 <nl> - kappa : 0 . 00074662585859581782 <nl> + x : 587268 . 56761034124 <nl> + y : 4140984 . 9521385804 <nl> + theta : - 1 . 9968040514257763 <nl> + kappa : 0 . 0033811307921271395 <nl> s : 5 . 4858495125496667 <nl> - dkappa : 0 . 0047272529774982242 <nl> + dkappa : 0 . 004842016775556136 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9275492138685095 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 49051861546 <nl> - y : 4140984 . 8350492949 <nl> - theta : - 2 . 0064492257766515 <nl> - kappa : 0 . 0013484760497713077 <nl> + x : 587268 . 51029972767 <nl> + y : 4140984 . 8260720074 <nl> + theta : - 1 . 9963885838777828 <nl> + kappa : 0 . 0039899098866106684 <nl> s : 5 . 6243315951236763 <nl> - dkappa : 0 . 004616872517941982 <nl> + dkappa : 0 . 0047127494695241171 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9206467888689742 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 43205425888 <nl> - y : 4140984 . 7096667187 <nl> - theta : - 2 . 006399855224732 <nl> - kappa : 0 . 0019497231258626723 <nl> + x : 587268 . 45304654515 <nl> + y : 4140984 . 7001317665 <nl> + theta : - 1 . 995973532670515 <nl> + kappa : 0 . 0045980789225444655 <nl> s : 5 . 7626749045709076 <nl> - dkappa : 0 . 0045066026708290487 <nl> + dkappa : 0 . 0045836117024758774 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9136724317457787 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 37364914292 <nl> - y : 4140984 . 5844111904 <nl> - theta : - 2 . 0063505346988757 <nl> - kappa : 0 . 0025503609718946908 <nl> + x : 587268 . 395851376 <nl> + y : 4140984 . 5743191377 <nl> + theta : - 1 . 9955589020252451 <nl> + kappa : 0 . 0052056317145536147 <nl> s : 5 . 900878033872611 <nl> - dkappa : 0 . 0043964445576574057 <nl> + dkappa : 0 . 0044546047878053219 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 906629294392248 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 3154913194 <nl> - y : 4140984 . 4591968218 <nl> - theta : - 2 . 0059855363807868 <nl> - kappa : 0 . 0030947782891284094 <nl> + x : 587268 . 33908602514 <nl> + y : 4140984 . 4484677818 <nl> + theta : - 1 . 9948276934913176 <nl> + kappa : 0 . 005747533396977385 <nl> s : 6 . 038939638419154 <nl> - dkappa : 0 . 0042904747057310993 <nl> + dkappa : 0 . 0043310730387741614 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8995204658262983 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 25755187485 <nl> - y : 4140984 . 3340384616 <nl> - theta : - 2 . 00535446535265 <nl> - kappa : 0 . 0035917057697067946 <nl> + x : 587268 . 2826878624 <nl> + y : 4140984 . 3226073775 <nl> + theta : - 1 . 9938338434857836 <nl> + kappa : 0 . 0062348418952261342 <nl> s : 6 . 1768584347525026 <nl> - dkappa : 0 . 0041880538361241046 <nl> + dkappa : 0 . 004212108623220359 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8923489721904305 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 19967293774 <nl> - y : 4140984 . 2090108073 <nl> - theta : - 2 . 0047240533665294 <nl> - kappa : 0 . 0040881142974663193 <nl> + x : 587268 . 22634859756 <nl> + y : 4140984 . 1968784104 <nl> + theta : - 1 . 9928410313807123 <nl> + kappa : 0 . 0067216414859809209 <nl> s : 6 . 3146331993087239 <nl> - dkappa : 0 . 0040857399269913636 <nl> + dkappa : 0 . 0040932684449470616 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8851177767517351 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 14185499749 <nl> - y : 4140984 . 0841149152 <nl> - theta : - 2 . 0040943057527496 <nl> - kappa : 0 . 0045839996751225855 <nl> + x : 587268 . 170068707 <nl> + y : 4140984 . 0712819463 <nl> + theta : - 1 . 9918492655706304 <nl> + kappa : 0 . 0072079280532038239 <nl> s : 6 . 45226276716047 <nl> - dkappa : 0 . 0039835338434279551 <nl> + dkappa : 0 . 003974553508783959 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 87782977990189 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 08409851941 <nl> - y : 4140983 . 959351792 <nl> - theta : - 2 . 0034652275790874 <nl> - kappa : 0 . 0050793579121305409 <nl> + x : 587268 . 11384864349 <nl> + y : 4140983 . 9458189942 <nl> + theta : - 1 . 990858554036588 <nl> + kappa : 0 . 0076936976835944243 <nl> s : 6 . 589746030759474 <nl> - dkappa : 0 . 0038814364079182689 <nl> + dkappa : 0 . 0038559647700673492 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8704878191571606 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587268 . 02640394529 <nl> - y : 4140983 . 8347223904 <nl> - theta : - 2 . 002836823656525 <nl> - kappa : 0 . 0055741852201536121 <nl> + x : 587268 . 05768883717 <nl> + y : 4140983 . 8204905153 <nl> + theta : - 1 . 9898689043552207 <nl> + kappa : 0 . 0081789466621466529 <nl> s : 6 . 7270819386790359 <nl> - dkappa : 0 . 0037794484012698476 <nl> + dkappa : 0 . 00373750313572483 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8630946691583983 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587267 . 96877169353 <nl> - y : 4140983 . 7102276152 <nl> - theta : - 2 . 0022090985450056 <nl> - kappa : 0 . 0060684780085328675 <nl> + x : 587268 . 00158969546 <nl> + y : 4140983 . 6952974172 <nl> + theta : - 1 . 9888803237078105 <nl> + kappa : 0 . 0086636714677056515 <nl> s : 6 . 8642694943565248 <nl> - dkappa : 0 . 0036775705635472386 <nl> + dkappa : 0 . 0036191694653599808 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8556530416710464 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587267 . 9114143094 <nl> - y : 4140983 . 5857709316 <nl> - theta : - 2 . 00148278408689 <nl> - kappa : 0 . 006537017014558247 <nl> + x : 587267 . 94585853524 <nl> + y : 4140983 . 5701046726 <nl> + theta : - 1 . 9877959563937746 <nl> + kappa : 0 . 0091182193567264855 <nl> s : 7 . 0013077548358593 <nl> - dkappa : 0 . 0035778706284121924 <nl> + dkappa : 0 . 003503692790676798 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8481655855851313 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587267 . 62846948509 <nl> - y : 4140982 . 9642201937 <nl> - theta : - 1 . 9965097386417405 <nl> - kappa : 0 . 0085281573033937925 <nl> + x : 587267 . 67218732613 <nl> + y : 4140982 . 9444153225 <nl> + theta : - 1 . 9811102047827451 <nl> + kappa : 0 . 010991056003458299 <nl> s : 7 . 6842302198102557 <nl> - dkappa : 0 . 0031092039017890736 <nl> + dkappa : 0 . 0029643262306118974 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8101291860492568 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587267 . 35051407153 <nl> - y : 4140982 . 3446422187 <nl> - theta : - 1 . 9903351956381463 <nl> - kappa : 0 . 010254316386093091 <nl> + x : 587267 . 40436364873 <nl> + y : 4140982 . 3203953784 <nl> + theta : - 1 . 9733171154688383 <nl> + kappa : 0 . 012564615508080848 <nl> s : 8 . 3633074845484643 <nl> - dkappa : 0 . 0026629494341860031 <nl> + dkappa : 0 . 0024548225676875044 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 7713082516915222 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587267 . 07728173048 <nl> - y : 4140981 . 7272372236 <nl> - theta : - 1 . 9831741594743015 <nl> - kappa : 0 . 011751712253638266 <nl> + x : 587267 . 1419856085 <nl> + y : 4140981 . 698301964 <nl> + theta : - 1 . 9646293159284904 <nl> + kappa : 0 . 013881338770120008 <nl> s : 9 . 0384744418651373 <nl> - dkappa : 0 . 0022370987014656272 <nl> + dkappa : 0 . 0019722078187950007 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 7319631589266509 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587266 . 812089342 <nl> - y : 4140981 . 1106308661 <nl> - theta : - 1 . 974688375892832 <nl> - kappa : 0 . 012888155134759792 <nl> + x : 587266 . 88881426968 <nl> + y : 4140981 . 0766632622 <nl> + theta : - 1 . 9548082372926621 <nl> + kappa : 0 . 014797348378405011 <nl> s : 9 . 7096900573597722 <nl> - dkappa : 0 . 0018481621127399276 <nl> + dkappa : 0 . 0015370700984766303 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 6923149870366858 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587266 . 55338078819 <nl> - y : 4140980 . 4955987027 <nl> - theta : - 1 . 9655746162751224 <nl> - kappa : 0 . 013806396133655101 <nl> + x : 587266 . 64279371011 <nl> + y : 4140980 . 45645113 <nl> + theta : - 1 . 9445083760169701 <nl> + kappa : 0 . 01547452561637684 <nl> s : 10 . 376933439703432 <nl> - dkappa : 0 . 0014835216039521077 <nl> + dkappa : 0 . 0011332808294537238 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 6525455181709816 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587266 . 30021611624 <nl> - y : 4140979 . 8825546387 <nl> - theta : - 1 . 9561477347476464 <nl> - kappa : 0 . 0145528498958814 <nl> + x : 587266 . 4028069668 <nl> + y : 4140979 . 8381308969 <nl> + theta : - 1 . 9340262842450233 <nl> + kappa : 0 . 015965220641556147 <nl> s : 11 . 040199910925482 <nl> - dkappa : 0 . 0011385870612821282 <nl> + dkappa : 0 . 00075461147809351679 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 6127972373462116 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587266 . 05677935679 <nl> - y : 4140979 . 269846472 <nl> - theta : - 1 . 947719810617653 <nl> - kappa : 0 . 015007637904345282 <nl> + x : 587266 . 17336252891 <nl> + y : 4140979 . 2200467577 <nl> + theta : - 1 . 9247912731624077 <nl> + kappa : 0 . 016143325898096618 <nl> s : 11 . 699497076700322 <nl> - dkappa : 0 . 00082822938142983193 <nl> + dkappa : 0 . 00041877802243925474 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 5731733324463626 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587265 . 81999067334 <nl> - y : 4140978 . 6587969847 <nl> - theta : - 1 . 9382596504547103 <nl> - kappa : 0 . 015304258993141827 <nl> + x : 587265 . 95088227594 <nl> + y : 4140978 . 6036461093 <nl> + theta : - 1 . 914680132836549 <nl> + kappa : 0 . 016155964318913467 <nl> s : 12 . 354840934468566 <nl> - dkappa : 0 . 00053628759499811955 <nl> + dkappa : 0 . 00010768167689963122 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 5337407320269678 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587265 . 5888222676 <nl> - y : 4140978 . 0497803157 <nl> - theta : - 1 . 9279801834236165 <nl> - kappa : 0 . 015473274184449781 <nl> + x : 587265 . 73424104869 <nl> + y : 4140977 . 9893121356 <nl> + theta : - 1 . 9038868658893915 <nl> + kappa : 0 . 016036184398376632 <nl> s : 13 . 006254908629478 <nl> - dkappa : 0 . 00025950003261793815 <nl> + dkappa : - 0 . 00018322768307994008 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 4945999199103337 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587265 . 3684840058 <nl> - y : 4140977 . 4409009852 <nl> - theta : - 1 . 9175544822434631 <nl> - kappa : 0 . 015396977236964092 <nl> + x : 587265 . 52872126852 <nl> + y : 4140977 . 3752725529 <nl> + theta : - 1 . 8932430350487812 <nl> + kappa : 0 . 01566656944695953 <nl> s : 13 . 653775556290347 <nl> - dkappa : 1 . 8537880461276507e - 05 <nl> + dkappa : - 0 . 00043164523061107454 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 4558976401389225 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587265 . 15348805184 <nl> - y : 4140976 . 8342101388 <nl> - theta : - 1 . 9072113006583136 <nl> - kappa : 0 . 015229230883362465 <nl> + x : 587265 . 3285666192 <nl> + y : 4140976 . 7635252113 <nl> + theta : - 1 . 8828118621412406 <nl> + kappa : 0 . 015205874245726191 <nl> s : 14 . 297453460696456 <nl> - dkappa : - 0 . 00020831011217614786 <nl> + dkappa : - 0 . 00066275682810091035 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 41776547869716 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 94505652983 <nl> - y : 4140976 . 2292095195 <nl> - theta : - 1 . 8969559906220972 <nl> - kappa : 0 . 01494170319470969 <nl> + x : 587265 . 134909082 <nl> + y : 4140976 . 1536348877 <nl> + theta : - 1 . 8726338543989862 <nl> + kappa : 0 . 014628144378003046 <nl> s : 14 . 937351459422306 <nl> - dkappa : - 0 . 00041715803458594375 <nl> + dkappa : - 0 . 00087218733024779424 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 38031693618506 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 74563622253 <nl> - y : 4140975 . 625091501 <nl> - theta : - 1 . 8891607492735267 <nl> - kappa : 0 . 014497116137845482 <nl> + x : 587264 . 95015677484 <nl> + y : 4140975 . 5448700804 <nl> + theta : - 1 . 8651941833081636 <nl> + kappa : 0 . 01389802441111157 <nl> s : 15 . 573542835833182 <nl> - dkappa : - 0 . 00060631013462582458 <nl> + dkappa : - 0 . 0010569662917019377 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 3436474278182224 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 55093432206 <nl> - y : 4140975 . 02324728 <nl> - theta : - 1 . 8813549041081057 <nl> - kappa : 0 . 013986838927002828 <nl> + x : 587264 . 76990137924 <nl> + y : 4140974 . 9385410724 <nl> + theta : - 1 . 8578161928106089 <nl> + kappa : 0 . 013108133712281303 <nl> s : 16 . 206109510546703 <nl> - dkappa : - 0 . 00078320720223302867 <nl> + dkappa : - 0 . 001226555047700922 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 3078342834278329 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 36371422408 <nl> - y : 4140974 . 4227239373 <nl> - theta : - 1 . 8721337795159958 <nl> - kappa : 0 . 013363103466440738 <nl> + x : 587264 . 59661368979 <nl> + y : 4140974 . 3338502208 <nl> + theta : - 1 . 8492333096820741 <nl> + kappa : 0 . 012217499249862372 <nl> s : 16 . 835140232894396 <nl> - dkappa : - 0 . 00093600073690509823 <nl> + dkappa : - 0 . 0013666010180383025 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 2729367474606663 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 18253329955 <nl> - y : 4140973 . 8239596719 <nl> - theta : - 1 . 8633433437217573 <nl> - kappa : 0 . 012661325833973041 <nl> + x : 587264 . 42892226879 <nl> + y : 4140973 . 7311663488 <nl> + theta : - 1 . 8412508113700148 <nl> + kappa : 0 . 011261226469037038 <nl> s : 17 . 460728772383231 <nl> - dkappa : - 0 . 0010716631924900836 <nl> + dkappa : - 0 . 0014853719264638207 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 2389959789790819 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587264 . 00521905313 <nl> - y : 4140973 . 227514985 <nl> - theta : - 1 . 8548202643827496 <nl> - kappa : 0 . 011916275241897747 <nl> + x : 587264 . 26477599121 <nl> + y : 4140973 . 1309647076 <nl> + theta : - 1 . 8336310097391353 <nl> + kappa : 0 . 010270268159248544 <nl> s : 18 . 0829721101572 <nl> - dkappa : - 0 . 0011971745949886379 <nl> + dkappa : - 0 . 0015916929328879512 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 2060350516610274 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 83592540165 <nl> - y : 4140972 . 6321190228 <nl> - theta : - 1 . 8470882942991182 <nl> - kappa : 0 . 011075001028776937 <nl> + x : 587264 . 10752916476 <nl> + y : 4140972 . 5322743636 <nl> + theta : - 1 . 827012269615776 <nl> + kappa : 0 . 009212420048896516 <nl> s : 18 . 701968630458879 <nl> - dkappa : - 0 . 0012959206342250985 <nl> + dkappa : - 0 . 0016641269902817374 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 1740589538000359 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 66985355923 <nl> - y : 4140972 . 0390948285 <nl> - theta : - 1 . 840653317462416 <nl> - kappa : 0 . 010208751958690383 <nl> + x : 587263 . 95314247755 <nl> + y : 4140971 . 9360985 <nl> + theta : - 1 . 821839839446209 <nl> + kappa : 0 . 0081427477316417113 <nl> s : 19 . 317816312090955 <nl> - dkappa : - 0 . 0013880269475981782 <nl> + dkappa : - 0 . 0017260210612367465 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 143054588305227 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 50883611257 <nl> - y : 4140971 . 4478329467 <nl> - theta : - 1 . 8365044367850778 <nl> - kappa : 0 . 009294362547242252 <nl> + x : 587263 . 80289861467 <nl> + y : 4140971 . 3420075867 <nl> + theta : - 1 . 8190088790397763 <nl> + kappa : 0 . 0070501723300684044 <nl> s : 19 . 930610919877825 <nl> - dkappa : - 0 . 0014686761365041647 <nl> + dkappa : - 0 . 0017709335094615987 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 1129907727013082 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 3522879635 <nl> - y : 4140970 . 8584406646 <nl> - theta : - 1 . 8311421370492158 <nl> - kappa : 0 . 0083573930481675024 <nl> + x : 587263 . 65620609315 <nl> + y : 4140970 . 750082917 <nl> + theta : - 1 . 815015445084283 <nl> + kappa : 0 . 0059679676295635569 <nl> s : 20 . 54044419612713 <nl> - dkappa : - 0 . 0015187552446179729 <nl> + dkappa : - 0 . 0017779075107199945 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 0838182391285738 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 19816357247 <nl> - y : 4140970 . 2713778336 <nl> - theta : - 1 . 8253350974901488 <nl> - kappa : 0 . 0074150075043615243 <nl> + x : 587263 . 51143430755 <nl> + y : 4140970 . 1606438546 <nl> + theta : - 1 . 8106855374304709 <nl> + kappa : 0 . 0048988811662868809 <nl> s : 21 . 147402052091316 <nl> - dkappa : - 0 . 0015534860524180204 <nl> + dkappa : - 0 . 0017654339390608214 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 0554696343429031 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587263 . 04893111472 <nl> - y : 4140969 . 68593797 <nl> - theta : - 1 . 820509704675666 <nl> - kappa : 0 . 006509323023476731 <nl> + x : 587263 . 3700143412 <nl> + y : 4140969 . 573267865 <nl> + theta : - 1 . 80739559421898 <nl> + kappa : 0 . 0039188679265581457 <nl> s : 21 . 7515627594292 <nl> - dkappa : - 0 . 0015203183919011778 <nl> + dkappa : - 0 . 0016760907223050386 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 0278595197157649 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 90168827621 <nl> - y : 4140969 . 102810936 <nl> - theta : - 1 . 8168068798575578 <nl> - kappa : 0 . 005709580924591064 <nl> + x : 587263 . 2300811375 <nl> + y : 4140968 . 9883418572 <nl> + theta : - 1 . 8053541736463219 <nl> + kappa : 0 . 0030833804049117831 <nl> s : 22 . 352995141667527 <nl> - dkappa : - 0 . 0013981147616835832 <nl> + dkappa : - 0 . 0014828958168721137 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 0008843712342106 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 75746135472 <nl> - y : 4140968 . 5216792147 <nl> - theta : - 1 . 8150967082284359 <nl> - kappa : 0 . 0050962444665588573 <nl> + x : 587263 . 092073308 <nl> + y : 4140968 . 4057018985 <nl> + theta : - 1 . 8052185583019149 <nl> + kappa : 0 . 002467004505447718 <nl> s : 22 . 951756765662523 <nl> - dkappa : - 0 . 0011163398182969144 <nl> + dkappa : - 0 . 0011302682934243541 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 9744225795008825 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 61576387694 <nl> - y : 4140967 . 9426289275 <nl> - theta : - 1 . 8121990790873266 <nl> - kappa : 0 . 0046005649182879142 <nl> + x : 587262 . 95560202119 <nl> + y : 4140967 . 8253963836 <nl> + theta : - 1 . 8037795532817602 <nl> + kappa : 0 . 0020299941234888292 <nl> s : 23 . 547893723331565 <nl> - dkappa : - 0 . 00091074380571053485 <nl> + dkappa : - 0 . 00085419880159728076 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 9483978635215395 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 47560012853 <nl> - y : 4140967 . 3658531476 <nl> - theta : - 1 . 8087334094104037 <nl> - kappa : 0 . 00416288228637441 <nl> + x : 587262 . 82010989264 <nl> + y : 4140967 . 2475053514 <nl> + theta : - 1 . 801828372106379 <nl> + kappa : 0 . 0016709295263069471 <nl> s : 24 . 141456000859275 <nl> - dkappa : - 0 . 00074244635466694231 <nl> + dkappa : - 0 . 000608505709166922 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 9229616314027753 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 33831408562 <nl> - y : 4140966 . 7909626975 <nl> - theta : - 1 . 8056699125369347 <nl> - kappa : 0 . 0039328963513193078 <nl> + x : 587262 . 68609522644 <nl> + y : 4140966 . 6718433592 <nl> + theta : - 1 . 800163189577717 <nl> + kappa : 0 . 0016072397930481136 <nl> s : 24 . 732511547593937 <nl> - dkappa : - 0 . 00053376797521054772 <nl> + dkappa : - 0 . 00031165445927453281 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 89828894782588 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 20225089823 <nl> - y : 4140966 . 2182729072 <nl> - theta : - 1 . 8031436629436277 <nl> - kappa : 0 . 0037754775822805434 <nl> + x : 587262 . 5529491679 <nl> + y : 4140966 . 0984676206 <nl> + theta : - 1 . 79906437397105 <nl> + kappa : 0 . 0016525172478990386 <nl> s : 25 . 32114373298301 <nl> - dkappa : - 0 . 0003134603948643373 <nl> + dkappa : 4 . 7590556027509324e - 07 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 8745131500930938 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587262 . 06842857087 <nl> - y : 4140965 . 6474460424 <nl> - theta : - 1 . 8021091814388661 <nl> - kappa : 0 . 0038072398444461966 <nl> + x : 587262 . 42103639944 <nl> + y : 4140965 . 5271964534 <nl> + theta : - 1 . 7992086605858342 <nl> + kappa : 0 . 0019382780531985091 <nl> s : 25 . 907447173835219 <nl> - dkappa : - 6 . 1624135240810892e - 05 <nl> + dkappa : 0 . 0003478921246129257 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 8517258481276047 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 93629568792 <nl> - y : 4140965 . 0785129461 <nl> - theta : - 1 . 7999716405412485 <nl> - kappa : 0 . 0039986193929796845 <nl> + x : 587262 . 29033328325 <nl> + y : 4140964 . 9579323977 <nl> + theta : - 1 . 79793727772455 <nl> + kappa : 0 . 0024610544437733205 <nl> s : 26 . 491523561582664 <nl> - dkappa : 0 . 00021243490563839848 <nl> + dkappa : 0 . 000724086607405284 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 8299769244735469 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 80565179116 <nl> - y : 4140964 . 5114128264 <nl> - theta : - 1 . 7968963572308665 <nl> - kappa : 0 . 0043257401068251926 <nl> + x : 587262 . 160581856 <nl> + y : 4140964 . 3906274168 <nl> + theta : - 1 . 7957184341953634 <nl> + kappa : 0 . 0031421233267297636 <nl> s : 27 . 073477489542896 <nl> - dkappa : 0 . 00050529619760509008 <nl> + dkappa : 0 . 001119163646361722 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 8092745342959988 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 67795065348 <nl> - y : 4140963 . 9457139615 <nl> - theta : - 1 . 7935725212520031 <nl> - kappa : 0 . 0049845151756306143 <nl> + x : 587262 . 03334372351 <nl> + y : 4140963 . 8248234307 <nl> + theta : - 1 . 7927880399249247 <nl> + kappa : 0 . 0042960850074716585 <nl> s : 27 . 653412280181033 <nl> - dkappa : 0 . 000798017809782879 <nl> + dkappa : 0 . 0015081511779727838 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 7895851053809935 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 551272328 <nl> - y : 4140963 . 3817527527 <nl> - theta : - 1 . 7901972461453093 <nl> - kappa : 0 . 0057212817427466488 <nl> + x : 587261 . 90683415986 <nl> + y : 4140963 . 2608243404 <nl> + theta : - 1 . 7897603112107796 <nl> + kappa : 0 . 0055169538540893563 <nl> s : 28 . 231425812371832 <nl> - dkappa : 0 . 001089980812679981 <nl> + dkappa : 0 . 0018951477675270413 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 7708333381355059 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 426445646 <nl> - y : 4140962 . 819259658 <nl> - theta : - 1 . 7870426922576432 <nl> - kappa : 0 . 0061445449462197562 <nl> + x : 587261 . 78238433413 <nl> + y : 4140962 . 6982476427 <nl> + theta : - 1 . 7868506477272847 <nl> + kappa : 0 . 0061291927616734677 <nl> s : 28 . 807606348661793 <nl> - dkappa : 0 . 000964909117508048 <nl> + dkappa : 0 . 0015091779120207211 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 7529022055874579 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 3045096203 <nl> - y : 4140962 . 2579288688 <nl> - theta : - 1 . 78426128740031 <nl> - kappa : 0 . 0060279147585914853 <nl> + x : 587261 . 66044108465 <nl> + y : 4140962 . 1369184218 <nl> + theta : - 1 . 7840889470760435 <nl> + kappa : 0 . 0059640846340100386 <nl> s : 29 . 38202836253128 <nl> - dkappa : 0 . 00011997271837885056 <nl> + dkappa : 0 . 00013478886978107575 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 735632953385724 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 18499160546 <nl> - y : 4140961 . 6978209368 <nl> - theta : - 1 . 78082521425949 <nl> - kappa : 0 . 0058486664690800081 <nl> + x : 587261 . 5411362442 <nl> + y : 4140961 . 5767647447 <nl> + theta : - 1 . 7806180558253839 <nl> + kappa : 0 . 005735285956398788 <nl> s : 29 . 954748365656563 <nl> - dkappa : - 0 . 00026563575426425843 <nl> + dkappa : - 0 . 00035137562117114768 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 7188250998001209 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587261 . 06709688413 <nl> - y : 4140961 . 1390708648 <nl> - theta : - 1 . 7769881034617667 <nl> - kappa : 0 . 0056308989458320659 <nl> + x : 587261 . 42318991548 <nl> + y : 4140961 . 018025564 <nl> + theta : - 1 . 7768387276547444 <nl> + kappa : 0 . 0054786550307913207 <nl> s : 30 . 525800735171952 <nl> - dkappa : - 0 . 00036686356465194075 <nl> + dkappa : - 0 . 00044352449815337157 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 7022364357214137 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 95219957479 <nl> - y : 4140960 . 5813921541 <nl> - theta : - 1 . 7741957793895449 <nl> - kappa : 0 . 0053332711319473581 <nl> + x : 587261 . 3084103663 <nl> + y : 4140960 . 4603220103 <nl> + theta : - 1 . 7742349973857265 <nl> + kappa : 0 . 0051432834537102085 <nl> s : 31 . 095193540931884 <nl> - dkappa : - 0 . 00046157084921115096 <nl> + dkappa : - 0 . 00052871949707474191 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 6855830246613186 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 83834792778 <nl> - y : 4140960 . 0252153128 <nl> - theta : - 1 . 7715383981543413 <nl> - kappa : 0 . 0050152196260421812 <nl> + x : 587261 . 19464113109 <nl> + y : 4140959 . 9041286861 <nl> + theta : - 1 . 7716352312031847 <nl> + kappa : 0 . 0047900567699962005 <nl> s : 31 . 662904372773006 <nl> - dkappa : - 0 . 000554219939310467 <nl> + dkappa : - 0 . 00061193472768168548 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 6685392027524939 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 72743930074 <nl> - y : 4140959 . 4702168 <nl> - theta : - 1 . 7684359693975975 <nl> - kappa : 0 . 0046205780376488235 <nl> + x : 587261 . 08349224459 <nl> + y : 4140959 . 34917824 <nl> + theta : - 1 . 7686494388586087 <nl> + kappa : 0 . 0043741943905036646 <nl> s : 32 . 2288761677763 <nl> - dkappa : - 0 . 00063929667295303761 <nl> + dkappa : - 0 . 00068885760884963788 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 6507375787485481 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 61764083419 <nl> - y : 4140958 . 9168693153 <nl> - theta : - 1 . 7655352699943641 <nl> - kappa : 0 . 0042026518302238627 <nl> + x : 587260 . 97360463487 <nl> + y : 4140958 . 7958484455 <nl> + theta : - 1 . 7659234180786099 <nl> + kappa : 0 . 0039317331804107139 <nl> s : 32 . 793013037529114 <nl> - dkappa : - 0 . 0007217832999970935 <nl> + dkappa : - 0 . 00076267812074683444 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 6317690340240372 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 50984384585 <nl> - y : 4140958 . 3651383 <nl> - theta : - 1 . 7630577198193085 <nl> - kappa : 0 . 0037332588009193887 <nl> + x : 587260 . 8654418902 <nl> + y : 4140958 . 2441890179 <nl> + theta : - 1 . 7635790195000089 <nl> + kappa : 0 . 0034492405626422411 <nl> s : 33 . 35517609538735 <nl> - dkappa : - 0 . 00079899465980391281 <nl> + dkappa : - 0 . 000831995704128623 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 6111827225744637 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 403496168 <nl> - y : 4140957 . 8153267275 <nl> - theta : - 1 . 7610217056608948 <nl> - kappa : 0 . 0032279722610726426 <nl> + x : 587260 . 75881370367 <nl> + y : 4140957 . 6944316151 <nl> + theta : - 1 . 7617524452546027 <nl> + kappa : 0 . 0029294159208825563 <nl> s : 33 . 915179283737473 <nl> - dkappa : - 0 . 00087263986036343114 <nl> + dkappa : - 0 . 00089744229004793731 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 5884860710162787 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 2985097979 <nl> - y : 4140957 . 2676934372 <nl> - theta : - 1 . 7593725472048845 <nl> - kappa : 0 . 0026918530258583572 <nl> + x : 587260 . 65332670067 <nl> + y : 4140957 . 1468945369 <nl> + theta : - 1 . 7602450436169663 <nl> + kappa : 0 . 0023878381292554095 <nl> s : 34 . 472785201258652 <nl> - dkappa : - 0 . 00094310803443439621 <nl> + dkappa : - 0 . 00096040295229559282 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 5631447785868806 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 19504855853 <nl> - y : 4140956 . 7225082787 <nl> - theta : - 1 . 7580103728014354 <nl> - kappa : 0 . 0021118591471074293 <nl> + x : 587260 . 549373908 <nl> + y : 4140956 . 6018027514 <nl> + theta : - 1 . 7590587704739549 <nl> + kappa : 0 . 0018024782811208637 <nl> s : 35 . 027700930184835 <nl> - dkappa : - 0 . 0010079163168441548 <nl> + dkappa : - 0 . 0010176431413657667 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 5345828171446119 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587260 . 09251386474 <nl> - y : 4140956 . 1802441627 <nl> - theta : - 1 . 7567540709797933 <nl> - kappa : 0 . 0015186603434759263 <nl> + x : 587260 . 4462175027 <nl> + y : 4140956 . 0596565697 <nl> + theta : - 1 . 7579540268865752 <nl> + kappa : 0 . 0012097130767463932 <nl> s : 35 . 579573863566871 <nl> - dkappa : - 0 . 0010704930844073848 <nl> + dkappa : - 0 . 0010733268618133653 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 5021824311687668 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 99136713985 <nl> - y : 4140955 . 6412387374 <nl> - theta : - 1 . 755976702863572 <nl> - kappa : 0 . 0008774073012396725 <nl> + x : 587260 . 34436076344 <nl> + y : 4140955 . 5207848251 <nl> + theta : - 1 . 7573490218996453 <nl> + kappa : 0 . 00057212138879476091 <nl> s : 36 . 127987532534569 <nl> - dkappa : - 0 . 0011266815245892983 <nl> + dkappa : - 0 . 0011228272048386791 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 4652841377595855 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 89101730112 <nl> - y : 4140955 . 1060963441 <nl> - theta : - 1 . 7553309966323949 <nl> - kappa : 0 . 00023183525542422911 <nl> + x : 587260 . 24323705409 <nl> + y : 4140954 . 985788126 <nl> + theta : - 1 . 7569182155688241 <nl> + kappa : - 6 . 9314287185854451e - 05 <nl> s : 36 . 672457433558804 <nl> - dkappa : - 0 . 0011814938564127309 <nl> + dkappa : - 0 . 0011710501581242753 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 4231867266382539 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 79161525518 <nl> - y : 4140954 . 5753551545 <nl> - theta : - 1 . 755495146607986 <nl> - kappa : - 0 . 00045305817319980064 <nl> + x : 587260 . 14295155182 <nl> + y : 4140954 . 45521316 <nl> + theta : - 1 . 7572068680398145 <nl> + kappa : - 0 . 00074097589918940777 <nl> s : 37 . 21242685571363 <nl> - dkappa : - 0 . 0012312340420129731 <nl> + dkappa : - 0 . 0012149907792683634 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 3751472601469077 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 69304163067 <nl> - y : 4140954 . 0496816947 <nl> - theta : - 1 . 7558770686465219 <nl> - kappa : - 0 . 0011419541173638774 <nl> + x : 587260 . 04342106439 <nl> + y : 4140953 . 929720067 <nl> + theta : - 1 . 7577875212389791 <nl> + kappa : - 0 . 0014189045883558479 <nl> s : 37 . 747262707938368 <nl> - dkappa : - 0 . 0012789425714891482 <nl> + dkappa : - 0 . 0012565672139012159 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 3203810732486287 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 59519174066 <nl> - y : 4140953 . 5298217339 <nl> - theta : - 1 . 7569205595496242 <nl> - kappa : - 0 . 0018552315767804961 <nl> + x : 587259 . 944590968 <nl> + y : 4140953 . 4100455618 <nl> + theta : - 1 . 758937827937457 <nl> + kappa : - 0 . 0021141479762092886 <nl> s : 38 . 276251346299681 <nl> - dkappa : - 0 . 0013213981582657964 <nl> + dkappa : - 0 . 0012938853062365409 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 2580617735274462 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 49813574972 <nl> - y : 4140953 . 016575159 <nl> - theta : - 1 . 7579317100984859 <nl> - kappa : - 0 . 002572018118738131 <nl> + x : 587259 . 84641707584 <nl> + y : 4140952 . 8970117294 <nl> + theta : - 1 . 7600418979385219 <nl> + kappa : - 0 . 0028145600496397127 <nl> s : 38 . 798594401253681 <nl> - dkappa : - 0 . 0013608851310941206 <nl> + dkappa : - 0 . 0013282150185232417 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 1873212411883376 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 40170454 <nl> - y : 4140952 . 51087706 <nl> - theta : - 1 . 7588940501802466 <nl> - kappa : - 0 . 0033006620088509172 <nl> + x : 587259 . 748943265 <nl> + y : 4140952 . 3915135572 <nl> + theta : - 1 . 7610911833207148 <nl> + kappa : - 0 . 0035218695974120902 <nl> s : 39 . 313404604908037 <nl> - dkappa : - 0 . 0013954682952797726 <nl> + dkappa : - 0 . 0013589691250218223 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 1072496290572262 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 30610921234 <nl> - y : 4140952 . 0136876013 <nl> - theta : - 1 . 7605059342880449 <nl> - kappa : - 0 . 0040299190641464077 <nl> + x : 587259 . 65211631707 <nl> + y : 4140951 . 8945625909 <nl> + theta : - 1 . 7629215854937625 <nl> + kappa : - 0 . 0042308774454930843 <nl> s : 39 . 819701618284036 <nl> - dkappa : - 0 . 0014280959598233934 <nl> + dkappa : - 0 . 0013873620629179047 <nl> ddkappa : 0 <nl> } <nl> v : 5 . 0168953625809847 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 21127552842 <nl> - y : 4140951 . 5261184666 <nl> - theta : - 1 . 7630074836827898 <nl> - kappa : - 0 . 0047628715043332073 <nl> + x : 587259 . 55619774247 <nl> + y : 4140951 . 4072057237 <nl> + theta : - 1 . 7654833472928324 <nl> + kappa : - 0 . 0049393052176523941 <nl> s : 40 . 316407858578735 <nl> - dkappa : - 0 . 0014581922906107747 <nl> + dkappa : - 0 . 0014134398091517467 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 91526513982743 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 117504595 <nl> - y : 4140951 . 049316857 <nl> - theta : - 1 . 7652890586813541 <nl> - kappa : - 0 . 0054885618822308755 <nl> + x : 587259 . 46112535009 <nl> + y : 4140950 . 9306620266 <nl> + theta : - 1 . 7677776692510236 <nl> + kappa : - 0 . 0056418655607998608 <nl> s : 40 . 80234432642699 <nl> - dkappa : - 0 . 0014842921402550293 <nl> + dkappa : - 0 . 0014357679467139665 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 8013239314853315 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587259 . 02465352789 <nl> - y : 4140950 . 5846202569 <nl> - theta : - 1 . 7672794378574119 <nl> - kappa : - 0 . 00620846636419889 <nl> + x : 587259 . 367197982 <nl> + y : 4140950 . 4661817788 <nl> + theta : - 1 . 7698066481563051 <nl> + kappa : - 0 . 0063363355776312295 <nl> s : 41 . 276226433163593 <nl> - dkappa : - 0 . 0015050112178351595 <nl> + dkappa : - 0 . 0014544101008428533 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 6739949808644017 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587258 . 93352499406 <nl> - y : 4140950 . 1332972585 <nl> - theta : - 1 . 7697719791172069 <nl> - kappa : - 0 . 0069134376727439566 <nl> + x : 587259 . 274729449 <nl> + y : 4140950 . 0151317939 <nl> + theta : - 1 . 7724968563528947 <nl> + kappa : - 0 . 0070172394832479067 <nl> s : 41 . 736659828085344 <nl> - dkappa : - 0 . 0015247025311711632 <nl> + dkappa : - 0 . 0014716613243142165 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 5321598038953006 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587258 . 84326669713 <nl> - y : 4140949 . 697060327 <nl> - theta : - 1 . 7734630142753351 <nl> - kappa : - 0 . 00760809936743926 <nl> + x : 587259 . 18342482438 <nl> + y : 4140949 . 5791126583 <nl> + theta : - 1 . 7761955684784045 <nl> + kappa : - 0 . 0076853898446370451 <nl> s : 42 . 182136225713187 <nl> - dkappa : - 0 . 0015427470066815131 <nl> + dkappa : - 0 . 0014870381502279559 <nl> ddkappa : 0 <nl> } <nl> v : 4 . 3746581891296392 <nl> mmm a / modules / planning / testdata / sunnyvale_loop_test / result_follow_02_0 . pb . txt <nl> ppp b / modules / planning / testdata / sunnyvale_loop_test / result_follow_02_0 . pb . txt <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 42046142416 <nl> - y : 4141426 . 2933287933 <nl> - theta : - 1 . 7841055363132348 <nl> - kappa : - 0 . 014666849526007431 <nl> + x : 587713 . 42047348933 <nl> + y : 4141426 . 2933260393 <nl> + theta : - 1 . 7840693041950351 <nl> + kappa : - 0 . 014597615467160039 <nl> s : 0 . 12155446163629532 <nl> - dkappa : 0 . 00046297914439911064 <nl> + dkappa : 0 . 000531919514794858 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 0943009223825779 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 39325645834 <nl> - y : 4141426 . 1741789244 <nl> - theta : - 1 . 7859458596988349 <nl> - kappa : - 0 . 014199346463915427 <nl> + x : 587713 . 39328065433 <nl> + y : 4141426 . 1741734012 <nl> + theta : - 1 . 7858731982137805 <nl> + kappa : - 0 . 014060501434086945 <nl> s : 0 . 24377066912799869 <nl> - dkappa : 0 . 0009284787600818108 <nl> + dkappa : 0 . 0010667348141589351 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 127285706301719 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 36590510118 <nl> - y : 4141426 . 0543879047 <nl> - theta : - 1 . 7877960859546793 <nl> - kappa : - 0 . 013729327744956252 <nl> + x : 587713 . 36594149331 <nl> + y : 4141426 . 0543795973 <nl> + theta : - 1 . 7876867990745637 <nl> + kappa : - 0 . 013520497164103518 <nl> s : 0 . 3666445280162085 <nl> - dkappa : 0 . 0013964832519884581 <nl> + dkappa : 0 . 0016044279808347082 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 1600662093879039 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 33840826026 <nl> - y : 4141425 . 9339597076 <nl> - theta : - 1 . 7896561536929461 <nl> - kappa : - 0 . 013256808963668976 <nl> + x : 587713 . 3384569136 <nl> + y : 4141425 . 9339486016 <nl> + theta : - 1 . 7895100466047398 <nl> + kappa : - 0 . 012977620573767853 <nl> s : 0 . 49017196152458481 <nl> - dkappa : 0 . 0018669770924091156 <nl> + dkappa : 0 . 0021449811749431344 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 1926433156249727 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 31076683919 <nl> - y : 4141425 . 8128982917 <nl> - theta : - 1 . 7915260017919883 <nl> - kappa : - 0 . 012781805646975168 <nl> + x : 587713 . 31082781788 <nl> + y : 4141425 . 8128843717 <nl> + theta : - 1 . 7913428808925709 <nl> + kappa : - 0 . 012431889501952332 <nl> s : 0 . 61434891055357976 <nl> - dkappa : 0 . 0023399448209615783 <nl> + dkappa : 0 . 002688376633958405 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 2250179087082786 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 2829817374 <nl> - y : 4141425 . 6912075961 <nl> - theta : - 1 . 793405569396249 <nl> - kappa : - 0 . 012304333254200963 <nl> + x : 587713 . 28305510571 <nl> + y : 4141425 . 6911908481 <nl> + theta : - 1 . 7931852422871406 <nl> + kappa : - 0 . 011883321709868989 <nl> s : 0 . 73917133367466747 <nl> - dkappa : 0 . 0028153710445693934 <nl> + dkappa : 0 . 0032345966726826944 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 25719087204469 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 25505385082 <nl> - y : 4141425 . 5688915434 <nl> - theta : - 1 . 7952947959161727 <nl> - kappa : - 0 . 011824407177099139 <nl> + x : 587713 . 25513967231 <nl> + y : 4141425 . 5688719531 <nl> + theta : - 1 . 7950370713982697 <nl> + kappa : - 0 . 011331934881094855 <nl> s : 0 . 86463520712457476 <nl> - dkappa : 0 . 0032932404374398892 <nl> + dkappa : 0 . 0037836236832209163 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 2891630887525878 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 22698407085 <nl> - y : 4141425 . 4459540397 <nl> - theta : - 1 . 7971936210281196 <nl> - kappa : - 0 . 011342042739871192 <nl> + x : 587713 . 227082409 <nl> + y : 4141425 . 4459315925 <nl> + theta : - 1 . 79689830909643 <nl> + kappa : - 0 . 010777746621597325 <nl> s : 0 . 99073652479951091 <nl> - dkappa : 0 . 0037735377410421933 <nl> + dkappa : 0 . 004335440134955469 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 3209354416618684 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 19752671476 <nl> - y : 4141425 . 3226910266 <nl> - theta : - 1 . 79869863139925 <nl> - kappa : - 0 . 010936217840591282 <nl> + x : 587713 . 19769933622 <nl> + y : 4141425 . 322650773 <nl> + theta : - 1 . 7983089995295372 <nl> + kappa : - 0 . 01031580924976524 <nl> s : 1 . 1174712982493988 <nl> - dkappa : 0 . 0037464384836130306 <nl> + dkappa : 0 . 0042999740946760845 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 3525088133139391 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 16777285514 <nl> - y : 4141425 . 1988509595 <nl> - theta : - 1 . 8001625199581288 <nl> - kappa : - 0 . 010537890868077214 <nl> + x : 587713 . 16802763008 <nl> + y : 4141425 . 1987909963 <nl> + theta : - 1 . 7996713131039224 <nl> + kappa : - 0 . 00986302214572517 <nl> s : 1 . 2448355566721041 <nl> - dkappa : 0 . 0036577813913525117 <nl> + dkappa : 0 . 0041932738288183551 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 383884085961725 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 13787286368 <nl> - y : 4141425 . 0744026694 <nl> - theta : - 1 . 8016335982017389 <nl> - kappa : - 0 . 010137607568126292 <nl> + x : 587713 . 13821019558 <nl> + y : 4141425 . 0743229003 <nl> + theta : - 1 . 8010403174916518 <nl> + kappa : - 0 . 0094080112408987913 <nl> s : 1 . 3728253469076661 <nl> - dkappa : 0 . 0035686888721336687 <nl> + dkappa : 0 . 0040860495194686691 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 4150621415696625 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 1078276597 <nl> - y : 4141424 . 9493499827 <nl> - theta : - 1 . 8031118208962915 <nl> - kappa : - 0 . 0097353802489418065 <nl> + x : 587713 . 10824794951 <nl> + y : 4141424 . 9492503107 <nl> + theta : - 1 . 8024159705975789 <nl> + kappa : - 0 . 0089507905262937483 <nl> s : 1 . 5014367334325285 <nl> - dkappa : 0 . 0034791636654383559 <nl> + dkappa : 0 . 0039783044636384083 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 4460438618137026 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 07763815846 <nl> - y : 4141424 . 8236967092 <nl> - theta : - 1 . 8045971430106398 <nl> - kappa : - 0 . 00933122116358788 <nl> + x : 587713 . 07814180455 <nl> + y : 4141424 . 8235770389 <nl> + theta : - 1 . 8037982305151374 <nl> + kappa : - 0 . 0084913739302398036 <nl> s : 1 . 6306657983537687 <nl> - dkappa : 0 . 0033892084984759076 <nl> + dkappa : 0 . 0038700419435687746 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 47683012808131 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 04730527091 <nl> - y : 4141424 . 6974466406 <nl> - theta : - 1 . 8060895197162126 <nl> - kappa : - 0 . 00892514251000754 <nl> + x : 587713 . 04789266945 <nl> + y : 4141424 . 6973068779 <nl> + theta : - 1 . 8051870555262808 <nl> + kappa : - 0 . 0080297753184093209 <nl> s : 1 . 7605086414033286 <nl> - dkappa : 0 . 0032988260861871494 <nl> + dkappa : 0 . 0037612652267356187 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 5074218214714623 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587713 . 0168299044 <nl> - y : 4141424 . 5706035523 <nl> - theta : - 1 . 8075889063869464 <nl> - kappa : - 0 . 0085171564310407479 <nl> + x : 587713 . 01750144851 <nl> + y : 4141424 . 5704436018 <nl> + theta : - 1 . 8065824041014189 <nl> + kappa : - 0 . 0075660084938378004 <nl> s : 1 . 8909613799322451 <nl> - dkappa : 0 . 0032080191312484187 <nl> + dkappa : 0 . 0036519775658542765 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 5378198227946536 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 98609219794 <nl> - y : 4141424 . 4432007358 <nl> - theta : - 1 . 8090494750998733 <nl> - kappa : - 0 . 0081166839289303072 <nl> + x : 587712 . 98686276632 <nl> + y : 4141424 . 4430168308 <nl> + theta : - 1 . 8079327991481438 <nl> + kappa : - 0 . 0071115604118797355 <nl> s : 2 . 0220201489048795 <nl> - dkappa : 0 . 0031180628593539656 <nl> + dkappa : 0 . 0035435934693814897 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 568025012572889 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 95429753466 <nl> - y : 4141424 . 3154364778 <nl> - theta : - 1 . 8101695887648908 <nl> - kappa : - 0 . 0077857170412490347 <nl> + x : 587712 . 95527953957 <nl> + y : 4141424 . 3152001416 <nl> + theta : - 1 . 8089003898542189 <nl> + kappa : - 0 . 00674179628577476 <nl> s : 2 . 1536811008931487 <nl> - dkappa : 0 . 00303734260990136 <nl> + dkappa : 0 . 0034453848266708673 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 5980382710396892 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 92235837574 <nl> - y : 4141424 . 187091575 <nl> - theta : - 1 . 8112947929565506 <nl> - kappa : - 0 . 0074532460242885913 <nl> + x : 587712 . 92355277808 <nl> + y : 4141424 . 1868025702 <nl> + theta : - 1 . 8098723779231887 <nl> + kappa : - 0 . 0063703517104491455 <nl> s : 2 . 2859404060707553 <nl> - dkappa : 0 . 0029562555150175573 <nl> + dkappa : 0 . 003346729859870232 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 6278604781400885 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 89027564181 <nl> - y : 4141424 . 0581697286 <nl> - theta : - 1 . 8124250552420689 <nl> - kappa : - 0 . 0071192804611635765 <nl> + x : 587712 . 89168339618 <nl> + y : 4141424 . 0578278163 <nl> + theta : - 1 . 8108487353385569 <nl> + kappa : - 0 . 0059972373923878209 <nl> s : 2 . 4187942522074177 <nl> - dkappa : 0 . 0028748039119496646 <nl> + dkappa : 0 . 0032476314126014469 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 6574925135306335 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 858050249 <nl> - y : 4141423 . 9286746192 <nl> - theta : - 1 . 8135603433383118 <nl> - kappa : - 0 . 0067838298907705579 <nl> + x : 587712 . 85967230448 <nl> + y : 4141423 . 9282795661 <nl> + theta : - 1 . 8118294342130994 <nl> + kappa : - 0 . 0056224639886742729 <nl> s : 2 . 5522388446630995 <nl> - dkappa : 0 . 0027929901271603547 <nl> + dkappa : 0 . 0031480923153654463 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 686935256579388 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 82568310993 <nl> - y : 4141423 . 7986099124 <nl> - theta : - 1 . 8147006251117461 <nl> - kappa : - 0 . 0064469038078025604 <nl> + x : 587712 . 82752040867 <nl> + y : 4141423 . 7981614843 <nl> + theta : - 1 . 812814446788823 <nl> + kappa : - 0 . 0052460421070067327 <nl> s : 2 . 6862704063822425 <nl> - dkappa : 0 . 0027108164763314027 <nl> + dkappa : 0 . 0030481153855465362 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 7161895863659264 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 7931751319 <nl> - y : 4141423 . 6679792576 <nl> - theta : - 1 . 8158458685783907 <nl> - kappa : - 0 . 0061085116627635832 <nl> + x : 587712 . 79522861086 <nl> + y : 4141423 . 6674772222 <nl> + theta : - 1 . 8138037454369218 <nl> + kappa : - 0 . 0048679823057143955 <nl> s : 2 . 8208851778879938 <nl> - dkappa : 0 . 0026282852643672223 <nl> + dkappa : 0 . 0029477034274167004 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 7452563816813385 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 76052721892 <nl> - y : 4141423 . 5367862848 <nl> - theta : - 1 . 8169960419037674 <nl> - kappa : - 0 . 005768662861983102 <nl> + x : 587712 . 76279780839 <nl> + y : 4141423 . 5362304109 <nl> + theta : - 1 . 8147973026577355 <nl> + kappa : - 0 . 004488295093773618 <nl> s : 2 . 9560794172764369 <nl> - dkappa : 0 . 0025453987853984034 <nl> + dkappa : 0 . 0028468592321399034 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 7741365210282272 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 72726231627 <nl> - y : 4141423 . 4051550357 <nl> - theta : - 1 . 8175667575469598 <nl> - kappa : - 0 . 005473119876139112 <nl> + x : 587712 . 72985523334 <nl> + y : 4141423 . 4045179044 <nl> + theta : - 1 . 8151905294529374 <nl> + kappa : - 0 . 0041630959334356468 <nl> s : 3 . 0918494002108243 <nl> - dkappa : 0 . 0024680425000683888 <nl> + dkappa : 0 . 0027523647811216216 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8028308826207109 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 693563294 <nl> - y : 4141423 . 2730432567 <nl> - theta : - 1 . 8177804696658013 <nl> - kappa : - 0 . 0052044721378013007 <nl> + x : 587712 . 69654466608 <nl> + y : 4141423 . 272307646 <nl> + theta : - 1 . 81521458786703 <nl> + kappa : - 0 . 00387094022547409 <nl> s : 3 . 2281914199158046 <nl> - dkappa : 0 . 0023939787397357008 <nl> + dkappa : 0 . 0026616304167986085 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 83134034438442 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 65972379583 <nl> - y : 4141423 . 140380763 <nl> - theta : - 1 . 8179950726527667 <nl> - kappa : - 0 . 0049347045298557095 <nl> + x : 587712 . 66309524211 <nl> + y : 4141423 . 139546263 <nl> + theta : - 1 . 8152387465696529 <nl> + kappa : - 0 . 0035775666539261518 <nl> s : 3 . 3651017871716542 <nl> - dkappa : 0 . 0023196062414447194 <nl> + dkappa : 0 . 0025705178223902965 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8596657839564985 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 62574472942 <nl> - y : 4141423 . 0071711144 <nl> - theta : - 1 . 8182105607526216 <nl> - kappa : - 0 . 0046638242869450931 <nl> + x : 587712 . 62950785877 <nl> + y : 4141423 . 0062373169 <nl> + theta : - 1 . 8152630049129161 <nl> + kappa : - 0 . 0032829830865006349 <nl> s : 3 . 502576830308509 <nl> - dkappa : 0 . 0022449269997212519 <nl> + dkappa : 0 . 0024790294413593256 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 8878080786856062 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 59162699792 <nl> - y : 4141422 . 8734178506 <nl> - theta : - 1 . 8184269282376304 <nl> - kappa : - 0 . 0043918386091434123 <nl> + x : 587712 . 59578340873 <nl> + y : 4141422 . 8723843503 <nl> + theta : - 1 . 8152873622520262 <nl> + kappa : - 0 . 0029871973533126123 <nl> s : 3 . 6406128952005909 <nl> - dkappa : 0 . 0021699429995608002 <nl> + dkappa : 0 . 002387167705492904 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9157681056319165 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 5573715 <nl> - y : 4141422 . 7391244955 <nl> - theta : - 1 . 8186441694075495 <nl> - kappa : - 0 . 0041187546619671968 <nl> + x : 587712 . 56192278035 <nl> + y : 4141422 . 7379908897 <nl> + theta : - 1 . 8153118179452843 <nl> + kappa : - 0 . 0026902172468957833 <nl> s : 3 . 7792063452604423 <nl> - dkappa : 0 . 0020946562164316936 <nl> + dkappa : 0 . 0022949350349066506 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9435467415671148 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 52297913039 <nl> - y : 4141422 . 6042945557 <nl> - theta : - 1 . 8188622785896158 <nl> - kappa : - 0 . 0038445795763869138 <nl> + x : 587712 . 52792685793 <nl> + y : 4141422 . 6030604448 <nl> + theta : - 1 . 8153363713540849 <nl> + kappa : - 0 . 0023920505222148427 <nl> s : 3 . 9183535614331539 <nl> - dkappa : 0 . 0020190686162782248 <nl> + dkappa : 0 . 0022023338380484322 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9711448629744019 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 4882689584 <nl> - y : 4141422 . 4689782625 <nl> - theta : - 1 . 8192392338555767 <nl> - kappa : - 0 . 00359279983789989 <nl> + x : 587712 . 49368507508 <nl> + y : 4141422 . 467624722 <nl> + theta : - 1 . 8155136741568454 <nl> + kappa : - 0 . 0021217964673231151 <nl> s : 4 . 0580509421905946 <nl> - dkappa : 0 . 0019469029942619787 <nl> + dkappa : 0 . 0021137055708862268 <nl> ddkappa : 0 <nl> } <nl> v : 6 . 9985633460484928 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 45309651212 <nl> - y : 4141422 . 3332164576 <nl> - theta : - 1 . 8199013310225196 <nl> - kappa : - 0 . 0033821933069856577 <nl> + x : 587712 . 45911023114 <nl> + y : 4141422 . 3317094953 <nl> + theta : - 1 . 8159643673084067 <nl> + kappa : - 0 . 0019024539187084723 <nl> s : 4 . 1982949035256452 <nl> - dkappa : 0 . 0018811359536679297 <nl> + dkappa : 0 . 002032481790193586 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0258030666956142 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 41778788075 <nl> - y : 4141422 . 1969289929 <nl> - theta : - 1 . 8205659917799684 <nl> - kappa : - 0 . 0031707713234006372 <nl> + x : 587712 . 42440151586 <nl> + y : 4141422 . 1952680154 <nl> + theta : - 1 . 8164168055100032 <nl> + kappa : - 0 . 0016822620922185959 <nl> s : 4 . 3390818789464225 <nl> - dkappa : 0 . 0018151142680319183 <nl> + dkappa : 0 . 0019509435171221493 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 05286490053351 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 38234395429 <nl> - y : 4141422 . 0601193048 <nl> - theta : - 1 . 8212331993730395 <nl> - kappa : - 0 . 0029585392167067346 <nl> + x : 587712 . 38955980446 <nl> + y : 4141422 . 0583037208 <nl> + theta : - 1 . 8168709773564939 <nl> + kappa : - 0 . 0014612265384871066 <nl> s : 4 . 4804083194705164 <nl> - dkappa : 0 . 0017488396016400076 <nl> + dkappa : 0 . 0018690928071027966 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 0797497228914343 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 34676561865 <nl> - y : 4141421 . 9227908105 <nl> - theta : - 1 . 8219029371294857 <nl> - kappa : - 0 . 0027455022901802773 <nl> + x : 587712 . 35458596726 <nl> + y : 4141421 . 9208200346 <nl> + theta : - 1 . 8173268714989899 <nl> + kappa : - 0 . 0012393527807717151 <nl> s : 4 . 6222706936192157 <nl> - dkappa : 0 . 0016823136105699457 <nl> + dkappa : 0 . 001786931705428956 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 1064584088101572 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 31105375476 <nl> - y : 4141421 . 7849469134 <nl> - theta : - 1 . 8225751884596675 <nl> - kappa : - 0 . 0025316658208206786 <nl> + x : 587712 . 31948087085 <nl> + y : 4141421 . 7828203621 <nl> + theta : - 1 . 8177844766448323 <nl> + kappa : - 0 . 0010166463149632436 <nl> s : 4 . 7646654874117411 <nl> - dkappa : 0 . 0016155379426938722 <nl> + dkappa : 0 . 0017044622472599412 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 132991833041963 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 27520923992 <nl> - y : 4141421 . 6465909965 <nl> - theta : - 1 . 8232499368565269 <nl> - kappa : - 0 . 0023170350593591069 <nl> + x : 587712 . 28424537717 <nl> + y : 4141421 . 6443080925 <nl> + theta : - 1 . 8182437815575776 <nl> + kappa : - 0 . 00079311260959465482 <nl> s : 4 . 9075892043594713 <nl> - dkappa : 0 . 0015485142376810239 <nl> + dkappa : 0 . 0016216864576242976 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 1593508700506492 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 2391478006 <nl> - y : 4141421 . 50774858 <nl> - theta : - 1 . 8238559169751811 <nl> - kappa : - 0 . 0021190953337072386 <nl> + x : 587712 . 24885934812 <nl> + y : 4141421 . 5052919439 <nl> + theta : - 1 . 8186326288304571 <nl> + kappa : - 0 . 00059057047021378989 <nl> s : 5 . 05103836546018 <nl> - dkappa : 0 . 0014842186472443875 <nl> + dkappa : 0 . 0015421731864934446 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 1855363940115264 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 20275978453 <nl> - y : 4141421 . 3684517657 <nl> - theta : - 1 . 8243006303461473 <nl> - kappa : - 0 . 001960541268768351 <nl> + x : 587712 . 21329670667 <nl> + y : 4141421 . 3657821277 <nl> + theta : - 1 . 8188584669579513 <nl> + kappa : - 0 . 0004370048344218509 <nl> s : 5 . 195009509192257 <nl> - dkappa : 0 . 0014265137648850222 <nl> + dkappa : 0 . 0014704995397119237 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 2115492788114208 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 1662407103 <nl> - y : 4141421 . 2286532475 <nl> - theta : - 1 . 8247469454342073 <nl> - kappa : - 0 . 0018014161421688625 <nl> + x : 587712 . 17760597984 <nl> + y : 4141421 . 2257698411 <nl> + theta : - 1 . 8190851184830468 <nl> + kappa : - 0 . 00028288610371543933 <nl> s : 5 . 3394991915089491 <nl> - dkappa : 0 . 0013686010477662164 <nl> + dkappa : 0 . 0013985677470937244 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 2373903980486709 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 129591444 <nl> - y : 4141421 . 0883563422 <nl> - theta : - 1 . 8251948516549841 <nl> - kappa : - 0 . 0016417237275664987 <nl> + x : 587712 . 141788014 <nl> + y : 4141421 . 0852584047 <nl> + theta : - 1 . 8193125780306953 <nl> + kappa : - 0 . 00012821793302543463 <nl> s : 5 . 4845039858325828 <nl> - dkappa : 0 . 0013104818692900029 <nl> + dkappa : 0 . 0013263795145037267 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 2630606250331287 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 09281284735 <nl> - y : 4141420 . 9475643476 <nl> - theta : - 1 . 8256443384780425 <nl> - kappa : - 0 . 0014814677793868055 <nl> + x : 587712 . 10584365122 <nl> + y : 4141420 . 9442511229 <nl> + theta : - 1 . 8195408402532416 <nl> + kappa : 2 . 6996041344381637e - 05 <nl> s : 5 . 6300204830487965 <nl> - dkappa : 0 . 0012521575958589683 <nl> + dkappa : 0 . 0012539365391129901 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 2885608327861631 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 05590577738 <nl> - y : 4141420 . 806280545 <nl> - theta : - 1 . 8260953954268726 <nl> - kappa : - 0 . 0013206520328295024 <nl> + x : 587712 . 06977372942 <nl> + y : 4141420 . 8027512804 <nl> + theta : - 1 . 8197698998304153 <nl> + kappa : 0 . 00018275220171117017 <nl> s : 5 . 77604529150077 <nl> - dkappa : 0 . 0011936295868785651 <nl> + dkappa : 0 . 0011812405094016273 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 313891894040653 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587712 . 01887108712 <nl> - y : 4141420 . 6645081993 <nl> - theta : - 1 . 8265480120788711 <nl> - kappa : - 0 . 0011592802038748334 <nl> + x : 587712 . 03357908188 <nl> + y : 4141420 . 6607621475 <nl> + theta : - 1 . 8199997514693214 <nl> + kappa : 0 . 00033904694900688552 <nl> s : 5 . 9225750369834591 <nl> - dkappa : 0 . 0011348991947594232 <nl> + dkappa : 0 . 0011082931051616732 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 3390546812409934 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 98163189064 <nl> - y : 4141420 . 5222709174 <nl> - theta : - 1 . 8267427571265284 <nl> - kappa : - 0 . 0010193777955202412 <nl> + x : 587711 . 99727355759 <nl> + y : 4141420 . 5182836596 <nl> + theta : - 1 . 8199751335922456 <nl> + kappa : 0 . 00046853471693911154 <nl> s : 6 . 06960636273782 <nl> - dkappa : 0 . 001079253479161793 <nl> + dkappa : 0 . 0010392815859720289 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 3640500665430926 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 944162984 <nl> - y : 4141420 . 379578752 <nl> - theta : - 1 . 8265926901973628 <nl> - kappa : - 0 . 0009083278313950741 <nl> + x : 587711 . 96086225472 <nl> + y : 4141420 . 3753179642 <nl> + theta : - 1 . 8196122635924294 <nl> + kappa : 0 . 00056223806321907728 <nl> s : 6 . 2171359294450417 <nl> - dkappa : 0 . 0010277947973048316 <nl> + dkappa : 0 . 00097558136123792531 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 3888789218143733 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 90656838019 <nl> - y : 4141420 . 2364078956 <nl> - theta : - 1 . 8264421198370104 <nl> - kappa : - 0 . 00079690532672749108 <nl> + x : 587711 . 9243288025 <nl> + y : 4141420 . 2318726606 <nl> + theta : - 1 . 819248176268613 <nl> + kappa : 0 . 00065625575715078988 <nl> s : 6 . 365160415220779 <nl> - dkappa : 0 . 000976163486438919 <nl> + dkappa : 0 . 0009116674406556384 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 4135421186337718 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 86884891812 <nl> - y : 4141420 . 092761544 <nl> - theta : - 1 . 826291049406761 <nl> - kappa : - 0 . 000685112768881142 <nl> + x : 587711 . 88767401641 <nl> + y : 4141420 . 08795095 <nl> + theta : - 1 . 8188828797485761 <nl> + kappa : 0 . 00075058569991054175 <nl> s : 6 . 51367651560938 <nl> - dkappa : 0 . 00092436069916645113 <nl> + dkappa : 0 . 00084754125102097814 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 4380405282917375 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 83100543288 <nl> - y : 4141419 . 9486428769 <nl> - theta : - 1 . 8261394822501804 <nl> - kappa : - 0 . 00057295263210491686 <nl> + x : 587711 . 85089870775 <nl> + y : 4141419 . 9435560182 <nl> + theta : - 1 . 8185163821172443 <nl> + kappa : 0 . 00084522580374078813 <nl> s : 6 . 6626809435781169 <nl> - dkappa : 0 . 00087238758201266524 <nl> + dkappa : 0 . 00078320421160689576 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 4623750217902343 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 79303875461 <nl> - y : 4141419 . 804055057 <nl> - theta : - 1 . 8259874216931187 <nl> - kappa : - 0 . 00046042737753728736 <nl> + x : 587711 . 81400368339 <nl> + y : 4141419 . 7986910343 <nl> + theta : - 1 . 8181486914167029 <nl> + kappa : 0 . 00094017399194648154 <nl> s : 6 . 8121704295114132 <nl> - dkappa : 0 . 00082024527542765165 <nl> + dkappa : 0 . 00071865773416597458 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 4865464698427395 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 60124693473 <nl> - y : 4141419 . 074224758 <nl> - theta : - 1 . 826582652665719 <nl> - kappa : - 5 . 4080324831152235e - 05 <nl> + x : 587711 . 62836886768 <nl> + y : 4141419 . 0672705304 <nl> + theta : - 1 . 8177412493451583 <nl> + kappa : 0 . 0012190863670296149 <nl> s : 7 . 5667805105750627 <nl> - dkappa : 0 . 00059087959203342662 <nl> + dkappa : 0 . 00043458466239733936 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 6049884831930932 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 406491784 <nl> - y : 4141418 . 3331317627 <nl> - theta : - 1 . 8267688061648961 <nl> - kappa : 0 . 0002231666588262452 <nl> + x : 587711 . 44050420227 <nl> + y : 4141418 . 3244010843 <nl> + theta : - 1 . 8170095687451273 <nl> + kappa : 0 . 00133554846869072 <nl> s : 8 . 33303660318345 <nl> - dkappa : 0 . 00038578550996673695 <nl> + dkappa : 0 . 00018142044127559138 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 7194848015358 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 20896877209 <nl> - y : 4141417 . 5811270694 <nl> - theta : - 1 . 8259596149427864 <nl> - kappa : 0 . 00037723657444586157 <nl> + x : 587711 . 25058075378 <nl> + y : 4141417 . 5704412861 <nl> + theta : - 1 . 8153921326050491 <nl> + kappa : 0 . 001297947833063277 <nl> s : 9 . 1105495650702331 <nl> - dkappa : 0 . 00020407516680459508 <nl> + dkappa : - 4 . 1208304430543778e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 8301439395086714 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587711 . 0088850467 <nl> - y : 4141416 . 8185474277 <nl> - theta : - 1 . 8265023763243067 <nl> - kappa : 0 . 00040108709755325904 <nl> + x : 587711 . 05883012153 <nl> + y : 4141416 . 8057237556 <nl> + theta : - 1 . 8152937826855298 <nl> + kappa : 0 . 0010996778175054488 <nl> s : 9 . 89894109641766 <nl> - dkappa : 5 . 054243031105421e - 05 <nl> + dkappa : - 0 . 00022682372667032688 <nl> ddkappa : 0 <nl> } <nl> v : 7 . 9370742314456839 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587710 . 80643946 <nl> - y : 4141416 . 0457206848 <nl> - theta : - 1 . 8259143257997432 <nl> - kappa : 0 . 0003218278400258012 <nl> + x : 587710 . 86527746182 <nl> + y : 4141416 . 0306220325 <nl> + theta : - 1 . 8142631563653246 <nl> + kappa : 0 . 00077663352889610388 <nl> s : 10 . 697843721826185 <nl> - dkappa : - 7 . 3217437435825139e - 05 <nl> + dkappa : - 0 . 00037362636361448493 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 04038383137698 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587710 . 60157153464 <nl> - y : 4141415 . 263031451 <nl> - theta : - 1 . 8259346634906037 <nl> - kappa : 0 . 0001693349765390371 <nl> + x : 587710 . 66966004926 <nl> + y : 4141415 . 2455697488 <nl> + theta : - 1 . 8140236758329311 <nl> + kappa : 0 . 00036739424659251317 <nl> s : 11 . 506900772284082 <nl> - dkappa : - 0 . 00017516721976400983 <nl> + dkappa : - 0 . 00049085133364483642 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 1401807130288688 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587710 . 394314859 <nl> - y : 4141414 . 4708284903 <nl> - theta : - 1 . 826175705482082 <nl> - kappa : - 4 . 2518124306797747e - 05 <nl> + x : 587710 . 47188605135 <nl> + y : 4141414 . 4509463757 <nl> + theta : - 1 . 8142068356161249 <nl> + kappa : - 0 . 0001089490946116538 <nl> s : 12 . 325766367137065 <nl> - dkappa : - 0 . 000253648126724902 <nl> + dkappa : - 0 . 00057658632367480378 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 23657266982382 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587710 . 18466665177 <nl> - y : 4141413 . 6694589606 <nl> - theta : - 1 . 8261812492307807 <nl> - kappa : - 0 . 00029817078563970011 <nl> + x : 587710 . 27180736093 <nl> + y : 4141413 . 647134217 <nl> + theta : - 1 . 814361938623104 <nl> + kappa : - 0 . 00063089819779653963 <nl> s : 13 . 154105368793342 <nl> - dkappa : - 0 . 00030742365861000304 <nl> + dkappa : - 0 . 00062928646345662166 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 3296651405959441 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587709 . 97251476778 <nl> - y : 4141412 . 8592896303 <nl> - theta : - 1 . 8269435104706637 <nl> - kappa : - 0 . 00058292679995198713 <nl> + x : 587710 . 06913886417 <nl> + y : 4141412 . 8345406866 <nl> + theta : - 1 . 8154959120726453 <nl> + kappa : - 0 . 0011768420176543613 <nl> s : 13 . 991591348322201 <nl> - dkappa : - 0 . 00033960868362495209 <nl> + dkappa : - 0 . 00065154663187058019 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 41951523320693 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587709 . 75767074409 <nl> - y : 4141412 . 0407043491 <nl> - theta : - 1 . 8275262491564439 <nl> - kappa : - 0 . 000871908954632602 <nl> + x : 587709 . 86339572468 <nl> + y : 4141412 . 0136207351 <nl> + theta : - 1 . 8167057961897886 <nl> + kappa : - 0 . 0017092201427952969 <nl> s : 14 . 837900878018946 <nl> - dkappa : - 0 . 00034123882041786993 <nl> + dkappa : - 0 . 00063257409214021506 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 5061396377195848 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587709 . 5400384285 <nl> - y : 4141411 . 2140609864 <nl> - theta : - 1 . 8285466756719637 <nl> - kappa : - 0 . 0011437732874795717 <nl> + x : 587709 . 654357595 <nl> + y : 4141411 . 1847625724 <nl> + theta : - 1 . 8185469156863621 <nl> + kappa : - 0 . 0022007585467954372 <nl> s : 15 . 692712654391121 <nl> - dkappa : - 0 . 00032144485855368734 <nl> + dkappa : - 0 . 00058283718919786137 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 58956583235747 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587709 . 31951238227 <nl> - y : 4141410 . 3797167502 <nl> - theta : - 1 . 8297557097431278 <nl> - kappa : - 0 . 0013788762234566666 <nl> + x : 587709 . 44175858982 <nl> + y : 4141410 . 3483637427 <nl> + theta : - 1 . 8207552387846446 <nl> + kappa : - 0 . 0026233553313476012 <nl> s : 16 . 555708773331411 <nl> - dkappa : - 0 . 000277915756620954 <nl> + dkappa : - 0 . 00049961305887972248 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 6698343265996289 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587709 . 095995018 <nl> - y : 4141409 . 5380224138 <nl> - theta : - 1 . 8310740980182043 <nl> - kappa : - 0 . 001557475528843142 <nl> + x : 587709 . 22535094572 <nl> + y : 4141409 . 5048140888 <nl> + theta : - 1 . 8232236761899026 <nl> + kappa : - 0 . 0029480572291812317 <nl> s : 17 . 426576033243169 <nl> - dkappa : - 0 . 00021089107218005384 <nl> + dkappa : - 0 . 00038265113260630334 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 7469986611805925 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587708 . 869412374 <nl> - y : 4141408 . 6893168 <nl> - theta : - 1 . 8325463568811395 <nl> - kappa : - 0 . 0016589470395528877 <nl> + x : 587709 . 00492983288 <nl> + y : 4141408 . 654488123 <nl> + theta : - 1 . 8259603521535364 <nl> + kappa : - 0 . 0031443568897061391 <nl> s : 18 . 305007238165985 <nl> - dkappa : - 0 . 00012065205020993737 <nl> + dkappa : - 0 . 00023179443453436526 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 82112540809037 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587708 . 63973232731 <nl> - y : 4141407 . 8339205142 <nl> - theta : - 1 . 8341182069582038 <nl> - kappa : - 0 . 0016613554927373403 <nl> + x : 587708 . 78036229941 <nl> + y : 4141407 . 7977360007 <nl> + theta : - 1 . 8288673272379188 <nl> + kappa : - 0 . 0031798243909724245 <nl> s : 19 . 190702500901217 <nl> - dkappa : - 6 . 4237064461350423e - 06 <nl> + dkappa : - 4 . 5879874976007351e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 8922941705744609 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587708 . 40698574111 <nl> - y : 4141406 . 9721287116 <nl> - theta : - 1 . 8354517151235019 <nl> - kappa : - 0 . 0015413555364973245 <nl> + x : 587708 . 55161940237 <nl> + y : 4141406 . 9348731213 <nl> + theta : - 1 . 8315459047979399 <nl> + kappa : - 0 . 0030200844347236825 <nl> s : 20 . 083370546137548 <nl> - dkappa : 0 . 00013259787777668836 <nl> + dkappa : 0 . 0001761979039028174 <nl> ddkappa : 0 <nl> } <nl> v : 8 . 9605975831338416 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587708 . 171280661 <nl> - y : 4141406 . 1042055776 <nl> - theta : - 1 . 8369533443639476 <nl> - kappa : - 0 . 0012662818501796432 <nl> + x : 587708 . 31876783085 <nl> + y : 4141406 . 0661800816 <nl> + theta : - 1 . 8343312536302188 <nl> + kappa : - 0 . 0026176411943269347 <nl> s : 20 . 982730013576536 <nl> - dkappa : 0 . 00030210202754125996 <nl> + dkappa : 0 . 00044077676195767635 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 0261413115249773 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587707 . 9328154003 <nl> - y : 4141405 . 2303789048 <nl> - theta : - 1 . 8376313457909246 <nl> - kappa : - 0 . 00073217519433327923 <nl> + x : 587708 . 082039708 <nl> + y : 4141405 . 1918812636 <nl> + theta : - 1 . 8361283083426692 <nl> + kappa : - 0 . 00185087830554993 <nl> s : 21 . 888510761058164 <nl> - dkappa : 0 . 00056292066360955669 <nl> + dkappa : 0 . 00080900066014416192 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 0890440527598138 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587707 . 692238097 <nl> - y : 4141404 . 3507397012 <nl> - theta : - 1 . 83815133998978 <nl> - kappa : 3 . 6169147785044739e - 05 <nl> + x : 587707 . 84235428227 <nl> + y : 4141404 . 3119987515 <nl> + theta : - 1 . 8375091882719694 <nl> + kappa : - 0 . 00074013530172503911 <nl> s : 22 . 800455167686369 <nl> - dkappa : 0 . 00082082868808147722 <nl> + dkappa : 0 . 0011862522518225815 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 1494375351057844 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587707 . 45027430553 <nl> - y : 4141403 . 4653424332 <nl> - theta : - 1 . 8376408997984899 <nl> - kappa : 0 . 0010913974209197012 <nl> + x : 587707 . 60066982091 <nl> + y : 4141403 . 4265251951 <nl> + theta : - 1 . 8374481699723908 <nl> + kappa : 0 . 00079284976317307583 <nl> s : 23 . 718319436954616 <nl> - dkappa : 0 . 0010783131601982781 <nl> + dkappa : 0 . 0015654933378010448 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 207466518085802 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587707 . 207486357 <nl> - y : 4141402 . 57427107 <nl> - theta : - 1 . 8363416436184221 <nl> - kappa : 0 . 0017558635050830263 <nl> + x : 587707 . 35795695148 <nl> + y : 4141402 . 5354333213 <nl> + theta : - 1 . 8363511570003308 <nl> + kappa : 0 . 0017462689019358971 <nl> s : 24 . 641874899871439 <nl> - dkappa : 0 . 000758222433762907 <nl> + dkappa : 0 . 0010896104355946805 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 2632887924782636 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587706 . 96464771149 <nl> - y : 4141401 . 6775360545 <nl> - theta : - 1 . 8345906370154372 <nl> - kappa : 0 . 0017909192658146366 <nl> + x : 587707 . 11510338052 <nl> + y : 4141401 . 6387023376 <nl> + theta : - 1 . 8346178154416233 <nl> + kappa : 0 . 0017598390777729929 <nl> s : 25 . 570909318085977 <nl> - dkappa : 3 . 7919453064832146e - 05 <nl> + dkappa : 1 . 4630221039192623e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 3170751803170546 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587706 . 72193899506 <nl> - y : 4141400 . 7752923565 <nl> - theta : - 1 . 8330486296040067 <nl> - kappa : 0 . 0018199327805898413 <nl> + x : 587706 . 87235464435 <nl> + y : 4141400 . 73646939 <nl> + theta : - 1 . 8331137961710755 <nl> + kappa : 0 . 0017727783861229128 <nl> s : 26 . 505228187013536 <nl> - dkappa : 3 . 1170285606551255e - 05 <nl> + dkappa : 1 . 3857575147512144e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 3690095348915374 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587706 . 47941858007 <nl> - y : 4141399 . 8677087487 <nl> - theta : - 1 . 8311062895949501 <nl> - kappa : 0 . 0018431068746184364 <nl> + x : 587706 . 62975478452 <nl> + y : 4141399 . 8289069966 <nl> + theta : - 1 . 8312200246008978 <nl> + kappa : 0 . 0017849181357978035 <nl> s : 27 . 444656038961128 <nl> - dkappa : 2 . 4771988504303254e - 05 <nl> + dkappa : 1 . 2957280161341815e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 4192887407465644 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587706 . 23723779432 <nl> - y : 4141398 . 9549081605 <nl> - theta : - 1 . 8296135203763857 <nl> - kappa : 0 . 001859327158254312 <nl> + x : 587706 . 38744493306 <nl> + y : 4141398 . 9161406467 <nl> + theta : - 1 . 8297863604188365 <nl> + kappa : 0 . 0017947382660442807 <nl> s : 28 . 389037746253038 <nl> - dkappa : 1 . 72347812054153e - 05 <nl> + dkappa : 1 . 0417366600081078e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 4681227136824671 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587705 . 99538378546 <nl> - y : 4141398 . 0370372934 <nl> - theta : - 1 . 8275252547888468 <nl> - kappa : 0 . 0018691039756441577 <nl> + x : 587706 . 1454055392 <nl> + y : 4141397 . 9983186354 <nl> + theta : - 1 . 8277600288503226 <nl> + kappa : 0 . 0018023323241589655 <nl> s : 29 . 338237717815765 <nl> - dkappa : 1 . 034353219127147e - 05 <nl> + dkappa : 8 . 02321680039568e - 06 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 5156505195660355 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587705 . 75403815857 <nl> - y : 4141397 . 1141933361 <nl> - theta : - 1 . 8260894372750991 <nl> - kappa : 0 . 0018708860605056673 <nl> + x : 587705 . 90381525224 <nl> + y : 4141397 . 0755386921 <nl> + theta : - 1 . 8263879226807349 <nl> + kappa : 0 . 0018057036707637892 <nl> s : 30 . 292118639051729 <nl> - dkappa : 1 . 8855439540974835e - 06 <nl> + dkappa : 3 . 5436467615500737e - 06 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 5617039481254871 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587705 . 51313875918 <nl> - y : 4141396 . 1865587891 <nl> - theta : - 1 . 8239128755976535 <nl> - kappa : 0 . 0018653866050953091 <nl> + x : 587705 . 66261220875 <nl> + y : 4141396 . 1479830509 <nl> + theta : - 1 . 8242716469787921 <nl> + kappa : 0 . 0018051068300438875 <nl> s : 31 . 250522722577688 <nl> - dkappa : - 5 . 7367077323608616e - 06 <nl> + dkappa : - 6 . 2175217549211055e - 07 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 606085786901092 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587705 . 27294928639 <nl> - y : 4141395 . 2542489031 <nl> - theta : - 1 . 8225112456529591 <nl> - kappa : 0 . 0018505985389651049 <nl> + x : 587705 . 42206129327 <nl> + y : 4141395 . 2157663582 <nl> + theta : - 1 . 82292458106953 <nl> + kappa : 0 . 0017981394320285731 <nl> s : 32 . 213275393931504 <nl> - dkappa : - 1 . 5033437104985269e - 05 <nl> + dkappa : - 7 . 014272039914969e - 06 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 6486575067747236 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587705 . 03332876612 <nl> - y : 4141394 . 3174949302 <nl> - theta : - 1 . 8203905574649522 <nl> - kappa : 0 . 0018274788701858557 <nl> + x : 587705 . 18203049572 <nl> + y : 4141394 . 2791174264 <nl> + theta : - 1 . 8208492951058715 <nl> + kappa : 0 . 001785136044321122 <nl> s : 33 . 1801911599063 <nl> - dkappa : - 2 . 3627776070101794e - 05 <nl> + dkappa : - 1 . 3244886549179909e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 6893392619698524 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587704 . 79443671054 <nl> - y : 4141393 . 3764558802 <nl> - theta : - 1 . 8189577191394268 <nl> - kappa : 0 . 0017947172068843102 <nl> + x : 587704 . 9426885657 <nl> + y : 4141393 . 3381926892 <nl> + theta : - 1 . 819452425210905 <nl> + kappa : 0 . 0017642716549942704 <nl> s : 34 . 15107947688464 <nl> - dkappa : - 3 . 3466700940376956e - 05 <nl> + dkappa : - 2 . 1264112286787373e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 72810989005154 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587704 . 55621688918 <nl> - y : 4141392 . 4313448295 <nl> - theta : - 1 . 8169605137588329 <nl> - kappa : 0 . 0017526546995779413 <nl> + x : 587704 . 7039891209 <nl> + y : 4141392 . 3932026541 <nl> + theta : - 1 . 8174776232841683 <nl> + kappa : 0 . 0017353655473993255 <nl> s : 35 . 125750619172663 <nl> - dkappa : - 4 . 2934952607717751e - 05 <nl> + dkappa : - 2 . 9467217971276558e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 7650069119264558 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587704 . 31876498845 <nl> - y : 4141391 . 4823294077 <nl> - theta : - 1 . 8155388114086983 <nl> - kappa : 0 . 0017004936697060425 <nl> + x : 587704 . 46604023932 <nl> + y : 4141391 . 4443117147 <nl> + theta : - 1 . 8160669334271256 <nl> + kappa : 0 . 0016970875801055304 <nl> s : 36 . 104021547334256 <nl> - dkappa : - 5 . 3119343886253611e - 05 <nl> + dkappa : - 3 . 8942003213306006e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 8001265318428512 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587704 . 08204592357 <nl> - y : 4141390 . 5295969732 <nl> - theta : - 1 . 8136926325508982 <nl> - kappa : 0 . 0016383322013221954 <nl> + x : 587704 . 22881907073 <nl> + y : 4141390 . 4917041729 <nl> + theta : - 1 . 8142160219925647 <nl> + kappa : 0 . 001648985481747923 <nl> s : 37 . 085721776525233 <nl> - dkappa : - 6 . 3160943164384089e - 05 <nl> + dkappa : - 4 . 8842627789582849e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 8336236373905876 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587703 . 84607865755 <nl> - y : 4141389 . 5733021935 <nl> - theta : - 1 . 8123295847793326 <nl> - kappa : 0 . 0015658984198179886 <nl> + x : 587703 . 99235819886 <nl> + y : 4141389 . 5355313281 <nl> + theta : - 1 . 8128367814380464 <nl> + kappa : 0 . 0015902330718625636 <nl> s : 38 . 070699244827416 <nl> - dkappa : - 7 . 3407198757110553e - 05 <nl> + dkappa : - 5 . 9512025523430986e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 865711799501117 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587703 . 61083876377 <nl> - y : 4141388 . 6135852095 <nl> - theta : - 1 . 8106622978171798 <nl> - kappa : 0 . 0014832083202159559 <nl> + x : 587703 . 756645838 <nl> + y : 4141388 . 5759302797 <nl> + theta : - 1 . 8111377871350276 <nl> + kappa : 0 . 0015202709072913323 <nl> s : 39 . 058826181582923 <nl> - dkappa : - 8 . 3583394217903753e - 05 <nl> + dkappa : - 7 . 0693715923621434e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 896663272447487 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587703 . 37626873609 <nl> - y : 4141387 . 6505628903 <nl> - theta : - 1 . 8094051893182732 <nl> - kappa : 0 . 0013904375925438731 <nl> + x : 587703 . 52163705137 <nl> + y : 4141387 . 6130149458 <nl> + theta : - 1 . 8098394264383095 <nl> + kappa : 0 . 0014387030159056903 <nl> s : 40 . 050004975728207 <nl> - dkappa : - 9 . 3524987618455815e - 05 <nl> + dkappa : - 8 . 2211565260309672e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 9268089938443484 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587703 . 14234150131 <nl> - y : 4141386 . 684307294 <nl> - theta : - 1 . 8079452824285944 <nl> - kappa : 0 . 0012877235711762803 <nl> + x : 587703 . 28731574467 <nl> + y : 4141386 . 6468548481 <nl> + theta : - 1 . 8083255932221183 <nl> + kappa : 0 . 0013450712202805943 <nl> s : 41 . 0441740441283 <nl> - dkappa : - 0 . 00010327068892858789 <nl> + dkappa : - 9 . 41261926827879e - 05 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 95653858464794 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587702 . 90894054156 <nl> - y : 4141385 . 7148686745 <nl> - theta : - 1 . 8065276416165907 <nl> - kappa : 0 . 0011755440719233528 <nl> + x : 587703 . 0535743786 <nl> + y : 4141385 . 6774982587 <nl> + theta : - 1 . 8068473830676928 <nl> + kappa : 0 . 0012392569997335026 <nl> s : 42 . 0413136999109 <nl> - dkappa : - 0 . 00011248042794250189 <nl> + dkappa : - 0 . 00010609197555229132 <nl> ddkappa : 0 <nl> } <nl> v : 9 . 9863003491561084 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587702 . 67598647473 <nl> - y : 4141384 . 7422388168 <nl> - theta : - 1 . 8055348192375573 <nl> - kappa : 0 . 0010544200718396372 <nl> + x : 587702 . 82034053782 <nl> + y : 4141384 . 7049354641 <nl> + theta : - 1 . 8057900682023544 <nl> + kappa : 0 . 0011211793376709853 <nl> s : 43 . 0414520208006 <nl> - dkappa : - 0 . 00012110810379730068 <nl> + dkappa : - 0 . 00011806362857229777 <nl> ddkappa : 0 <nl> } <nl> v : 10 . 016601275008286 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587702 . 44334319187 <nl> - y : 4141383 . 7663675728 <nl> - theta : - 1 . 8044666716693711 <nl> - kappa : 0 . 0009250698308233211 <nl> + x : 587702 . 58748131525 <nl> + y : 4141383 . 7291157353 <nl> + theta : - 1 . 8046540279150891 <nl> + kappa : 0 . 00099093059392723476 <nl> s : 44 . 044670717453009 <nl> - dkappa : - 0 . 00012895470619506228 <nl> + dkappa : - 0 . 00012986211041316696 <nl> ddkappa : 0 <nl> } <nl> v : 10 . 04800703318551 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587702 . 2108519231 <nl> - y : 4141382 . 7871486349 <nl> - theta : - 1 . 803685623496186 <nl> - kappa : 0 . 00078826050492917382 <nl> + x : 587702 . 35483776091 <nl> + y : 4141382 . 7499329755 <nl> + theta : - 1 . 8038098846256112 <nl> + kappa : 0 . 00084865402535543033 <nl> s : 45 . 051111001788904 <nl> - dkappa : - 0 . 0001359688025644102 <nl> + dkappa : - 0 . 00014142575191110752 <nl> ddkappa : 0 <nl> } <nl> v : 10 . 081141978010407 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587701 . 9783618364 <nl> - y : 4141381 . 80440627 <nl> - theta : - 1 . 8028937369235172 <nl> - kappa : 0 . 00064529713171259761 <nl> + x : 587702 . 122254274 <nl> + y : 4141381 . 7672127187 <nl> + theta : - 1 . 8029611139691841 <nl> + kappa : 0 . 000695002228564385 <nl> s : 46 . 060979455328429 <nl> - dkappa : - 0 . 00014160836213579015 <nl> + dkappa : - 0 . 00015223511127643202 <nl> ddkappa : 0 <nl> } <nl> v : 10 . 116689147147213 <nl> trajectory_point { <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587701 . 74565731781 <nl> - y : 4141380 . 8179065487 <nl> - theta : - 1 . 80222674221165 <nl> - kappa : 0 . 00049717468933984147 <nl> + x : 587701 . 88950506586 <nl> + y : 4141380 . 7807235443 <nl> + theta : - 1 . 802251634127821 <nl> + kappa : 0 . 000530305985713649 <nl> s : 47 . 07455389752522 <nl> - dkappa : - 0 . 0001461867701411408 <nl> + dkappa : - 0 . 00016260419202298866 <nl> ddkappa : 0 <nl> } <nl> v : 10 . 155390261601745 <nl> mmm a / modules / planning / testdata / sunnyvale_loop_test / result_mission_complete_0 . pb . txt <nl> ppp b / modules / planning / testdata / sunnyvale_loop_test / result_mission_complete_0 . pb . txt <nl> <nl> header { <nl> timestamp_sec : 1509506440 . 1767445 <nl> } <nl> - total_path_length : 5 . 5601774973473139 <nl> + total_path_length : 5 . 5601818427248411 <nl> total_path_time : 6 . 999999999999992 <nl> is_replan : true <nl> gear : GEAR_DRIVE <nl> trajectory_point { <nl> x : 587610 . 56668961723 <nl> y : 4140980 . 447324717 <nl> theta : 1 . 3203319788735257 <nl> - kappa : - 1 . 2272566249300333e - 20 <nl> - s : 2 . 6020852139652106e - 18 <nl> - dkappa : - 6 . 9491625286400346e - 22 <nl> + kappa : - 1 . 1664761923409249e - 20 <nl> + s : 8 . 6736173798840355e - 19 <nl> + dkappa : - 8 . 7107010968401034e - 23 <nl> ddkappa : 0 <nl> } <nl> v : 0 <nl> - a : 0 . 015613841308773543 <nl> + a : 0 . 015613846519466687 <nl> relative_time : 0 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 5666906361 <nl> - y : 4140980 . 4473286984 <nl> - theta : 1 . 3203319781415628 <nl> - kappa : - 1 . 0976221514617378e - 09 <nl> - s : 4 . 1100340124250434e - 06 <nl> - dkappa : - 1 . 0976310152063306e - 09 <nl> + x : 587610 . 566690636 <nl> + y : 4140980 . 4473286988 <nl> + theta : 1 . 3203319785074177 <nl> + kappa : - 4 . 1275747288855314e - 10 <nl> + s : 4 . 1100353963036076e - 06 <nl> + dkappa : - 4 . 1276076943011448e - 10 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 00046007388681080781 <nl> - a : 0 . 030335049346161023 <nl> + v : 0 . 00046007404219561781 <nl> + a : 0 . 030335059655909595 <nl> relative_time : 0 . 02 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56669466 <nl> + x : 587610 . 56669465941 <nl> y : 4140980 . 4473444242 <nl> - theta : 1 . 3203319752507028 <nl> - kappa : - 5 . 4326373561525569e - 09 <nl> - s : 2 . 0342450524901012e - 05 <nl> - dkappa : - 5 . 4326812269510059e - 09 <nl> + theta : 1 . 320331977061489 <nl> + kappa : - 2 . 0429267644471427e - 09 <nl> + s : 2 . 0342457412972861e - 05 <nl> + dkappa : - 2 . 042943080594764e - 09 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0012110745261642646 <nl> - a : 0 . 044707140231222055 <nl> + v : 0 . 0012110749378369185 <nl> + a : 0 . 044707155532432687 <nl> relative_time : 0 . 04 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56670311408 <nl> + x : 587610 . 56670311245 <nl> y : 4140980 . 4473774638 <nl> - theta : 1 . 3203319691771034 <nl> - kappa : - 1 . 454035822185526e - 08 <nl> - s : 5 . 4446210625091641e - 05 <nl> - dkappa : - 1 . 4540475641294209e - 08 <nl> + theta : 1 . 3203319740236417 <nl> + kappa : - 5 . 4678575190404154e - 09 <nl> + s : 5 . 4446229134297392e - 05 <nl> + dkappa : - 5 . 4679011889416851e - 09 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0022460569951048581 <nl> - a : 0 . 0587338559730583 <nl> + v : 0 . 0022460577618293688 <nl> + a : 0 . 058733876159422264 <nl> relative_time : 0 . 06 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56671738927 <nl> - y : 4140980 . 4474332524 <nl> - theta : 1 . 3203319589215257 <nl> - kappa : - 2 . 9919203120758112e - 08 <nl> - s : 0 . 00011203212534336815 <nl> - dkappa : - 2 . 9919444730776842e - 08 <nl> + x : 587610 . 566717386 <nl> + y : 4140980 . 4474332528 <nl> + theta : 1 . 3203319688940844 <nl> + kappa : - 1 . 1251025416303688e - 08 <nl> + s : 0 . 0001120321635447526 <nl> + dkappa : - 1 . 1251115274394242e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0035581512108591091 <nl> - a : 0 . 0724189385807714 <nl> + v : 0 . 0035581524292861611 <nl> + a : 0 . 072418963547264639 <nl> relative_time : 0 . 08 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56673884252 <nl> - y : 4140980 . 4475170933 <nl> - theta : 1 . 3203319435090659 <nl> - kappa : - 5 . 3031095924561152e - 08 <nl> - s : 0 . 00019857435245645256 <nl> - dkappa : - 5 . 3031524172743279e - 08 <nl> + x : 587610 . 5667388367 <nl> + y : 4140980 . 4475170947 <nl> + theta : 1 . 3203319611851967 <nl> + kappa : - 1 . 9942182490322365e - 08 <nl> + s : 0 . 00019857442033315503 <nl> + dkappa : - 1 . 9942341761719806e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0051405619308355719 <nl> - a : 0 . 085766130063463022 <nl> + v : 0 . 0051405636955282148 <nl> + a : 0 . 0857661597063461 <nl> relative_time : 0 . 1 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56676879746 <nl> - y : 4140980 . 4476341591 <nl> - theta : 1 . 3203319219888936 <nl> - kappa : - 8 . 5301865739570147e - 08 <nl> - s : 0 . 00031941189329105812 <nl> - dkappa : - 8 . 5302554587663349e - 08 <nl> + x : 587610 . 56676878792 <nl> + y : 4140980 . 4476341614 <nl> + theta : 1 . 3203319504213979 <nl> + kappa : - 3 . 2077507448799675e - 08 <nl> + s : 0 . 00031941200269681666 <nl> + dkappa : - 3 . 2077763640898041e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0069865687526248325 <nl> - a : 0 . 098779172430234818 <nl> + v : 0 . 0069865711560841755 <nl> + a : 0 . 098779206647052975 <nl> relative_time : 0 . 12000000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56680854422 <nl> - y : 4140980 . 4477894926 <nl> - theta : 1 . 3203318934339796 <nl> - kappa : - 1 . 2812164664179067e - 07 <nl> - s : 0 . 0004797500895275305 <nl> - dkappa : - 1 . 2812268127745451e - 07 <nl> + x : 587610 . 56680853 <nl> + y : 4140980 . 4477894967 <nl> + theta : 1 . 3203319361390164 <nl> + kappa : - 4 . 8179755992224476e - 08 <nl> + s : 0 . 00047975025414569996 <nl> + dkappa : - 4 . 8180140787489274e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 00908952611399951 <nl> - a : 0 . 11146180769018843 <nl> + v : 0 . 0090895292466904136 <nl> + a : 0 . 11146184637977154 <nl> relative_time : 0 . 14 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56685934064 <nl> - y : 4140980 . 4479880086 <nl> - theta : 1 . 3203318569408324 <nl> - kappa : - 1 . 8284527741202207e - 07 <nl> - s : 0 . 00068466212000348745 <nl> - dkappa : - 1 . 8284675396380361e - 07 <nl> + x : 587610 . 56685932039 <nl> + y : 4140980 . 4479880147 <nl> + theta : 1 . 3203319178861479 <nl> + kappa : - 6 . 8758411133038933e - 08 <nl> + s : 0 . 00068466235530657176 <nl> + dkappa : - 6 . 87589602830027e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 011442863292914258 <nl> - a : 0 . 1238177778524255 <nl> + v : 0 . 011442867243291022 <nl> + a : 0 . 1238178209148881 <nl> relative_time : 0 . 16 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56692241179 <nl> - y : 4140980 . 4482344957 <nl> - theta : 1 . 32033181162923 <nl> - kappa : - 2 . 5079270127095148e - 07 <nl> - s : 0 . 00093909049751746078 <nl> - dkappa : - 2 . 5079472652648934e - 07 <nl> + x : 587610 . 56692238408 <nl> + y : 4140980 . 4482345032 <nl> + theta : 1 . 3203318952225311 <nl> + kappa : - 9 . 4309833514806288e - 08 <nl> + s : 0 . 00093909082072715785 <nl> + dkappa : - 9 . 43105867352647e - 08 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 014040084407505761 <nl> - a : 0 . 13585082492604772 <nl> + v : 0 . 014040089262037831 <nl> + a : 0 . 135850872262789 <nl> relative_time : 0 . 18 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 566998951 <nl> - y : 4140980 . 4485336165 <nl> - theta : 1 . 3203317566419575 <nl> - kappa : - 3 . 33249365614248e - 07 <nl> - s : 0 . 001247848565632536 <nl> - dkappa : - 3 . 3325205674170397e - 07 <nl> + x : 587610 . 56699891412 <nl> + y : 4140980 . 4485336263 <nl> + theta : 1 . 3203318677194105 <nl> + kappa : - 1 . 2531741173137877e - 07 <nl> + s : 0 . 0012478489956802988 <nl> + dkappa : - 1 . 2531841259878731e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 016874768416092742 <nl> - a : 0 . 1475646909201567 <nl> + v : 0 . 016874774259290383 <nl> + a : 0 . 14756474243386047 <nl> relative_time : 0 . 19999999999999998 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56709011982 <nl> - y : 4140980 . 4488899112 <nl> - theta : 1 . 320331691144534 <nl> - kappa : - 4 . 314666217476563e - 07 <nl> - s : 0 . 0016156219954799932 <nl> - dkappa : - 4 . 3147010602037543e - 07 <nl> + x : 587610 . 567090072 <nl> + y : 4140980 . 4488899237 <nl> + theta : 1 . 3203318349594015 <nl> + kappa : - 1 . 6225171264606507e - 07 <nl> + s : 0 . 0016156225529681024 <nl> + dkappa : - 1 . 6225300849513625e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 019940569117175948 <nl> - a : 0 . 15896311784385408 <nl> + v : 0 . 019940576031615965 <nl> + a : 0 . 15896317343848893 <nl> relative_time : 0 . 21999999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56719704822 <nl> - y : 4140980 . 4493077956 <nl> - theta : 1 . 3203316143249513 <nl> - kappa : - 5 . 4666212462209141e - 07 <nl> - s : 0 . 0020469702825629487 <nl> - dkappa : - 5 . 4666653914648953e - 07 <nl> + x : 587610 . 56719698757 <nl> + y : 4140980 . 4493078119 <nl> + theta : 1 . 32033179653636 <nl> + kappa : - 2 . 0557063171079831e - 07 <nl> + s : 0 . 0020469709897260996 <nl> + dkappa : - 2 . 0557227353329943e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 02323121514943817 <nl> - a : 0 . 1700498477062416 <nl> + v : 0 . 023231223215789562 <nl> + a : 0 . 17004990728706057 <nl> relative_time : 0 . 23999999999999996 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 567320836 <nl> - y : 4140980 . 4497915674 <nl> - theta : 1 . 3203315253934038 <nl> - kappa : - 6 . 8002023256873166e - 07 <nl> - s : 0 . 0025463282435599938 <nl> - dkappa : - 6 . 80025724015412e - 07 <nl> + x : 587610 . 56732076057 <nl> + y : 4140980 . 4497915879 <nl> + theta : 1 . 3203317520552478 <nl> + kappa : - 2 . 5571954328530378e - 07 <nl> + s : 0 . 0025463291242273992 <nl> + dkappa : - 2 . 5572158563005518e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 026740509991744221 <nl> - a : 0 . 18082862251642084 <nl> + v : 0 . 026740519288793913 <nl> + a : 0 . 18082868598996177 <nl> relative_time : 0 . 25999999999999995 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56746255164 <nl> - y : 4140980 . 450345403 <nl> - theta : 1 . 3203314235820276 <nl> - kappa : - 8 . 3269240703411359e - 07 <nl> - s : 0 . 0031180075131288375 <nl> - dkappa : - 8 . 326991313722099e - 07 <nl> + x : 587610 . 56746245932 <nl> + y : 4140980 . 4503454282 <nl> + theta : 1 . 3203317011319982 <nl> + kappa : - 3 . 131314509562666e - 07 <nl> + s : 0 . 0031180085926868408 <nl> + dkappa : - 3 . 1313395183034067e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 030462331963140962 <nl> - a : 0 . 19130318428349347 <nl> + v : 0 . 030462342567819475 <nl> + a : 0 . 1913032515575788 <nl> relative_time : 0 . 27999999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 567623234 <nl> - y : 4140980 . 4509733617 <nl> - theta : 1 . 320331308144624 <nl> - kappa : - 1 . 0057976123152254e - 06 <nl> - s : 0 . 0037661980407099451 <nl> - dkappa : - 1 . 0058057345499745e - 06 <nl> + x : 587610 . 5676231226 <nl> + y : 4140980 . 4509733915 <nl> + theta : 1 . 320331643393386 <nl> + kappa : - 3 . 782271378564995e - 07 <nl> + s : 0 . 003766199346065151 <nl> + dkappa : - 3 . 7823015862761982e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 034390634222857264 <nl> - a : 0 . 20147727501656115 <nl> + v : 0 . 034390646210264421 <nl> + a : 0 . 201477346000298 <nl> relative_time : 0 . 3 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56780389172 <nl> - y : 4140980 . 4516793862 <nl> - theta : 1 . 3203311783564047 <nl> - kappa : - 1 . 200422715294602e - 06 <nl> - s : 0 . 0044949695873301807 <nl> - dkappa : - 1 . 2004324092081432e - 06 <nl> + x : 587610 . 56780375878 <nl> + y : 4140980 . 4516794216 <nl> + theta : 1 . 320331578476889 <nl> + kappa : - 4 . 5141531698411052e - 07 <nl> + s : 0 . 0044949711468730965 <nl> + dkappa : - 4 . 5141892228425209e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 038519444770304057 <nl> - a : 0 . 21135463672472557 <nl> + v : 0 . 038519458213734661 <nl> + a : 0 . 21135471132850561 <nl> relative_time : 0 . 32 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56800550467 <nl> - y : 4140980 . 4524673047 <nl> - theta : 1 . 3203310335137148 <nl> - kappa : - 1 . 417622885175417e - 06 <nl> - s : 0 . 0053082732224064471 <nl> - dkappa : - 1 . 4176343330708214e - 06 <nl> + x : 587610 . 56800534751 <nl> + y : 4140980 . 4524673466 <nl> + theta : 1 . 3203315060305609 <nl> + kappa : - 5 . 33092781521671e - 07 <nl> + s : 0 . 00530827506597564 <nl> + dkappa : - 5 . 330970391518605e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 042842866445074283 <nl> - a : 0 . 22093901141708827 <nl> + v : 0 . 042842881416043817 <nl> + a : 0 . 220939089552588 <nl> relative_time : 0 . 34 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56822902279 <nl> - y : 4140980 . 4533408303 <nl> - theta : 1 . 3203308729337735 <nl> - kappa : - 1 . 6584219932165784e - 06 <nl> - s : 0 . 0062099428205493242 <nl> - dkappa : - 1 . 6584353856651032e - 06 <nl> + x : 587610 . 56822883908 <nl> + y : 4140980 . 4533408796 <nl> + theta : 1 . 3203314257128937 <nl> + kappa : - 6 . 23644555155383e - 07 <nl> + s : 0 . 0062099449793960957 <nl> + dkappa : - 6 . 2364953599170031e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 047355076926942935 <nl> - a : 0 . 230234141102751 <nl> + v : 0 . 04735509349521326 <nl> + a : 0 . 23023422268293142 <nl> relative_time : 0 . 36000000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56847536808 <nl> - y : 4140980 . 4543035664 <nl> - theta : 1 . 3203306959544054 <nl> - kappa : - 1 . 923813012467823e - 06 <nl> - s : 0 . 0072036965583667173 <nl> - dkappa : - 1 . 9238285480593972e - 06 <nl> + x : 587610 . 568475155 <nl> + y : 4140980 . 4543036236 <nl> + theta : 1 . 3203313371926821 <nl> + kappa : - 7 . 2344404239424759e - 07 <nl> + s : 0 . 007203699065120279 <nl> + dkappa : - 7 . 2344982029502646e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 052050328735867013 <nl> - a : 0 . 23924376779081541 <nl> + v : 0 . 052050346969472056 <nl> + a : 0 . 23924385272992227 <nl> relative_time : 0 . 38000000000000006 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56874543382 <nl> - y : 4140980 . 4553590035 <nl> - theta : 1 . 3203305019337694 <nl> - kappa : - 2 . 2147584175048081e - 06 <nl> - s : 0 . 0082931384112674839 <nl> - dkappa : - 2 . 214776302601743e - 06 <nl> + x : 587610 . 56874518842 <nl> + y : 4140980 . 4553590692 <nl> + theta : 1 . 3203312401488994 <nl> + kappa : - 8 . 3285317888923127e - 07 <nl> + s : 0 . 0082931412999006637 <nl> + dkappa : - 8 . 3285983060346256e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 056922949231985577 <nl> - a : 0 . 24797163349038306 <nl> + v : 0 . 056922969197257048 <nl> + a : 0 . 24797172170394668 <nl> relative_time : 0 . 40000000000000008 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56904008554 <nl> - y : 4140980 . 4565105247 <nl> - theta : 1 . 3203302902501015 <nl> - kappa : - 2 . 532190584164209e - 06 <nl> - s : 0 . 0094817596502650946 <nl> - dkappa : - 2 . 53221103265814e - 06 <nl> + x : 587610 . 56903980486 <nl> + y : 4140980 . 4565106 <nl> + theta : 1 . 3203311342705524 <nl> + kappa : - 9 . 5222258175243623e - 07 <nl> + s : 0 . 0094817629560605445 <nl> + dkappa : - 9 . 5223018682936975e - 07 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 061967340615619718 <nl> - a : 0 . 25642148021055572 <nl> + v : 0 . 061967362377212731 <nl> + a : 0 . 25642157161539114 <nl> relative_time : 0 . 4200000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 56936016108 <nl> - y : 4140980 . 4577614036 <nl> - theta : 1 . 3203300603014378 <nl> - kappa : - 2 . 8770121892788083e - 06 <nl> - s : 0 . 010772940338781248 <nl> - dkappa : - 2 . 8770354223508619e - 06 <nl> + x : 587610 . 56935984234 <nl> + y : 4140980 . 45776149 <nl> + theta : 1 . 3203310192565585 <nl> + kappa : - 1 . 0818916998762649e - 06 <nl> + s : 0 . 010772944098298171 <nl> + dkappa : - 1 . 0819003405762132e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 067177979927272535 <nl> - a : 0 . 264597049960435 <nl> + v : 0 . 067178003548191409 <nl> + a : 0 . 26459714447464189 <nl> relative_time : 0 . 44000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 569706471 <nl> - y : 4140980 . 45911481 <nl> - theta : 1 . 3203298115053572 <nl> - kappa : - 3 . 250096610412595e - 06 <nl> - s : 0 . 012169950829449539 <nl> - dkappa : - 3 . 2501228562967859e - 06 <nl> + x : 587610 . 5697061111 <nl> + y : 4140980 . 4591149068 <nl> + theta : 1 . 3203308948156041 <nl> + kappa : - 1 . 2221889642525909e - 06 <nl> + s : 0 . 01216995508049093 <nl> + dkappa : - 1 . 2221987254589325e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 072549419047629182 <nl> - a : 0 . 27250208474912246 <nl> + v : 0 . 072549444589253026 <nl> + a : 0 . 27250218229208512 <nl> relative_time : 0 . 46000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57007979963 <nl> - y : 4140980 . 460573806 <nl> - theta : 1 . 3203295432987083 <nl> - kappa : - 3 . 6522883255958547e - 06 <nl> - s : 0 . 013675953260919072 <nl> - dkappa : - 3 . 652317819345709e - 06 <nl> + x : 587610 . 570079395 <nl> + y : 4140980 . 4605739149 <nl> + theta : 1 . 3203307606660175 <nl> + kappa : - 1 . 3734319382919243e - 06 <nl> + s : 0 . 013675958042499478 <nl> + dkappa : - 1 . 3734429074243086e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 078076284697556841 <nl> - a : 0 . 28014032658571997 <nl> + v : 0 . 07807631221966535 <nl> + a : 0 . 28014042707810727 <nl> relative_time : 0 . 48000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 570480904 <nl> - y : 4140980 . 4621413522 <nl> - theta : 1 . 3203292551373451 <nl> - kappa : - 4 . 0844033130602646e - 06 <nl> - s : 0 . 015294003054658126 <nl> - dkappa : - 4 . 084436296318673e - 06 <nl> + x : 587610 . 57048045145 <nl> + y : 4140980 . 4621414733 <nl> + theta : 1 . 3203306165356317 <nl> + kappa : - 1 . 53592746814258e - 06 <nl> + s : 0 . 015294008406971895 <nl> + dkappa : - 1 . 5359397350713318e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0837532784381047 <nl> - a : 0 . 28751551747932896 <nl> + v : 0 . 08375330799890375 <nl> + a : 0 . 28751562084309468 <nl> relative_time : 0 . 50000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 5709105155 <nl> - y : 4140980 . 4638203061 <nl> - theta : 1 . 3203289464958612 <nl> - kappa : - 4 . 5472294509739923e - 06 <nl> - s : 0 . 017027050411757789 <nl> - dkappa : - 4 . 54726617174629e - 06 <nl> + x : 587610 . 57091001165 <nl> + y : 4140980 . 4638204412 <nl> + theta : 1 . 3203304621616541 <nl> + kappa : - 1 . 7099718330098469e - 06 <nl> + s : 0 . 017027056376147862 <nl> + dkappa : - 1 . 7099854899715721e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 089575176670504075 <nl> - a : 0 . 29463139943905126 <nl> + v : 0 . 089575208326651473 <nl> + a : 0 . 29463150559743351 <nl> relative_time : 0 . 52000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57136933971 <nl> - y : 4140980 . 4656134262 <nl> - theta : 1 . 3203286168673234 <nl> - kappa : - 5 . 0415269171767784e - 06 <nl> - s : 0 . 018877941809735573 <nl> - dkappa : - 5 . 0415676296070528e - 06 <nl> + x : 587610 . 57136878115 <nl> + y : 4140980 . 4656135761 <nl> + theta : 1 . 3203302972905284 <nl> + kappa : - 1 . 8958508954751546e - 06 <nl> + s : 0 . 018877948428662798 <nl> + dkappa : - 1 . 8958660369895458e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 0955368306361682 <nl> - a : 0 . 30149171447398837 <nl> + v : 0 . 095536864442799366 <nl> + a : 0 . 30149182335151015 <nl> relative_time : 0 . 54000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 571858057 <nl> - y : 4140980 . 4675233704 <nl> - theta : 1 . 3203282657630027 <nl> - kappa : - 5 . 5680285889150461e - 06 <nl> - s : 0 . 020849421499339105 <nl> - dkappa : - 5 . 5680735530656732e - 06 <nl> + x : 587610 . 57185744 <nl> + y : 4140980 . 4675235362 <nl> + theta : 1 . 3203301216778067 <nl> + kappa : - 2 . 0938402518152393e - 06 <nl> + s : 0 . 020849428816352007 <nl> + dkappa : - 2 . 0938569746030832e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 10163316641669241 <nl> - a : 0 . 308100204593242 <nl> + v : 0 . 10163320242744604 <nl> + a : 0 . 30810031611571093 <nl> relative_time : 0 . 56000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57237732282 <nl> - y : 4140980 . 4695527004 <nl> - theta : 1 . 3203278927121094 <nl> - kappa : - 6 . 1274404425769759e - 06 <nl> - s : 0 . 022944133001349707 <nl> - dkappa : - 6 . 1274899242113869e - 06 <nl> + x : 587610 . 57237664389 <nl> + y : 4140980 . 4695528825 <nl> + theta : 1 . 3203299350880133 <nl> + kappa : - 2 . 3042053823213166e - 06 <nl> + s : 0 . 022944141061054853 <nl> + dkappa : - 2 . 3042237852236994e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 10785918493385402 <nl> - a : 0 . 31446061180591378 <nl> + v : 0 . 10785922320089789 <nl> + a : 0 . 31446072590042207 <nl> relative_time : 0 . 58000000000000018 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57292776776 <nl> - y : 4140980 . 4717038805 <nl> - theta : 1 . 320327497261526 <nl> - kappa : - 6 . 72044195342762e - 06 <nl> - s : 0 . 025164620603386093 <nl> - dkappa : - 6 . 7204962237962913e - 06 <nl> + x : 587610 . 572927023 <nl> + y : 4140980 . 4717040802 <nl> + theta : 1 . 3203297372945126 <nl> + kappa : - 2 . 5272018016182424e - 06 <nl> + s : 0 . 0251646294514189 <nl> + dkappa : - 2 . 5272219855169592e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 11420996194961244 <nl> - a : 0 . 32057667812110552 <nl> + v : 0 . 1142100025236689 <nl> + a : 0 . 32057679471602996 <nl> relative_time : 0 . 6000000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 573509998 <nl> - y : 4140980 . 4739792813 <nl> - theta : 1 . 3203270789755432 <nl> - kappa : - 7 . 3476864953439824e - 06 <nl> - s : 0 . 027513330856707978 <nl> - dkappa : - 7 . 3477458309736555e - 06 <nl> + x : 587610 . 573509184 <nl> + y : 4140980 . 4739794992 <nl> + theta : 1 . 3203295280793714 <nl> + kappa : - 2 . 7630752089836866e - 06 <nl> + s : 0 . 027513340539704063 <nl> + dkappa : - 2 . 7630972767228483e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 12068064806610906 <nl> - a : 0 . 32645214554791868 <nl> + v : 0 . 12068069099648097 <nl> + a : 0 . 32645226457292092 <nl> relative_time : 0 . 62000000000000022 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57412459678 <nl> - y : 4140980 . 4763811789 <nl> - theta : 1 . 3203266374355902 <nl> - kappa : - 8 . 00980174055012e - 06 <nl> - s : 0 . 02999261407301972 <nl> - dkappa : - 8 . 0098664230362513e - 06 <nl> + x : 587610 . 57412370935 <nl> + y : 4140980 . 4763814169 <nl> + theta : 1 . 3203293072332345 <nl> + kappa : - 3 . 0120616386672984e - 06 <nl> + s : 0 . 02999262463858679 <nl> + dkappa : - 3 . 0120856949761414e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 12726646872566735 <nl> - a : 0 . 332090756095455 <nl> + v : 0 . 12726651406026354 <nl> + a : 0 . 33209087748148108 <nl> relative_time : 0 . 64000000000000024 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57477212278 <nl> - y : 4140980 . 47891176 <nl> - theta : 1 . 3203261722399668 <nl> - kappa : - 8 . 7073900593522271e - 06 <nl> - s : 0 . 032604725821273967 <nl> - dkappa : - 8 . 7074603751546648e - 06 <nl> + x : 587610 . 574771158 <nl> + y : 4140980 . 4789120182 <nl> + theta : 1 . 3203290745551826 <nl> + kappa : - 3 . 2743876102098724e - 06 <nl> + s : 0 . 032604737317964171 <nl> + dkappa : - 3 . 2744137616267677e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 13396272421079278 <nl> - a : 0 . 33749625177281611 <nl> + v : 0 . 13396277199615395 <nl> + a : 0 . 33749637545209693 <nl> relative_time : 0 . 66000000000000025 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57545311213 <nl> - y : 4140980 . 4815731174 <nl> - theta : 1 . 320325683003583 <nl> - kappa : - 9 . 4410289198737453e - 06 <nl> - s : 0 . 035351828424475311 <nl> - dkappa : - 9 . 4411051601156363e - 06 <nl> + x : 587610 . 575452066 <nl> + y : 4140980 . 4815733978 <nl> + theta : 1 . 3203288298526026 <nl> + kappa : - 3 . 5502702787625208e - 06 <nl> + s : 0 . 035351840901758143 <nl> + dkappa : - 3 . 5502986335601828e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 14076478964417286 <nl> - a : 0 . 34267237458910366 <nl> + v : 0 . 14076483992549707 <nl> + a : 0 . 34267250049515469 <nl> relative_time : 0 . 68000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57616807811 <nl> - y : 4140980 . 4843672584 <nl> - theta : 1 . 3203251693576856 <nl> - kappa : - 1 . 0211271287790442e - 05 <nl> - s : 0 . 038235992456483889 <nl> - dkappa : - 1 . 0211353748060356e - 05 <nl> + x : 587610 . 57616694667 <nl> + y : 4140980 . 484367562 <nl> + theta : 1 . 3203285729410563 <nl> + kappa : - 3 . 8399175854058372e - 06 <nl> + s : 0 . 0382360059647196 <nl> + dkappa : - 3 . 8399482535177352e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 14766811498867713 <nl> - a : 0 . 34762286655341929 <nl> + v : 0 . 14766816780984565 <nl> + a : 0 . 34762299462104074 <nl> relative_time : 0 . 70000000000000029 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57691751176 <nl> - y : 4140980 . 4872961016 <nl> - theta : 1 . 320324630949596 <nl> - kappa : - 1 . 1018646026065517e - 05 <nl> - s : 0 . 041259198238819086 <nl> - dkappa : - 1 . 1018735006222815e - 05 <nl> + x : 587610 . 57691629091 <nl> + y : 4140980 . 4872964295 <nl> + theta : 1 . 3203283036441418 <nl> + kappa : - 4 . 1435284074690653e - 06 <nl> + s : 0 . 041259212829232589 <nl> + dkappa : - 4 . 1435615004170334e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 15466822504735717 <nl> - a : 0 . 35235146967486469 <nl> + v : 0 . 15466828045096012 <nl> + a : 0 . 35235159984014125 <nl> relative_time : 0 . 72000000000000031 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57770188188 <nl> - y : 4140980 . 4903614796 <nl> - theta : 1 . 3203240674424412 <nl> - kappa : - 1 . 186365829468468e - 05 <nl> - s : 0 . 0444233373374631 <nl> - dkappa : - 1 . 18637540986681e - 05 <nl> + x : 587610 . 57770056743 <nl> + y : 4140980 . 4903618321 <nl> + theta : 1 . 3203280217933653 <nl> + kappa : - 4 . 4612927088492685e - 06 <nl> + s : 0 . 04442335306211842 <nl> + dkappa : - 4 . 4613283396723184e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 16176071946344661 <nl> - a : 0 . 35686192596254152 <nl> + v : 0 . 16176077749080864 <nl> + a : 0 . 35686205816284267 <nl> relative_time : 0 . 74000000000000032 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57852163562 <nl> - y : 4140980 . 4935651394 <nl> - theta : 1 . 3203234785148892 <nl> - kappa : - 1 . 2746789950391265e - 05 <nl> - s : 0 . 047730214059664641 <nl> - dkappa : - 1 . 2746892886030742e - 05 <nl> + x : 587610 . 57852022338 <nl> + y : 4140980 . 4935655184 <nl> + theta : 1 . 3203277272280065 <nl> + kappa : - 4 . 7933916903304926e - 06 <nl> + s : 0 . 047730230971439844 <nl> + dkappa : - 4 . 793429973514824e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 16894127272036105 <nl> - a : 0 . 36115797742555139 <nl> + v : 0 . 16894133341156711 <nl> + a : 0 . 36115811159953121 <nl> relative_time : 0 . 76000000000000034 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 57937719929 <nl> - y : 4140980 . 4969087467 <nl> - theta : 1 . 3203228638608824 <nl> - kappa : - 1 . 366849994642131e - 05 <nl> - s : 0 . 051181546950742556 <nl> - dkappa : - 1 . 3668610325253015e - 05 <nl> + x : 587610 . 57937568484 <nl> + y : 4140980 . 4969091527 <nl> + theta : 1 . 3203274197949808 <nl> + kappa : - 5 . 1399979399029432e - 06 <nl> + s : 0 . 051181565103305245 <nl> + dkappa : - 5 . 1400389913131578e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 17620563414169824 <nl> - a : 0 . 36524336607299596 <nl> + v : 0 . 17620569753561907 <nl> + a : 0 . 3652435021605932 <nl> relative_time : 0 . 78000000000000036 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58026897779 <nl> - y : 4140980 . 5003938847 <nl> - theta : 1 . 3203222231893665 <nl> - kappa : - 1 . 4629224732238654e - 05 <nl> - s : 0 . 054778970290889441 <nl> - dkappa : - 1 . 4629342869323265e - 05 <nl> + x : 587610 . 580267357 <nl> + y : 4140980 . 5003943192 <nl> + theta : 1 . 320327099348714 <nl> + kappa : - 5 . 5012755830821412e - 06 <nl> + s : 0 . 054778989738672706 <nl> + dkappa : - 5 . 5013195198936557e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 1835496278912378 <nl> - a : 0 . 36912183391397696 <nl> + v : 0 . 1835496940255559 <nl> + a : 0 . 369121971856415 <nl> relative_time : 0 . 80000000000000038 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58119735576 <nl> - y : 4140980 . 5040220562 <nl> - theta : 1 . 3203215562240329 <nl> - kappa : - 1 . 5629378653270037e - 05 <nl> - s : 0 . 058524035591975346 <nl> - dkappa : - 1 . 5629504867014252e - 05 <nl> + x : 587610 . 5811956242 <nl> + y : 4140980 . 504022521 <nl> + theta : 1 . 3203267657510018 <nl> + kappa : - 5 . 8773804332280987e - 06 <nl> + s : 0 . 058524056390154226 <nl> + dkappa : - 5 . 8774273738607565e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 19096915297294159 <nl> - a : 0 . 37279712295759587 <nl> + v : 0 . 19096922188417667 <nl> + a : 0 . 37279726269738278 <nl> relative_time : 0 . 8200000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 5821626978 <nl> - y : 4140980 . 5077946857 <nl> - theta : 1 . 3203208627030421 <nl> - kappa : - 1 . 6669354350640182e - 05 <nl> - s : 0 . 062418213094351346 <nl> - dkappa : - 1 . 6669488962621436e - 05 <nl> + x : 587610 . 582160851 <nl> + y : 4140980 . 5077951811 <nl> + theta : 1 . 3203264188708808 <nl> + kappa : - 6 . 2684601418644864e - 06 <nl> + s : 0 . 062418235298819888 <nl> + dkappa : - 6 . 2685102059173755e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 1984601832309533 <nl> - a : 0 . 37627297521295455 <nl> + v : 0 . 1984602549544881 <nl> + a : 0 . 376273116693883 <nl> relative_time : 0 . 84000000000000041 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58316534839 <nl> - y : 4140980 . 5117131197 <nl> - theta : 1 . 3203201423787627 <nl> - kappa : - 1 . 7749523160906905e - 05 <nl> - s : 0 . 066462893263653219 <nl> - dkappa : - 1 . 7749666495701324e - 05 <nl> + x : 587610 . 583163382 <nl> + y : 4140980 . 5117136477 <nl> + theta : 1 . 3203260585844916 <nl> + kappa : - 6 . 6746543489977987e - 06 <nl> + s : 0 . 066462916931001967 <nl> + dkappa : - 6 . 6747076571852621e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 2060187673495987 <nl> - a : 0 . 37955313268915458 <nl> + v : 0 . 20601884191970476 <nl> + a : 0 . 37955327585630189 <nl> relative_time : 0 . 86000000000000043 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58420563315 <nl> - y : 4140980 . 515778631 <nl> - theta : 1 . 3203193950175072 <nl> - kappa : - 1 . 8870235515796197e - 05 <nl> - s : 0 . 0706593882876051 <nl> - dkappa : - 1 . 88703879008098e - 05 <nl> + x : 587610 . 58420354244 <nl> + y : 4140980 . 5157791916 <nl> + theta : 1 . 3203256847749509 <nl> + kappa : - 7 . 0960948334365243e - 06 <nl> + s : 0 . 0706594134750991 <nl> + dkappa : - 7 . 0961515075253776e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 21364102885338573 <nl> - a : 0 . 38264133739529743 <nl> + v : 0 . 21364110630324892 <nl> + a : 0 . 3826414821950257 <nl> relative_time : 0 . 88000000000000045 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58528385789 <nl> - y : 4140980 . 5199924144 <nl> - theta : 1 . 3203186203992585 <nl> - kappa : - 2 . 0031821341937315e - 05 <nl> - s : 0 . 075008933572823067 <nl> - dkappa : - 2 . 003198310724041e - 05 <nl> + x : 587610 . 58528163843 <nl> + y : 4140980 . 5199930104 <nl> + theta : 1 . 3203252973322117 <nl> + kappa : - 7 . 5329056631103068e - 06 <nl> + s : 0 . 075008960338380476 <nl> + dkappa : - 7 . 532965825858255e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 22132316610700425 <nl> - a : 0 . 38554133134048507 <nl> + v : 0 . 22132324646875043 <nl> + a : 0 . 38554147772044084 <nl> relative_time : 0 . 90000000000000047 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58640031051 <nl> - y : 4140980 . 5243555959 <nl> - theta : 1 . 3203178183174087 <nl> - kappa : - 2 . 123459046059789e - 05 <nl> - s : 0 . 07951268924161882 <nl> - dkappa : - 2 . 1234761938762725e - 05 <nl> + x : 587610 . 58639795787 <nl> + y : 4140980 . 5243562274 <nl> + theta : 1 . 3203248961529344 <nl> + kappa : - 7 . 9852033453891252e - 06 <nl> + s : 0 . 079512717643789949 <nl> + dkappa : - 7 . 9852671204843781e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 22906145231532615 <nl> - a : 0 . 38825685653381886 <nl> + v : 0 . 22906153562004702 <nl> + a : 0 . 38825700444293354 <nl> relative_time : 0 . 92000000000000048 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58755526016 <nl> - y : 4140980 . 5288692266 <nl> - theta : 1 . 3203169885784902 <nl> - kappa : - 2 . 2478832987419005e - 05 <nl> - s : 0 . 084171741628803337 <nl> - dkappa : - 2 . 2479014513360626e - 05 <nl> + x : 587610 . 58755276958 <nl> + y : 4140980 . 5288698948 <nl> + theta : 1 . 3203244811403518 <nl> + kappa : - 8 . 4530969774024473e - 06 <nl> + s : 0 . 084171771726750153 <nl> + dkappa : - 8 . 4531644894045345e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 23685223552340534 <nl> - a : 0 . 39079165498440072 <nl> + v : 0 . 23685232180118423 <nl> + a : 0 . 39079180437289013 <nl> relative_time : 0 . 9400000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58874895819 <nl> - y : 4140980 . 5335342889 <nl> - theta : 1 . 3203161310019098 <nl> - kappa : - 2 . 3764819732150321e - 05 <nl> - s : 0 . 0889871047784905 <nl> - dkappa : - 2 . 3765011642970679e - 05 <nl> + x : 587610 . 58874632523 <nl> + y : 4140980 . 5335349957 <nl> + theta : 1 . 3203240522041373 <nl> + kappa : - 8 . 9366883963584112e - 06 <nl> + s : 0 . 088987136631966793 <nl> + dkappa : - 8 . 9367597706402029e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 24469193861647781 <nl> - a : 0 . 39314946870133205 <nl> + v : 0 . 244692027896415 <nl> + a : 0 . 39314961952069694 <nl> relative_time : 0 . 96000000000000052 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 58998163859 <nl> - y : 4140980 . 5383516969 <nl> - theta : 1 . 3203152454196836 <nl> - kappa : - 2 . 5092802598385108e - 05 <nl> - s : 0 . 093959721940900714 <nl> - dkappa : - 2 . 5093005233220384e - 05 <nl> + x : 587610 . 58997885848 <nl> + y : 4140980 . 5383524429 <nl> + theta : 1 . 3203236092602673 <nl> + kappa : - 9 . 4360723298629776e - 06 <nl> + s : 0 . 09395975561023262 <nl> + dkappa : - 9 . 4361476925538985e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 25257705931996166 <nl> - a : 0 . 39533403969371478 <nl> + v : 0 . 25257715163020034 <nl> + a : 0 . 39533419189674029 <nl> relative_time : 0 . 98000000000000054 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 59125351789 <nl> - y : 4140980 . 5433222977 <nl> - theta : 1 . 3203143316761663 <nl> - kappa : - 2 . 6463014983295407e - 05 <nl> - s : 0 . 099090467069164537 <nl> - dkappa : - 2 . 6463228683166554e - 05 <nl> + x : 587610 . 591250586 <nl> + y : 4140980 . 5433230838 <nl> + theta : 1 . 3203231522308947 <nl> + kappa : - 9 . 9513365462391125e - 06 <nl> + s : 0 . 099090502615231765 <nl> + dkappa : - 9 . 9514160241695665e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 26050417019945676 <nl> - a : 0 . 3973491099706502 <nl> + v : 0 . 26050426556720879 <nl> + a : 0 . 39734926351140637 <nl> relative_time : 1 . 0000000000000004 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 59820732509 <nl> - y : 4140980 . 5704983016 <nl> - theta : 1 . 3203093359219888 <nl> - kappa : - 3 . 39544435061347e - 05 <nl> - s : 0 . 12714203835883039 <nl> - dkappa : - 3 . 3954717702412292e - 05 <nl> + x : 587610 . 59820356325 <nl> + y : 4140980 . 5704993112 <nl> + theta : 1 . 32032065349207 <nl> + kappa : - 1 . 2768465552902187e - 05 <nl> + s : 0 . 12714208421988485 <nl> + dkappa : - 1 . 2768567530281058e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 30065485584584645 <nl> - a : 0 . 40501292094217911 <nl> + v : 0 . 30065496687853932 <nl> + a : 0 . 40501308052759977 <nl> relative_time : 1 . 1000000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 60616437439 <nl> - y : 4140980 . 6015950516 <nl> - theta : 1 . 3203036194186906 <nl> - kappa : - 4 . 2526677915858417e - 05 <nl> - s : 0 . 15924067534415057 <nl> - dkappa : - 4 . 2527021336500283e - 05 <nl> + x : 587610 . 606159663 <nl> + y : 4140980 . 6015963173 <nl> + theta : 1 . 3203177942543505 <nl> + kappa : - 1 . 5992028350617232e - 05 <nl> + s : 0 . 15924073311525019 <nl> + dkappa : - 1 . 5992156073492568e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 34138421383719497 <nl> - a : 0 . 40900051539277826 <nl> + v : 0 . 34138434109017929 <nl> + a : 0 . 409000680067309 <nl> relative_time : 1 . 2000000000000006 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 61513464735 <nl> - y : 4140980 . 6366515569 <nl> - theta : 1 . 3202971749952743 <nl> - kappa : - 5 . 2190471545620171e - 05 <nl> - s : 0 . 19542664376224583 <nl> - dkappa : - 5 . 2190893005421779e - 05 <nl> + x : 587610 . 61512886535 <nl> + y : 4140980 . 6366531095 <nl> + theta : 1 . 3203145709309974 <nl> + kappa : - 1 . 9626068701385267e - 05 <nl> + s : 0 . 19542671508947349 <nl> + dkappa : - 1 . 9626225448101266e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 38234801007829472 <nl> - a : 0 . 40977964446015441 <nl> + v : 0 . 38234815401939465 <nl> + a : 0 . 40977981342882214 <nl> relative_time : 1 . 3000000000000007 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 62512017193 <nl> - y : 4140980 . 6756757414 <nl> - theta : 1 . 3202900011947563 <nl> - kappa : - 6 . 294800922849268e - 05 <nl> - s : 0 . 23570812469640473 <nl> - dkappa : - 6 . 2948517559892941e - 05 <nl> + x : 587610 . 6251131983 <nl> + y : 4140980 . 6756776148 <nl> + theta : 1 . 3203109827932638 <nl> + kappa : - 2 . 3671408209089843e - 05 <nl> + s : 0 . 23570821126891839 <nl> + dkappa : - 2 . 3671597264552575e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 42324878558770868 <nl> - a : 0 . 40781805928201403 <nl> + v : 0 . 42324894661328016 <nl> + a : 0 . 40781823191042749 <nl> relative_time : 1 . 4000000000000008 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 6361161822 <nl> - y : 4140980 . 7186489808 <nl> - theta : 1 . 3202821014411406 <nl> - kappa : - 7 . 4794156469636566e - 05 <nl> - s : 0 . 28006589208746058 <nl> - dkappa : - 7 . 47947604636112e - 05 <nl> + x : 587610 . 63610789634 <nl> + y : 4140980 . 7186512072 <nl> + theta : 1 . 3203070315537389 <nl> + kappa : - 2 . 81261160668963e - 05 <nl> + s : 0 . 28006599563114953 <nl> + dkappa : - 2 . 8126340700591137e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 46383585649777065 <nl> - a : 0 . 40358351099606388 <nl> + v : 0 . 46383603494875958 <nl> + a : 0 . 40358368681041279 <nl> relative_time : 1 . 5000000000000009 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 64811227762 <nl> - y : 4140980 . 7655306282 <nl> - theta : 1 . 3202734832063889 <nl> - kappa : - 8 . 77177086184692e - 05 <nl> - s : 0 . 3284579902451687 <nl> - dkappa : - 8 . 7718416975511725e - 05 <nl> + x : 587610 . 6481025602 <nl> + y : 4140980 . 7655332405 <nl> + theta : 1 . 3203027209496891 <nl> + kappa : - 3 . 2985978804650988e - 05 <nl> + s : 0 . 32845811251791551 <nl> + dkappa : - 3 . 2986242252411747e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 50390531405458483 <nl> - a : 0 . 39754375074001042 <nl> + v : 0 . 50390551023258512 <nl> + a : 0 . 39754392942706646 <nl> relative_time : 1 . 600000000000001 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 6610935824 <nl> - y : 4140980 . 8162625488 <nl> - theta : 1 . 3202641571773999 <nl> - kappa : - 0 . 00010170264004083348 <nl> - s : 0 . 38082441135958334 <nl> - dkappa : - 0 . 00010170346133202371 <nl> + x : 587610 . 66108231607 <nl> + y : 4140980 . 8162655784 <nl> + theta : 1 . 3202980563264006 <nl> + kappa : - 3 . 8244970036280463e - 05 <nl> + s : 0 . 38082455414813116 <nl> + dkappa : - 3 . 8245275485810281e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 54330002461802629 <nl> - a : 0 . 39016652965156018 <nl> + v : 0 . 54330023880133826 <nl> + a : 0 . 3901667110586764 <nl> relative_time : 1 . 7000000000000011 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 67504190677 <nl> - y : 4140980 . 8707736544 <nl> - theta : 1 . 3202541364223119 <nl> - kappa : - 0 . 00011672935429164173 <nl> - s : 0 . 43709177675870303 <nl> - dkappa : - 0 . 00011673029692981007 <nl> + x : 587610 . 67502897617 <nl> + y : 4140980 . 8707771329 <nl> + theta : 1 . 3202930442201932 <nl> + kappa : - 4 . 3895720583412294e - 05 <nl> + s : 0 . 4370919418770895 <nl> + dkappa : - 4 . 3896071163559184e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 58190990409951748 <nl> - a : 0 . 3819335387648819 <nl> + v : 0 . 58191013655598656 <nl> + a : 0 . 38193372270699794 <nl> relative_time : 1 . 8000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 68993692531 <nl> - y : 4140980 . 9289845126 <nl> - theta : 1 . 3202434355432144 <nl> - kappa : - 0 . 00013277595467325347 <nl> - s : 0 . 49717809450027023 <nl> - dkappa : - 0 . 00013277702689440532 <nl> + x : 587610 . 68992221751 <nl> + y : 4140980 . 9289884712 <nl> + theta : 1 . 3202876919346256 <nl> + kappa : - 4 . 992999626468421e - 05 <nl> + s : 0 . 4971782837868185 <nl> + dkappa : - 4 . 99303950385326e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 61967113439369914 <nl> - a : 0 . 373214269945165 <nl> + v : 0 . 61967138532313537 <nl> + a : 0 . 37321445525047026 <nl> relative_time : 1 . 9000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 70575702144 <nl> - y : 4140980 . 9908106439 <nl> - theta : 1 . 3202320700698618 <nl> - kappa : - 0 . 00014981915340369403 <nl> - s : 0 . 56099616374211592 <nl> - dkappa : - 0 . 00014982036325577623 <nl> + x : 587610 . 70574042608 <nl> + y : 4140980 . 9908151124 <nl> + theta : 1 . 3202820072372488 <nl> + kappa : - 5 . 6339039784817521e - 05 <nl> + s : 0 . 56099637904889832 <nl> + dkappa : - 5 . 63394897455103e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 65653711012162652 <nl> - a : 0 . 36402556211772785 <nl> + v : 0 . 6565373795999222 <nl> + a : 0 . 36402574760918532 <nl> relative_time : 2 . 0000000000000013 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 72247941338 <nl> - y : 4140981 . 0561630158 <nl> - theta : 1 . 3202200563691546 <nl> - kappa : - 0 . 0001678344073460433 <nl> - s : 0 . 62845408297935546 <nl> - dkappa : - 0 . 00016783576267880674 <nl> + x : 587610 . 7224608229 <nl> + y : 4140981 . 056168023 <nl> + theta : 1 . 320275998314334 <nl> + kappa : - 6 . 3113621775103942e - 05 <nl> + s : 0 . 62845432616046315 <nl> + dkappa : - 6 . 3114125842072175e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 6924600217859076 <nl> - a : 0 . 3543501033501727 <nl> + v : 0 . 692460309780699 <nl> + a : 0 . 35435028803969548 <nl> relative_time : 2 . 1000000000000014 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 74008011271 <nl> - y : 4140981 . 1249478785 <nl> - theta : 1 . 3202074116748612 <nl> - kappa : - 0 . 00018679587345050351 <nl> - s : 0 . 699455083197703 <nl> - dkappa : - 0 . 00018679738190500555 <nl> + x : 587610 . 74005942256 <nl> + y : 4140981 . 1249534544 <nl> + theta : 1 . 3202696737857345 <nl> + kappa : - 7 . 0244024037722036e - 05 <nl> + s : 0 . 69945535609936516 <nl> + dkappa : - 7 . 0244585052780866e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 72739032869591058 <nl> - a : 0 . 34417058171010173 <nl> + v : 0 . 72739063508547286 <nl> + a : 0 . 34417076479855313 <nl> relative_time : 2 . 2000000000000015 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 7585338814 <nl> - y : 4140981 . 1970666018 <nl> - theta : 1 . 3201941541184388 <nl> - kappa : - 0 . 00020667636252130089 <nl> - s : 0 . 77389735475414745 <nl> - dkappa : - 0 . 0002066780315190349 <nl> + x : 587610 . 75851098984 <nl> + y : 4140981 . 1970727732 <nl> + theta : 1 . 3202630427203061 <nl> + kappa : - 7 . 7720022160116835e - 05 <nl> + s : 0 . 77389765920674025 <nl> + dkappa : - 7 . 7720642883422517e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 76127675896776414 <nl> - a : 0 . 33346968526511717 <nl> + v : 0 . 76127708355990631 <nl> + a : 0 . 33346986614231078 <nl> relative_time : 2 . 3000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 77781418909 <nl> - y : 4140981 . 272415502 <nl> - theta : 1 . 3201803027598755 <nl> - kappa : - 0 . 00022744729298358822 <nl> - s : 0 . 85167387425762864 <nl> - dkappa : - 0 . 00022744912971523943 <nl> + x : 587610 . 77778899774 <nl> + y : 4140981 . 272422296 <nl> + theta : 1 . 3202561146513281 <nl> + kappa : - 8 . 55308681293796e - 05 <nl> + s : 0 . 85167421206957283 <nl> + dkappa : - 8 . 5531551235247652e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 79406630952435708 <nl> - a : 0 . 32223010208282121 <nl> + v : 0 . 79406665207531679 <nl> + a : 0 . 32223028032752077 <nl> relative_time : 2 . 4000000000000017 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 79789317015 <nl> - y : 4140981 . 3508856772 <nl> - theta : 1 . 3201658776185123 <nl> - kappa : - 0 . 00024907864465034674 <nl> - s : 0 . 93267223144971334 <nl> - dkappa : - 0 . 00024908065606417482 <nl> + x : 587610 . 79786558344 <nl> + y : 4140981 . 3508931207 <nl> + theta : 1 . 3202488995919239 <nl> + kappa : - 9 . 3665272946627518e - 05 <nl> + s : 0 . 9326726044032625 <nl> + dkappa : - 9 . 36660210192121e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 8257042460953381 <nl> - a : 0 . 31043452023081608 <nl> + v : 0 . 82570460632867737 <nl> + a : 0 . 31043469561073556 <nl> relative_time : 2 . 5000000000000018 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 8187457684 <nl> - y : 4140981 . 4323617667 <nl> - theta : 1 . 3201479833421566 <nl> - kappa : - 0 . 00027004548424752371 <nl> - s : 1 . 016774456085271 <nl> - dkappa : - 0 . 00026556567946890773 <nl> + x : 587610 . 81871307292 <nl> + y : 4140981 . 4323705561 <nl> + theta : 1 . 3202407380462473 <nl> + kappa : - 0 . 00010169443362044701 <nl> + s : 1 . 0167748659341882 <nl> + dkappa : - 0 . 0001000097794531042 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 8561341032171168 <nl> - a : 0 . 29806562777670403 <nl> + v : 0 . 8561344808426159 <nl> + a : 0 . 2980658002485076 <nl> relative_time : 2 . 6000000000000019 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 84035467461 <nl> - y : 4140981 . 51672051 <nl> - theta : 1 . 3201173420603638 <nl> - kappa : - 0 . 00028555242582729162 <nl> - s : 1 . 1038568448131505 <nl> - dkappa : - 0 . 00025781630216759657 <nl> + x : 587610 . 84030579834 <nl> + y : 4140981 . 5167334825 <nl> + theta : 1 . 3202295045413557 <nl> + kappa : - 0 . 00010827634981725942 <nl> + s : 1 . 1038572932822748 <nl> + dkappa : - 9 . 7846244309983591e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 88529768423286215 <nl> - a : 0 . 28510611278808717 <nl> + v : 0 . 8852980789654159 <nl> + a : 0 . 28510628249738923 <nl> relative_time : 2 . 700000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 86267092673 <nl> - y : 4140981 . 6038406529 <nl> - theta : 1 . 3200856977669932 <nl> - kappa : - 0 . 00030156697156207387 <nl> - s : 1 . 1937897880568549 <nl> - dkappa : - 0 . 00024981325678501452 <nl> + x : 587610 . 86260534008 <nl> + y : 4140981 . 6038579457 <nl> + theta : 1 . 320217903318909 <nl> + kappa : - 0 . 00011507371846160838 <nl> + s : 1 . 1937902768435587 <nl> + dkappa : - 9 . 5611888006584122e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 91313506129250421 <nl> - a : 0 . 27153866333256776 <nl> + v : 0 . 91313547287101593 <nl> + a : 0 . 27153883061393297 <nl> relative_time : 2 . 800000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 88566085428 <nl> - y : 4140981 . 6935907481 <nl> - theta : 1 . 3200530982062837 <nl> - kappa : - 0 . 00031806495904424393 <nl> - s : 1 . 2864375968952191 <nl> - dkappa : - 0 . 00024156861814663525 <nl> + x : 587610 . 88557805307 <nl> + y : 4140981 . 6936124926 <nl> + theta : 1 . 3202059518825839 <nl> + kappa : - 0 . 00012207628383033688 <nl> + s : 1 . 2864381276727517 <nl> + dkappa : - 9 . 3310081691489957e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 93958457535273243 <nl> - a : 0 . 25734596747774796 <nl> + v : 0 . 93958500355900976 <nl> + a : 0 . 2573461328546911 <nl> relative_time : 2 . 9000000000000021 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 9092892356 <nl> - y : 4140981 . 7858332959 <nl> - theta : 1 . 3200195933225016 <nl> - kappa : - 0 . 00033502111247694363 <nl> - s : 1 . 3816583299430842 <nl> - dkappa : - 0 . 00023309501747863817 <nl> + x : 587610 . 9091887417 <nl> + y : 4140981 . 7858596155 <nl> + theta : 1 . 3201936685426112 <nl> + kappa : - 0 . 00012927331762320422 <nl> + s : 1 . 3816589043658092 <nl> + dkappa : - 9 . 0944351853629676e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 96458283617699725 <nl> - a : 0 . 24251071329123011 <nl> + v : 0 . 9645832808546464 <nl> + a : 0 . 24251087747621622 <nl> relative_time : 3 . 0000000000000022 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 93351925455 <nl> - y : 4140981 . 8804245694 <nl> - theta : 1 . 3199852353208534 <nl> - kappa : - 0 . 00035240901184636621 <nl> - s : 1 . 4793036202319749 <nl> - dkappa : - 0 . 0002244056578136292 <nl> + x : 587610 . 93340061745 <nl> + y : 4140981 . 8804555805 <nl> + theta : 1 . 3201810724381122 <nl> + kappa : - 0 . 00013665360587822011 <nl> + s : 1 . 4793042399424929 <nl> + dkappa : - 8 . 8518384623323691e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 98806472233550868 <nl> - a : 0 . 22701558884061632 <nl> + v : 0 . 98806518340883032 <nl> + a : 0 . 22701575273506056 <nl> relative_time : 3 . 1000000000000023 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 95831245719 <nl> - y : 4140981 . 9772144482 <nl> - theta : 1 . 319950078728402 <nl> - kappa : - 0 . 00037020106209403924 <nl> - s : 1 . 5792185020907747 <nl> - dkappa : - 0 . 00021551432939636119 <nl> + x : 587610 . 95817525568 <nl> + y : 4140981 . 9772502612 <nl> + theta : 1 . 3201681835594314 <nl> + kappa : - 0 . 00014420543588697929 <nl> + s : 1 . 5792191687289392 <nl> + dkappa : - 8 . 6036030073331711e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0099633812052373 <nl> - a : 0 . 21084328219350879 <nl> + v : 1 . 009963858698121 <nl> + a : 0 . 2108434468877767 <nl> relative_time : 3 . 2000000000000024 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587610 . 98362870957 <nl> - y : 4140982 . 076046255 <nl> - theta : 1 . 319914180454977 <nl> - kappa : - 0 . 00038836846228910727 <nl> - s : 1 . 6812412380264024 <nl> - dkappa : - 0 . 00020643542508945505 <nl> + x : 587610 . 983472552 <nl> + y : 4140982 . 0760869719 <nl> + theta : 1 . 320155022770467 <nl> + kappa : - 0 . 00015191658310999558 <nl> + s : 1 . 6812419532402219 <nl> + dkappa : - 8 . 3501306519900254e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 030210228969914 <nl> - a : 0 . 19397648141750976 <nl> + v : 1 . 0302107230247333 <nl> + a : 0 . 19397664819091698 <nl> relative_time : 3 . 3000000000000025 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 00942615443 <nl> - y : 4140982 . 1767565827 <nl> - theta : 1 . 3198775998540961 <nl> - kappa : - 0 . 00040688117480061495 <nl> - s : 1 . 785203145604487 <nl> - dkappa : - 0 . 00019718395577912026 <nl> + x : 587611 . 00925068057 <nl> + y : 4140982 . 1768022976 <nl> + theta : 1 . 3201416118309997 <nl> + kappa : - 0 . 00015977429809203644 <nl> + s : 1 . 7852039110629194 <nl> + dkappa : - 8 . 0918404823810026e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0487349506200299 <nl> - a : 0 . 17639787458022144 <nl> + v : 1 . 048735461516537 <nl> + a : 0 . 17639804490103383 <nl> relative_time : 3 . 4000000000000026 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 0356611677 <nl> - y : 4140982 . 2791751288 <nl> - theta : 1 . 3198403987838763 <nl> - kappa : - 0 . 00042570789446979011 <nl> - s : 1 . 8909284243300462 <nl> - dkappa : - 0 . 00018777556578087549 <nl> + x : 587611 . 03546605038 <nl> + y : 4140982 . 2792259273 <nl> + theta : 1 . 3201279734190319 <nl> + kappa : - 0 . 00016776529337745721 <nl> + s : 1 . 8909292417376804 <nl> + dkappa : - 7 . 829169269142344e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0654654999528355 <nl> - a : 0 . 15809014974924598 <nl> + v : 1 . 0654660281270578 <nl> + a : 0 . 15809032527467959 <nl> relative_time : 3 . 5000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 06228879548 <nl> - y : 4140982 . 3831263981 <nl> - theta : 1 . 3198026409890353 <nl> - kappa : - 0 . 00044481636136562243 <nl> - s : 1 . 9982359119901361 <nl> - dkappa : - 0 . 00017822637654431973 <nl> + x : 587611 . 06207374088 <nl> + y : 4140982 . 3831823566 <nl> + theta : 1 . 3201141309042157 <nl> + kappa : - 0 . 00017587587625909274 <nl> + s : 1 . 9982367831011991 <nl> + dkappa : - 7 . 5625671038928236e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0804048769647627 <nl> - a : 0 . 14131926243221474 <nl> + v : 1 . 080405422925661 <nl> + a : 0 . 14131944196136093 <nl> relative_time : 3 . 6000000000000028 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 08931336785 <nl> - y : 4140982 . 4884377918 <nl> - theta : 1 . 3197495936161303 <nl> - kappa : - 0 . 00045579674472408672 <nl> - s : 2 . 1069594938776315 <nl> - dkappa : - 0 . 00016969173199111239 <nl> + x : 587611 . 089050705 <nl> + y : 4140982 . 488506014 <nl> + theta : 1 . 3200932273353878 <nl> + kappa : - 0 . 00018166516733258043 <nl> + s : 2 . 1069604204842989 <nl> + dkappa : - 7 . 3154250820303557e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0938454165626261 <nl> - a : 0 . 12803029881561506 <nl> + v : 1 . 0938459805180267 <nl> + a : 0 . 12803047860894504 <nl> relative_time : 3 . 7000000000000028 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 11665753985 <nl> - y : 4140982 . 5949915242 <nl> - theta : 1 . 3196956778104525 <nl> - kappa : - 0 . 00046676926289165909 <nl> - s : 2 . 2169658648431052 <nl> - dkappa : - 0 . 00016107509317627361 <nl> + x : 587611 . 11634625809 <nl> + y : 4140982 . 5950722704 <nl> + theta : 1 . 3200719643617989 <nl> + kappa : - 0 . 00018748295175793886 <nl> + s : 2 . 2169668487407508 <nl> + dkappa : - 7 . 0657438517819873e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 106110380320763 <nl> - a : 0 . 11772464298533379 <nl> + v : 1 . 10611096213795 <nl> + a : 0 . 11772481997152592 <nl> relative_time : 3 . 8000000000000029 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 14429485356 <nl> - y : 4140982 . 70268756 <nl> - theta : 1 . 3196411840034639 <nl> - kappa : - 0 . 00047785941131250334 <nl> - s : 2 . 3281515528149925 <nl> - dkappa : - 0 . 00015236608017798271 <nl> + x : 587611 . 14393443184 <nl> + y : 4140982 . 7027809657 <nl> + theta : 1 . 3200504734394958 <nl> + kappa : - 0 . 00019336310546940393 <nl> + s : 2 . 328152595771475 <nl> + dkappa : - 6 . 8133859255706443e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1174731682220997 <nl> - a : 0 . 10990367902725769 <nl> + v : 1 . 1174737674946349 <nl> + a : 0 . 10990385080319751 <nl> relative_time : 3 . 900000000000003 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 17220576515 <nl> - y : 4140982 . 8114497419 <nl> - theta : 1 . 3195861507305562 <nl> - kappa : - 0 . 00048905934756885393 <nl> - s : 2 . 4404379326404504 <nl> - dkappa : - 0 . 00014357085158994541 <nl> + x : 587611 . 17179571721 <nl> + y : 4140982 . 8115559327 <nl> + theta : 1 . 3200287697658215 <nl> + kappa : - 0 . 00019930147030552291 <nl> + s : 2 . 4404390363720836 <nl> + dkappa : - 6 . 5585297587654446e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1281573186581511 <nl> - a : 0 . 10406879102727357 <nl> + v : 1 . 1281579347726955 <nl> + a : 0 . 10406895585805381 <nl> relative_time : 4 . 0000000000000027 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 20037566754 <nl> - y : 4140982 . 9212211487 <nl> - theta : 1 . 3195306067930579 <nl> - kappa : - 0 . 00050036321024225826 <nl> - s : 2 . 5537662399262175 <nl> - dkappa : - 0 . 00013469401034149622 <nl> + x : 587611 . 1999155333 <nl> + y : 4140982 . 9213402458 <nl> + theta : 1 . 3200068646992715 <nl> + kappa : - 0 . 00020529493845725122 <nl> + s : 2 . 553767406080421 <nl> + dkappa : - 6 . 3013087288738562e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1383365084290205 <nl> - a : 0 . 099721363071268207 <nl> + v : 1 . 138337140632155 <nl> + a : 0 . 099721519890188778 <nl> relative_time : 4 . 1000000000000023 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 2287936511 <nl> - y : 4140983 . 0319592692 <nl> - theta : 1 . 3194745737020259 <nl> - kappa : - 0 . 00051176662157218433 <nl> - s : 2 . 6680925848794721 <nl> - dkappa : - 0 . 00012573899425618196 <nl> + x : 587611 . 2282829897 <nl> + y : 4140983 . 0320913866 <nl> + theta : 1 . 31998476672325 <nl> + kappa : - 0 . 00021134118877099776 <nl> + s : 2 . 6680938150241023 <nl> + dkappa : - 6 . 0418224525956126e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1481345527434001 <nl> - a : 0 . 096362779245128427 <nl> + v : 1 . 1481352002084457 <nl> + a : 0 . 096362927653696348 <nl> relative_time : 4 . 200000000000002 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 25745126419 <nl> - y : 4140983 . 1436311691 <nl> - theta : 1 . 3194180681220455 <nl> - kappa : - 0 . 000523266190114627 <nl> - s : 2 . 7833829661486913 <nl> - dkappa : - 0 . 00011670846661034491 <nl> + x : 587611 . 25688964978 <nl> + y : 4140983 . 1437764172 <nl> + theta : 1 . 3199624824098422 <nl> + kappa : - 0 . 00021743842305167052 <nl> + s : 2 . 7833842617680586 <nl> + dkappa : - 5 . 7801481028766289e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 157625405218571 <nl> - a : 0 . 093494423634740975 <nl> + v : 1 . 1576260671124097 <nl> + a : 0 . 093494563902670524 <nl> relative_time : 4 . 3000000000000016 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 28634127369 <nl> - y : 4140983 . 2562086629 <nl> - theta : 1 . 3193611043150133 <nl> - kappa : - 0 . 00053485901340071592 <nl> - s : 2 . 899608284664509 <nl> - dkappa : - 0 . 00010760470669170604 <nl> + x : 587611 . 28572829335 <nl> + y : 4140983 . 2563671488 <nl> + theta : 1 . 319940017383578 <nl> + kappa : - 0 . 00022358510236572174 <nl> + s : 2 . 8996096471620749 <nl> + dkappa : - 5 . 5163517259629294e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1668331578804028 <nl> - a : 0 . 0906176803259927 <nl> + v : 1 . 1668338334302983 <nl> + a : 0 . 090617813391205254 <nl> relative_time : 4 . 4000000000000012 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 31546520337 <nl> - y : 4140983 . 3696612278 <nl> - theta : 1 . 3193026012308717 <nl> - kappa : - 0 . 00054540680210220206 <nl> - s : 3 . 016739357480577 <nl> - dkappa : - 9 . 8608981074379737e - 05 <nl> + x : 587611 . 31479538558 <nl> + y : 4140983 . 3698343611 <nl> + theta : 1 . 3199166610925435 <nl> + kappa : - 0 . 00022943492160475354 <nl> + s : 3 . 016740788188331 <nl> + dkappa : - 5 . 2541088681560844e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1757320411633536 <nl> - a : 0 . 087233933404770383 <nl> + v : 1 . 1757327297237725 <nl> + a : 0 . 087234060873394539 <nl> relative_time : 4 . 5000000000000009 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 34485870856 <nl> - y : 4140983 . 4839443378 <nl> - theta : 1 . 3192370636787052 <nl> - kappa : - 0 . 00054919274698814744 <nl> - s : 3 . 1347419316144194 <nl> - dkappa : - 9 . 0624630210608259e - 05 <nl> + x : 587611 . 344101079 <nl> + y : 4140983 . 4841400925 <nl> + theta : 1 . 3198888161398221 <nl> + kappa : - 0 . 00023325116263402489 <nl> + s : 3 . 1347434318089444 <nl> + dkappa : - 5 . 0116600062354195e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1842464239104706 <nl> - a : 0 . 082844566956960838 <nl> + v : 1 . 1842471250299023 <nl> + a : 0 . 082844691103332327 <nl> relative_time : 4 . 6000000000000005 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 37445826072 <nl> - y : 4140983 . 5990285678 <nl> - theta : 1 . 3191710667115775 <nl> - kappa : - 0 . 00055300523115830113 <nl> - s : 3 . 2535716978882978 <nl> - dkappa : - 8 . 2584309446804709e - 05 <nl> + x : 587611 . 373612204 <nl> + y : 4140983 . 5992471022 <nl> + theta : 1 . 3198607759951964 <nl> + kappa : - 0 . 00023709415534642908 <nl> + s : 3 . 2535732688135091 <nl> + dkappa : - 4 . 7675115883694479e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1922508133733891 <nl> - a : 0 . 076950965068450852 <nl> + v : 1 . 1922515268611669 <nl> + a : 0 . 076951088835112619 <nl> relative_time : 4 . 7 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 404249076 <nl> - y : 4140983 . 7148564351 <nl> - theta : 1 . 3191046432927873 <nl> - kappa : - 0 . 00055684235040310464 <nl> - s : 3 . 3731693047700655 <nl> - dkappa : - 7 . 449203465686366e - 05 <nl> + x : 587611 . 40331402072 <nl> + y : 4140983 . 7150978977 <nl> + theta : 1 . 3198325546637832 <nl> + kappa : - 0 . 000240961980295439 <nl> + s : 3 . 3731709476666385 <nl> + dkappa : - 4 . 5217855585398154e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1995698552123335 <nl> - a : 0 . 069054511825127243 <nl> + v : 1 . 1995705812054558 <nl> + a : 0 . 069054638822829362 <nl> relative_time : 4 . 8 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 43421138125 <nl> - y : 4140983 . 8313510627 <nl> - theta : 1 . 3190378375092875 <nl> - kappa : - 0 . 00056070155792660686 <nl> - s : 3 . 4934553722140267 <nl> - dkappa : - 6 . 6353176894264868e - 05 <nl> + x : 587611 . 43318681559 <nl> + y : 4140983 . 8316155868 <nl> + theta : 1 . 3198041708767949 <nl> + kappa : - 0 . 00024485207030753572 <nl> + s : 3 . 4934570883555041 <nl> + dkappa : - 4 . 2746450113449043e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2059783334961169 <nl> - a : 0 . 058656591312876809 <nl> + v : 1 . 2059790725260671 <nl> + a : 0 . 058656725820576523 <nl> relative_time : 4 . 8999999999999995 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 46431917278 <nl> - y : 4140983 . 9484113464 <nl> - theta : 1 . 3189707073409513 <nl> - kappa : - 0 . 00056457950437263367 <nl> - s : 3 . 6143255055017973 <nl> - dkappa : - 5 . 8174799768137339e - 05 <nl> + x : 587611 . 46320466208 <nl> + y : 4140983 . 9486990441 <nl> + theta : 1 . 31977564926812 <nl> + kappa : - 0 . 00024876104922853668 <nl> + s : 3 . 6143272962373789 <nl> + dkappa : - 4 . 02630443657531e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2112011707021408 <nl> - a : 0 . 045258587617586353 <nl> + v : 1 . 2112019237617087 <nl> + a : 0 . 045258734582448161 <nl> relative_time : 4 . 9999999999999991 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 49453897355 <nl> - y : 4140984 . 0659071263 <nl> - theta : 1 . 3189033274298403 <nl> - kappa : - 0 . 00056847187785095965 <nl> - s : 3 . 7356453090831634 <nl> - dkappa : - 4 . 9965996819323889e - 05 <nl> + x : 587611 . 49333418359 <nl> + y : 4140984 . 0662180861 <nl> + theta : 1 . 3197470215508975 <nl> + kappa : - 0 . 00025268457066992368 <nl> + s : 3 . 7356471758871774 <nl> + dkappa : - 3 . 7770399637893164e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2149134277163958 <nl> - a : 0 . 028361884825142646 <nl> + v : 1 . 2149141963264973 <nl> + a : 0 . 028362049862538118 <nl> relative_time : 5 . 0999999999999988 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 52482859173 <nl> - y : 4140984 . 18367436 <nl> - theta : 1 . 3188357918494713 <nl> - kappa : - 0 . 000572373243963477 <nl> - s : 3 . 8572454004169376 <nl> - dkappa : - 4 . 1738228896445485e - 05 <nl> + x : 587611 . 52353331435 <nl> + y : 4140984 . 1840086356 <nl> + theta : 1 . 3197183276940949 <nl> + kappa : - 0 . 00025661715675517058 <nl> + s : 3 . 8572473449449944 <nl> + dkappa : - 3 . 5271996068883788e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2167403038334605 <nl> - a : 0 . 007467867021432607 <nl> + v : 1 . 2167410901099598 <nl> + a : 0 . 0074680564149404837 <nl> relative_time : 5 . 1999999999999984 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 5551358785 <nl> - y : 4140984 . 30151029 <nl> - theta : 1 . 3187682168740817 <nl> - kappa : - 0 . 00057627688583036644 <nl> - s : 3 . 978916423811822 <nl> - dkappa : - 3 . 350566153196549e - 05 <nl> + x : 587611 . 55375006143 <nl> + y : 4140984 . 3018678972 <nl> + theta : 1 . 3196896170990842 <nl> + kappa : - 0 . 00026055203686607161 <nl> + s : 3 . 978918447963649 <nl> + dkappa : - 3 . 277213508692595e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2162571367565029 <nl> - a : - 0 . 017922081707657175 <nl> + v : 1 . 2162579434770324 <nl> + a : - 0 . 017921861006250886 <nl> relative_time : 5 . 299999999999998 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 58545324008 <nl> - y : 4140984 . 4191542594 <nl> - theta : 1 . 31870044844295 <nl> - kappa : - 0 . 000574448176974083 <nl> - s : 4 . 1004040642672637 <nl> - dkappa : - 2 . 635703757028234e - 05 <nl> + x : 587611 . 58394662244 <nl> + y : 4140984 . 4195430186 <nl> + theta : 1 . 3196586179369323 <nl> + kappa : - 0 . 00026263268649738314 <nl> + s : 4 . 1004061702562256 <nl> + dkappa : - 3 . 0491979158225139e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2129894025972794 <nl> - a : - 0 . 048306577276239743 <nl> + v : 1 . 2129902332680598 <nl> + a : - 0 . 048306317646941876 <nl> relative_time : 5 . 3999999999999977 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 61566052609 <nl> - y : 4140984 . 536323023 <nl> - theta : 1 . 3186328905032632 <nl> - kappa : - 0 . 00057143370292370372 <nl> - s : 4 . 2214040613143151 <nl> - dkappa : - 1 . 9460361352266286e - 05 <nl> + x : 587611 . 61402726022 <nl> + y : 4140984 . 5367444479 <nl> + theta : 1 . 3196272573501471 <nl> + kappa : - 0 . 00026431988039103959 <nl> + s : 4 . 2214062517436117 <nl> + dkappa : - 2 . 8265967382852631e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 2064127158761349 <nl> - a : - 0 . 084184235598428192 <nl> + v : 1 . 2064135747987972 <nl> + a : - 0 . 084183928753038567 <nl> relative_time : 5 . 4999999999999973 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 64565640211 <nl> - y : 4140984 . 6526717646 <nl> - theta : 1 . 3185658053773235 <nl> - kappa : - 0 . 00056844032609412352 <nl> - s : 4 . 3415572228564914 <nl> - dkappa : - 1 . 2611952493172342e - 05 <nl> + x : 587611 . 64389737532 <nl> + y : 4140984 . 6531256293 <nl> + theta : 1 . 3195961162438916 <nl> + kappa : - 0 . 00026599526627196139 <nl> + s : 4 . 3415595008020409 <nl> + dkappa : - 2 . 6055534596646519e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 195952829522003 <nl> - a : - 0 . 12605367258833602 <nl> + v : 1 . 1959537218604084 <nl> + a : - 0 . 12605330957044719 <nl> relative_time : 5 . 599999999999997 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 6753362387 <nl> - y : 4140984 . 7677946445 <nl> - theta : 1 . 3184994270667909 <nl> - kappa : - 0 . 00056547848777375445 <nl> - s : 4 . 4604444390106339 <nl> - dkappa : - 5 . 8356991354340237e - 06 <nl> + x : 587611 . 67345277732 <nl> + y : 4140984 . 7682806123 <nl> + theta : 1 . 3195653032421761 <nl> + kappa : - 0 . 00026765300018799379 <nl> + s : 4 . 4604468081106345 <nl> + dkappa : - 2 . 3868391061219664e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1809856348724068 <nl> - a : - 0 . 17441350416007612 <nl> + v : 1 . 1809865667194672 <nl> + a : - 0 . 1744130753450733 <nl> relative_time : 5 . 6999999999999966 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 70457920316 <nl> - y : 4140984 . 8812229745 <nl> - theta : 1 . 3184340258111513 <nl> - kappa : - 0 . 00056256024620361385 <nl> - s : 4 . 577581695947762 <nl> - dkappa : 8 . 4081122718844178e - 07 <nl> + x : 587611 . 70257314 <nl> + y : 4140984 . 881740578 <nl> + theta : 1 . 3195349437906767 <nl> + kappa : - 0 . 00026928633318446145 <nl> + s : 4 . 577584160498942 <nl> + dkappa : - 2 . 1713441059970997e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1608371616734565 <nl> - a : - 0 . 2297623462277619 <nl> + v : 1 . 1608381401179564 <nl> + a : - 0 . 22976184132282335 <nl> relative_time : 5 . 7999999999999963 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 73324701516 <nl> - y : 4140984 . 9924203884 <nl> - theta : 1 . 3183699108716418 <nl> - kappa : - 0 . 00055969940079755322 <nl> - s : 4 . 6924150897339372 <nl> - dkappa : 7 . 3860075518728675e - 06 <nl> + x : 587611 . 73112076335 <nl> + y : 4140984 . 9929690124 <nl> + theta : 1 . 3195051814490366 <nl> + kappa : - 0 . 00027088754177854708 <nl> + s : 4 . 69241765479448 <nl> + dkappa : - 1 . 9600874627231143e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1347835780798525 <nl> - a : - 0 . 29259881470550658 <nl> + v : 1 . 1347846112732685 <nl> + a : - 0 . 29259822274960329 <nl> relative_time : 5 . 8999999999999959 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 76118270156 <nl> - y : 4140985 . 1007780153 <nl> - theta : 1 . 3183074333151668 <nl> - kappa : - 0 . 00055691161636248665 <nl> - s : 4 . 804315840171121 <nl> - dkappa : 1 . 3764051048999394e - 05 <nl> + x : 587611 . 75893933256 <nl> + y : 4140985 . 1013568756 <nl> + theta : 1 . 3194761791831695 <nl> + kappa : - 0 . 00027244785843366805 <nl> + s : 4 . 8043185116702762 <nl> + dkappa : - 1 . 75422592774079e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 1020511906548831 <nl> - a : - 0 . 36342152550742296 <nl> + v : 1 . 1020522878782049 <nl> + a : - 0 . 36342083487131893 <nl> relative_time : 5 . 9999999999999956 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 78820935183 <nl> - y : 4140985 . 2056096508 <nl> - theta : 1 . 3182469887982293 <nl> - kappa : - 0 . 00055421454731862079 <nl> - s : 4 . 9125753046380325 <nl> - dkappa : 1 . 9934550984414854e - 05 <nl> + x : 587611 . 78585267928 <nl> + y : 4140985 . 2062177737 <nl> + theta : 1 . 3194481206575563 <nl> + kappa : - 0 . 00027395740203385452 <nl> + s : 4 . 912578089492408 <nl> + dkappa : - 1 . 5550631734131873e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0618164443704252 <nl> - a : - 0 . 44272909454762482 <nl> + v : 1 . 0618176161009767 <nl> + a : - 0 . 4427282929338765 <nl> relative_time : 6 . 0999999999999952 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 81413758232 <nl> - y : 4140985 . 3061446804 <nl> - theta : 1 . 3181890827271951 <nl> - kappa : - 0 . 000550864486333327 <nl> - s : 5 . 0163999919310056 <nl> - dkappa : 2 . 5676494876991362e - 05 <nl> + x : 587611 . 81166787446 <nl> + y : 4140985 . 3067820142 <nl> + theta : 1 . 3194203740514912 <nl> + kappa : - 0 . 00027513740218432242 <nl> + s : 5 . 0164028981675459 <nl> + dkappa : - 1 . 3676032246943152e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 1 . 0132059226069452 <nl> - a : - 0 . 53102013774022516 <nl> + v : 1 . 013207180585205 <nl> + a : - 0 . 53101921218318193 <nl> relative_time : 6 . 1999999999999948 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 83878151525 <nl> - y : 4140985 . 401518805 <nl> - theta : 1 . 3181344563993038 <nl> - kappa : - 0 . 0005438466194209483 <nl> - s : 5 . 1149065761048567 <nl> - dkappa : 3 . 0240326130001106e - 05 <nl> + x : 587611 . 83618255844 <nl> + y : 4140985 . 4021895779 <nl> + theta : 1 . 3193898369264909 <nl> + kappa : - 0 . 0002749106397252803 <nl> + s : 5 . 1149096129904921 <nl> + dkappa : - 1 . 2075697409302494e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 955296347153497 <nl> - a : - 0 . 62879327099933668 <nl> + v : 0 . 95529770444991891 <nl> + a : - 0 . 62879220786514156 <nl> relative_time : 6 . 2999999999999945 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 86185028078 <nl> - y : 4140985 . 490796898 <nl> - theta : 1 . 318083321624977 <nl> - kappa : - 0 . 000537277313837458 <nl> - s : 5 . 2071169103137294 <nl> - dkappa : 3 . 4512450766565646e - 05 <nl> + x : 587611 . 85913034086 <nl> + y : 4140985 . 49149899 <nl> + theta : 1 . 3193612516384547 <nl> + kappa : - 0 . 00027469837120925396 <nl> + s : 5 . 2071200884917213 <nl> + dkappa : - 1 . 057765094003121e - 05 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 887114578207724 <nl> - a : - 0 . 73654711023907338 <nl> + v : 0 . 88711604928955834 <nl> + a : - 0 . 73654589522566072 <nl> relative_time : 6 . 3999999999999941 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 88307420118 <nl> - y : 4140985 . 5729352823 <nl> - theta : 1 . 3180362761780993 <nl> - kappa : - 0 . 00053123336584080219 <nl> - s : 5 . 2919530406519648 <nl> - dkappa : 3 . 8442926950154853e - 05 <nl> + x : 587611 . 88024295913 <nl> + y : 4140985 . 5736662121 <nl> + theta : 1 . 3193349523530973 <nl> + kappa : - 0 . 00027450307808265319 <nl> + s : 5 . 2919563722849228 <nl> + dkappa : - 9 . 1994051961318841e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 80763761437585824 <nl> - a : - 0 . 85478027137354773 <nl> + v : 0 . 80763921517397175 <nl> + a : - 0 . 854778889510646 <nl> relative_time : 6 . 4999999999999938 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 90215738211 <nl> - y : 4140985 . 6467888225 <nl> - theta : 1 . 3179939759451056 <nl> - kappa : - 0 . 00052579903743215652 <nl> - s : 5 . 36823221999496 <nl> - dkappa : 4 . 1976957751843212e - 05 <nl> + x : 587611 . 8992260719 <nl> + y : 4140985 . 6475457093 <nl> + theta : 1 . 3193113057220316 <nl> + kappa : - 0 . 000274327483025535 <nl> + s : 5 . 3682357189145442 <nl> + dkappa : - 7 . 9601749972235e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 71579259267271989 <nl> - a : - 0 . 98399137031687356 <nl> + v : 0 . 71579434064841718 <nl> + a : - 0 . 98398980596600349 <nl> relative_time : 6 . 5999999999999934 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 91877646535 <nl> - y : 4140985 . 7111060936 <nl> - theta : 1 . 3179571376900263 <nl> - kappa : - 0 . 00052106641158295613 <nl> - s : 5 . 4346619218400152 <nl> - dkappa : 4 . 505466014048275e - 05 <nl> + x : 587611 . 91575801722 <nl> + y : 4140985 . 7118856222 <nl> + theta : 1 . 3192907124284758 <nl> + kappa : - 0 . 00027417456142972641 <nl> + s : 5 . 4346656037033227 <nl> + dkappa : - 6 . 8809586303086435e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 61045678852171847 <nl> - a : - 1 . 1246790229831638 <nl> + v : 0 . 6104587027335624 <nl> + a : - 1 . 1246772598376387 <nl> relative_time : 6 . 6999999999999931 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 93257938069 <nl> - y : 4140985 . 7645245548 <nl> - theta : 1 . 3179265418195456 <nl> - kappa : - 0 . 00051713574746192423 <nl> - s : 5 . 4898348541472091 <nl> - dkappa : 4 . 7610833972877234e - 05 <nl> + x : 587611 . 92948857276 <nl> + y : 4140985 . 7653229358 <nl> + theta : 1 . 3192736087329671 <nl> + kappa : - 0 . 00027404755287694748 <nl> + s : 5 . 4898387365998422 <nl> + dkappa : - 5 . 9846188545402768e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 49045761575485186 <nl> - a : - 1 . 2773418452865317 <nl> + v : 0 . 49045971692548412 <nl> + a : - 1 . 2773398663714579 <nl> relative_time : 6 . 7999999999999927 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 94318409928 <nl> - y : 4140985 . 8055657214 <nl> - theta : 1 . 3179030351480403 <nl> - kappa : - 0 . 00051411583566210168 <nl> - s : 5 . 5322239731802441 <nl> - dkappa : 4 . 95747309839551e - 05 <nl> + x : 587611 . 94003771408 <nl> + y : 4140985 . 80637865 <nl> + theta : 1 . 3192604680190669 <nl> + kappa : - 0 . 00027394997261693437 <nl> + s : 5 . 5322280760260556 <nl> + dkappa : - 5 . 2959639059890732e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 35457262661270711 <nl> - a : - 1 . 4424784531410895 <nl> + v : 0 . 35457493719566874 <nl> + a : - 1 . 4424762408133673 <nl> relative_time : 6 . 8999999999999924 <nl> } <nl> trajectory_point { <nl> path_point { <nl> - x : 587611 . 95017738594 <nl> - y : 4140985 . 8326303372 <nl> - theta : 1 . 3178875336626348 <nl> - kappa : - 0 . 00051212435342787624 <nl> - s : 5 . 5601774973473139 <nl> - dkappa : 5 . 0869823776943256e - 05 <nl> + x : 587611 . 94699437439 <nl> + y : 4140985 . 833452954 <nl> + theta : 1 . 3192518023390729 <nl> + kappa : - 0 . 00027388562304556254 <nl> + s : 5 . 5601818427248411 <nl> + dkappa : - 4 . 8418285024102183e - 06 <nl> ddkappa : 0 <nl> } <nl> - v : 0 . 20152951174445846 <nl> - a : - 1 . 6205874624609524 <nl> + v : 0 . 20153205599101134 <nl> + a : - 1 . 6205849984092735 <nl> relative_time : 6 . 999999999999992 <nl> } <nl> decision { <nl> mmm a / modules / planning / toolkits / optimizers / road_graph / trajectory_cost . cc <nl> ppp b / modules / planning / toolkits / optimizers / road_graph / trajectory_cost . cc <nl> bool TrajectoryCost : : IsOffRoad ( const double ref_s , const double l , <nl> if ( ref_s - init_sl_point_ . s ( ) < kIgnoreDistance ) { <nl> return false ; <nl> } <nl> - Vec2d position ( 0 . 0 , l ) ; <nl> + Vec2d rear_center ( 0 . 0 , l ) ; <nl> <nl> const auto & param = common : : VehicleConfigHelper : : GetConfig ( ) . vehicle_param ( ) ; <nl> Vec2d vec_to_center ( <nl> ( param . front_edge_to_center ( ) - param . back_edge_to_center ( ) ) / 2 . 0 , <nl> ( param . left_edge_to_center ( ) - param . right_edge_to_center ( ) ) / 2 . 0 ) ; <nl> <nl> - Vec2d center ( position + vec_to_center . rotate ( std : : atan ( dl ) ) ) ; <nl> + Vec2d rear_center_to_center = vec_to_center . rotate ( std : : atan ( dl ) ) ; <nl> + Vec2d center = rear_center + rear_center_to_center ; <nl> + Vec2d front_center = center + rear_center_to_center ; <nl> <nl> const double buffer = 0 . 1 ; / / in meters <nl> - const auto ego_box = Box2d ( center , std : : atan ( dl ) , param . length ( ) + buffer , <nl> - param . width ( ) + buffer ) ; <nl> + const double r_w = <nl> + ( param . left_edge_to_center ( ) + param . right_edge_to_center ( ) ) / 2 . 0 ; <nl> + const double r_l = param . back_edge_to_center ( ) ; <nl> + const double r = std : : sqrt ( r_w * r_w + r_l * r_l ) ; <nl> <nl> double left_width = 0 . 0 ; <nl> double right_width = 0 . 0 ; <nl> reference_line_ - > GetLaneWidth ( ref_s , & left_width , & right_width ) ; <nl> <nl> - for ( const auto & corner : ego_box . GetAllCorners ( ) ) { <nl> - double left_bound = std : : max ( adc_sl_boundary_ . end_l ( ) + buffer , left_width ) ; <nl> - double right_bound = <nl> - std : : min ( adc_sl_boundary_ . start_l ( ) - buffer , - right_width ) ; <nl> - if ( corner . y ( ) > left_bound | | corner . y ( ) < right_bound ) { <nl> - return true ; <nl> - } <nl> + double left_bound = std : : max ( init_sl_point_ . l ( ) + r + buffer , left_width ) ; <nl> + double right_bound = std : : min ( init_sl_point_ . l ( ) - r - buffer , - right_width ) ; <nl> + if ( rear_center . y ( ) + r + buffer / 2 . 0 > left_bound | | <nl> + rear_center . y ( ) - r - buffer / 2 . 0 < right_bound ) { <nl> + return true ; <nl> + } <nl> + if ( front_center . y ( ) + r + buffer / 2 . 0 > left_bound | | <nl> + front_center . y ( ) - r - buffer / 2 . 0 < right_bound ) { <nl> + return true ; <nl> } <nl> + <nl> return false ; <nl> } <nl> <nl> mmm a / modules / planning / toolkits / optimizers / road_graph / waypoint_sampler . cc <nl> ppp b / modules / planning / toolkits / optimizers / road_graph / waypoint_sampler . cc <nl> bool WaypointSampler : : SamplePathWaypoints ( <nl> : config_ . sample_points_num_each_level ( ) ; <nl> <nl> constexpr double kSamplePointLookForwardTime = 4 . 0 ; <nl> - const double step_length = <nl> + const double level_distance = <nl> common : : math : : Clamp ( init_point . v ( ) * kSamplePointLookForwardTime , <nl> config_ . step_length_min ( ) , config_ . step_length_max ( ) ) ; <nl> <nl> - const double level_distance = <nl> - ( init_point . v ( ) > FLAGS_max_stop_speed ) ? step_length : step_length / 2 . 0 ; <nl> double accumulated_s = init_sl_point_ . s ( ) ; <nl> double prev_s = accumulated_s ; <nl> <nl> bool WaypointSampler : : SamplePathWaypoints ( <nl> } <nl> } <nl> <nl> - for ( std : : size_t i = 0 ; accumulated_s < total_length ; + + i ) { <nl> + constexpr size_t kNumLevel = 3 ; <nl> + for ( size_t i = 0 ; i < kNumLevel & & accumulated_s < total_length ; + + i ) { <nl> accumulated_s + = level_distance ; <nl> if ( accumulated_s + level_distance / 2 . 0 > total_length ) { <nl> accumulated_s = total_length ; <nl>
Planning : changed off - road checking and some path params .
ApolloAuto/apollo
4842264e3010d00b514fe1d5dd5d2e0de8b28a19
2018-12-13T23:20:37Z
mmm a / fdbserver / workloads / ConfigureDatabase . actor . cpp <nl> ppp b / fdbserver / workloads / ConfigureDatabase . actor . cpp <nl> <nl> # include " fdbclient / NativeAPI . actor . h " <nl> # include " fdbserver / TesterInterface . actor . h " <nl> # include " fdbclient / ManagementAPI . actor . h " <nl> + # include " fdbclient / RunTransaction . actor . h " <nl> # include " fdbserver / workloads / workloads . actor . h " <nl> # include " fdbrpc / simulator . h " <nl> # include " flow / actorcompiler . h " / / This must be the last # include . <nl> struct ConfigureDatabaseWorkload : TestWorkload { <nl> return Void ( ) ; <nl> } <nl> state int randomChoice = deterministicRandom ( ) - > randomInt ( 0 , 7 ) ; <nl> - if ( randomChoice < 3 ) { <nl> + if ( randomChoice = = 0 ) { <nl> + wait ( success ( <nl> + runRYWTransaction ( cx , [ = ] ( Reference < ReadYourWritesTransaction > tr ) - > Future < Optional < Value > > <nl> + { <nl> + return tr - > get ( LiteralStringRef ( " This read is only to ensure that the database recovered " ) ) ; <nl> + } ) ) ) ; <nl> + wait ( delay ( 20 + 10 * deterministicRandom ( ) - > random01 ( ) ) ) ; <nl> + } <nl> + else if ( randomChoice < 3 ) { <nl> double waitDuration = 3 . 0 * deterministicRandom ( ) - > random01 ( ) ; <nl> / / TraceEvent ( " ConfigureTestWaitAfter " ) . detail ( " WaitDuration " , waitDuration ) ; <nl> wait ( delay ( waitDuration ) ) ; <nl>
Make one case in ConfigureDatabase wait for > 3s .
apple/foundationdb
eec038c605b6c78f822cc15b3b30b9dff7555307
2019-09-26T17:15:33Z
old mode 100644 <nl> new mode 100755 <nl> index d15a864dcbb3 . . 99646c76184c <nl> mmm a / script / release - artifact - cleanup . js <nl> ppp b / script / release - artifact - cleanup . js <nl> <nl> if ( ! process . env . CI ) require ( ' dotenv - safe ' ) . load ( ) <nl> require ( ' colors ' ) <nl> const args = require ( ' minimist ' ) ( process . argv . slice ( 2 ) , { <nl> - boolean : [ ' tag ' ] <nl> + string : [ ' tag ' ] <nl> } ) <nl> const { execSync } = require ( ' child_process ' ) <nl> const { GitProcess } = require ( ' dugite ' ) <nl> github . authenticate ( { <nl> } ) <nl> <nl> function getLastBumpCommit ( tag ) { <nl> - const data = execSync ( ` git log - n1 - - grep " Bump $ { tag } " - - format = " format : { hash : % H , message : ' % s ' } " ` ) <nl> + const data = execSync ( ` git log - n1 - - grep " Bump $ { tag } " - - format = ' format : { " hash " : " % H " , " message " : " % s " } ' ` ) . toString ( ) <nl> return JSON . parse ( data ) <nl> } <nl> <nl> async function deleteTag ( tag , targetRepo ) { <nl> <nl> async function cleanReleaseArtifacts ( ) { <nl> const tag = args . tag <nl> - const lastBumpCommit = getLastBumpCommit ( ) . message <nl> + const isNightly = args . tag . includes ( ' nightly ' ) <nl> <nl> - if ( lastBumpCommit . indexOf ( ' nightly ' > 0 ) ) { <nl> + if ( isNightly ) { <nl> await deleteDraft ( tag , ' nightlies ' ) <nl> await deleteTag ( tag , ' nightlies ' ) <nl> } else { <nl>
fix : make release - artifact - cleanup executable ( )
electron/electron
363712d057b3229880861f13487e1dd7c71d20e0
2018-10-19T03:20:43Z
mmm a / tensorflow / contrib / lite / BUILD <nl> ppp b / tensorflow / contrib / lite / BUILD <nl> cc_library ( <nl> deps = select ( { <nl> " / / tensorflow : android " : [ ] , <nl> " / / conditions : default " : [ <nl> - # " / / file / base : path " , <nl> + " @ com_google_absl / / absl / strings " , <nl> " / / tensorflow / core : test " , <nl> ] , <nl> } ) , <nl> cc_test ( <nl> deps = [ <nl> " : framework " , <nl> " : models_test_utils " , <nl> - # " / / file / base : path " , <nl> " / / tensorflow / contrib / lite / kernels : builtin_ops " , <nl> + " @ com_google_absl / / absl / strings " , <nl> " @ com_google_googletest / / : gtest_main " , <nl> ] , <nl> ) <nl> cc_test ( <nl> deps = [ <nl> " : framework " , <nl> " : models_test_utils " , <nl> - # " / / file / base : path " , <nl> " / / tensorflow / contrib / lite / kernels : builtin_ops " , <nl> " / / tensorflow / contrib / lite / tools : mutable_op_resolver " , <nl> + " @ com_google_absl / / absl / strings " , <nl> " @ com_google_googletest / / : gtest_main " , <nl> ] , <nl> ) <nl> cc_test ( <nl> deps = [ <nl> " : framework " , <nl> " : models_test_utils " , <nl> - # " / / file / base : path " , <nl> " / / tensorflow / contrib / lite / kernels : builtin_ops " , <nl> + " @ com_google_absl / / absl / strings " , <nl> " @ com_google_googletest / / : gtest_main " , <nl> ] , <nl> ) <nl> mmm a / tensorflow / contrib / lite / models / speech_hotword_model_test . cc <nl> ppp b / tensorflow / contrib / lite / models / speech_hotword_model_test . cc <nl> limitations under the License . <nl> # include < string > <nl> <nl> # include " base / logging . h " <nl> - # include " file / base / path . h " <nl> # include " testing / base / public / googletest . h " <nl> # include < gtest / gtest . h > <nl> + # include " absl / strings / str_cat . h " <nl> # include " tensorflow / contrib / lite / context . h " <nl> # include " tensorflow / contrib / lite / interpreter . h " <nl> # include " tensorflow / contrib / lite / kernels / register . h " <nl> void RunTest ( int model_input_tensor , int svdf_layer_state_tensor , <nl> int model_output_tensor , const string & model_name , <nl> const string & golden_in_name , const string & golden_out_name ) { <nl> / / Read the model . <nl> - string tflite_file_path = file : : JoinPath ( TestDataPath ( ) , model_name ) ; <nl> + string tflite_file_path = StrCat ( TestDataPath ( ) , " / " , model_name ) ; <nl> auto model = FlatBufferModel : : BuildFromFile ( tflite_file_path . c_str ( ) ) ; <nl> CHECK ( model ) < < " Failed to read model from file " < < tflite_file_path ; <nl> <nl> void RunTest ( int model_input_tensor , int svdf_layer_state_tensor , <nl> <nl> / / Load the input frames . <nl> Frames input_frames ; <nl> - const string input_file_path = file : : JoinPath ( TestDataPath ( ) , golden_in_name ) ; <nl> + const string input_file_path = StrCat ( TestDataPath ( ) , " / " , golden_in_name ) ; <nl> ReadFrames ( input_file_path , & input_frames ) ; <nl> <nl> / / Load the golden output results . <nl> Frames output_frames ; <nl> - const string output_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , golden_out_name ) ; <nl> + const string output_file_path = StrCat ( TestDataPath ( ) , " / " , golden_out_name ) ; <nl> ReadFrames ( output_file_path , & output_frames ) ; <nl> <nl> const int speech_batch_size = <nl> mmm a / tensorflow / contrib / lite / models / speech_speakerid_model_test . cc <nl> ppp b / tensorflow / contrib / lite / models / speech_speakerid_model_test . cc <nl> limitations under the License . <nl> # include < string > <nl> <nl> # include " base / logging . h " <nl> - # include " file / base / path . h " <nl> # include " testing / base / public / googletest . h " <nl> # include < gtest / gtest . h > <nl> + # include " absl / strings / str_cat . h " <nl> # include " tensorflow / contrib / lite / context . h " <nl> # include " tensorflow / contrib / lite / interpreter . h " <nl> # include " tensorflow / contrib / lite / model . h " <nl> constexpr int kModelOutputTensor = 66 ; <nl> TEST ( SpeechSpeakerId , OkGoogleTest ) { <nl> / / Read the model . <nl> string tflite_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_speakerid_model . tflite " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_speakerid_model . tflite " ) ; <nl> auto model = FlatBufferModel : : BuildFromFile ( tflite_file_path . c_str ( ) ) ; <nl> CHECK ( model ) < < " Failed to read model from file " < < tflite_file_path ; <nl> <nl> TEST ( SpeechSpeakerId , OkGoogleTest ) { <nl> / / Load the input frames . <nl> Frames input_frames ; <nl> const string input_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_speakerid_model_in . csv " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_speakerid_model_in . csv " ) ; <nl> ReadFrames ( input_file_path , & input_frames ) ; <nl> <nl> / / Load the golden output results . <nl> Frames output_frames ; <nl> const string output_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_speakerid_model_out . csv " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_speakerid_model_out . csv " ) ; <nl> ReadFrames ( output_file_path , & output_frames ) ; <nl> <nl> const int speech_batch_size = <nl> mmm a / tensorflow / contrib / lite / models / speech_tts_model_test . cc <nl> ppp b / tensorflow / contrib / lite / models / speech_tts_model_test . cc <nl> limitations under the License . <nl> # include < string > <nl> <nl> # include " base / logging . h " <nl> - # include " file / base / path . h " <nl> # include " testing / base / public / googletest . h " <nl> # include < gtest / gtest . h > <nl> + # include " absl / strings / str_cat . h " <nl> # include " tensorflow / contrib / lite / context . h " <nl> # include " tensorflow / contrib / lite / interpreter . h " <nl> # include " tensorflow / contrib / lite / kernels / register . h " <nl> constexpr int kModelOutputTensor = 74 ; <nl> TEST ( SpeechTTS , RandomIOTest ) { <nl> / / Read the model . <nl> string tflite_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_tts_model . tflite " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_tts_model . tflite " ) ; <nl> auto model = FlatBufferModel : : BuildFromFile ( tflite_file_path . c_str ( ) ) ; <nl> CHECK ( model ) < < " Failed to mmap model " < < tflite_file_path ; <nl> <nl> TEST ( SpeechTTS , RandomIOTest ) { <nl> / / Load the input frames . <nl> Frames input_frames ; <nl> const string input_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_tts_model_in . csv " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_tts_model_in . csv " ) ; <nl> ReadFrames ( input_file_path , & input_frames ) ; <nl> <nl> / / Load the golden output results . <nl> Frames output_frames ; <nl> const string output_file_path = <nl> - file : : JoinPath ( TestDataPath ( ) , " speech_tts_model_out . csv " ) ; <nl> + StrCat ( TestDataPath ( ) , " / " , " speech_tts_model_out . csv " ) ; <nl> ReadFrames ( output_file_path , & output_frames ) ; <nl> <nl> const int speech_batch_size = <nl> mmm a / tensorflow / contrib / lite / models / test_utils . h <nl> ppp b / tensorflow / contrib / lite / models / test_utils . h <nl> using Frames = std : : vector < std : : vector < float > > ; <nl> } / / namespace tflite <nl> <nl> # ifndef __ANDROID__ <nl> - # include " file / base / path . h " <nl> + # include " absl / strings / str_cat . h " <nl> # include " tensorflow / core / platform / test . h " <nl> <nl> inline string TestDataPath ( ) { <nl> - return string ( file : : JoinPath ( tensorflow : : testing : : TensorFlowSrcRoot ( ) , <nl> - " contrib / lite / models / testdata / " ) ) ; <nl> + return string ( StrCat ( tensorflow : : testing : : TensorFlowSrcRoot ( ) , " / " , <nl> + " contrib / lite / models / testdata / " ) ) ; <nl> } <nl> inline int TestInputSize ( const tflite : : models : : Frames & input_frames ) { <nl> return input_frames . size ( ) ; <nl>
Remove dep to file / base : path
tensorflow/tensorflow
973987fbe2d9448e15f6efa613aae090703457e0
2017-11-11T03:20:45Z
mmm a / src / symbol / static_graph . cc <nl> ppp b / src / symbol / static_graph . cc <nl> void StaticGraph : : MakeBackwardPass ( std : : vector < uint32_t > * head_grad_nodes , <nl> <nl> auto need_mirror = [ this , do_mirror , pcounter , mirror_step ] ( uint32_t nid ) { <nl> if ( nodes [ nid ] . is_variable ( ) ) return false ; <nl> + if ( type = = " Dropout " ) return false ; <nl> if ( nodes [ nid ] . get_attr ( " force_mirroring " , false ) ) return true ; <nl> if ( do_mirror = = 0 ) return false ; <nl> if ( ! nodes [ nid ] . is_forward ( ) ) return false ; <nl> std : : string type = nodes [ nid ] . op - > TypeString ( ) ; <nl> if ( type = = " Convolution " ) return false ; <nl> if ( type = = " FullyConnected " ) return false ; <nl> - if ( type = = " Dropout " ) return false ; <nl> if ( type = = " Concat " ) return false ; <nl> if ( type = = " SoftmaxOutput " ) return false ; <nl> if ( type = = " CuDNNBatchNorm " ) return false ; <nl>
Update static_graph . cc
apache/incubator-mxnet
bafe679a86cd04129dc01ccbdd8e0ed84159140b
2016-04-21T23:30:37Z
mmm a / lib / Serialization / Serialization . cpp <nl> ppp b / lib / Serialization / Serialization . cpp <nl> void swift : : serialize ( const TranslationUnit * TU , const char * outputPath , <nl> return ; <nl> } <nl> <nl> - Serializer S ; <nl> - S . writeToStream ( out , TU , inputFiles ) ; <nl> + serializeToStream ( TU , out , inputFiles ) ; <nl> } <nl> <nl> void swift : : serializeToStream ( const TranslationUnit * TU , raw_ostream & out , <nl>
[ serialization ] Have swift : : serialize forward to swift : : serializeToStream .
apple/swift
148ccdbd825f02d9e8f08bbff5e4e7b2b5b3fa40
2013-08-21T20:20:51Z
mmm a / macxconf . pri <nl> ppp b / macxconf . pri <nl> exists ( $ $ OUT_PWD / . . / conf . pri ) { <nl> } <nl> <nl> LIBS + = - framework Carbon - framework IOKit <nl> + CONFIG + = c + + 11 <nl> <nl> document_icon . path = Contents / Resources <nl> document_icon . files = mac / qBitTorrentDocument . icns <nl> qt_conf . path = Contents / Resources <nl> qt_conf . files = mac / qt . conf <nl> QMAKE_BUNDLE_DATA + = qt_conf <nl> <nl> - qt_translations . path = Contents / MacOS / translations <nl> + qt_translations . path = Contents / translations <nl> qt_translations . files = qt - translations / qt_ar . qm \ <nl> qt - translations / qt_bg . qm \ <nl> qt - translations / qt_ca . qm \ <nl> mmm a / src / about_imp . h <nl> ppp b / src / about_imp . h <nl> class about : public QDialog , private Ui : : AboutDlg { <nl> / / Set icons <nl> logo - > setPixmap ( QPixmap ( QString : : fromUtf8 ( " : / Icons / skin / qbittorrent22 . png " ) ) ) ; <nl> / / Title <nl> - lb_name - > setText ( QString : : fromUtf8 ( " < b > < h1 > qBittorrent " ) + QString : : fromUtf8 ( " " VERSION " < / h1 > < / b > " ) ) ; <nl> + lb_name - > setText ( QString : : fromUtf8 ( " < b > < h1 > qBittorrent " ) + QString : : fromUtf8 ( " " VERSION " < / h1 > < / b > " ) ) ; <nl> / / Thanks <nl> QString thanks_txt ; <nl> thanks_txt + = QString : : fromUtf8 ( " < p > I would first like to thank sourceforge . net for hosting qBittorrent project and for their support . < / p > " ) ; <nl> mmm a / src / dnsupdater . cpp <nl> ppp b / src / dnsupdater . cpp <nl> void DNSUpdater : : checkPublicIP ( ) <nl> m_lastIPCheckTime = QDateTime : : currentDateTime ( ) ; <nl> QNetworkRequest request ; <nl> request . setUrl ( QUrl ( " http : / / checkip . dyndns . org " ) ) ; <nl> - request . setRawHeader ( " User - Agent " , " qBittorrent / " VERSION " chris @ qbittorrent . org " ) ; <nl> + request . setRawHeader ( " User - Agent " , " qBittorrent / " VERSION " chris @ qbittorrent . org " ) ; <nl> manager - > get ( request ) ; <nl> } <nl> <nl> void DNSUpdater : : updateDNSService ( ) <nl> m_lastIPCheckTime = QDateTime : : currentDateTime ( ) ; <nl> QNetworkRequest request ; <nl> request . setUrl ( getUpdateUrl ( ) ) ; <nl> - request . setRawHeader ( " User - Agent " , " qBittorrent / " VERSION " chris @ qbittorrent . org " ) ; <nl> + request . setRawHeader ( " User - Agent " , " qBittorrent / " VERSION " chris @ qbittorrent . org " ) ; <nl> manager - > get ( request ) ; <nl> } <nl> <nl> mmm a / src / mac / qt . conf <nl> ppp b / src / mac / qt . conf <nl> <nl> [ Paths ] <nl> - Prefix = MacOS <nl> Translations = translations <nl> Plugins = PlugIns <nl> mmm a / src / qtlibtorrent / qbtsession . cpp <nl> ppp b / src / qtlibtorrent / qbtsession . cpp <nl> void QBtSession : : configureSession ( ) { <nl> } <nl> / / * Session settings <nl> session_settings sessionSettings = s - > settings ( ) ; <nl> - sessionSettings . user_agent = " qBittorrent " VERSION ; <nl> + sessionSettings . user_agent = " qBittorrent " VERSION ; <nl> / / std : : cout < < " HTTP user agent is " < < sessionSettings . user_agent < < std : : endl ; <nl> logger - > addMessage ( tr ( " HTTP user agent is % 1 " ) . arg ( misc : : toQString ( sessionSettings . user_agent ) ) ) ; <nl> <nl> mmm a / src / torrentcreator / torrentcreatorthread . cpp <nl> ppp b / src / torrentcreator / torrentcreatorthread . cpp <nl> void TorrentCreatorThread : : sendProgressSignal ( int progress ) { <nl> <nl> void TorrentCreatorThread : : run ( ) { <nl> emit updateProgress ( 0 ) ; <nl> - QString creator_str ( " qBittorrent " VERSION ) ; <nl> + QString creator_str ( " qBittorrent " VERSION ) ; <nl> try { <nl> file_storage fs ; <nl> / / Adding files to the torrent <nl>
Merge pull request from Noctem / stdlib - flags
qbittorrent/qBittorrent
d0b476a4be9c458643127b68df9923ca63afe799
2015-02-01T22:21:02Z
mmm a / doc / parameter . md <nl> ppp b / doc / parameter . md <nl> Parameters for Tree Booster <nl> - Usuaully user do not have to tune this . <nl> but consider set to lower number for more accurate enumeration . <nl> - range : ( 0 , 1 ) <nl> + * scale_pos_weight , [ default = 0 ] <nl> + - Control the balance of positive and negative weights , useful for unbalanced classes . A typical value to consider : sum ( negative cases ) / sum ( positive cases ) See [ Parameters Tuning ] ( param_tuning . md ) for more discussion . Also see Higgs Kaggle competition demo for examples : [ R ] ( . . / demo / kaggle - higgs / higgs - train . R ) , [ py1 ] ( . . / demo / kaggle - higgs / higgs - numpy . py ) , [ py2 ] ( . . / demo / kaggle - higgs / higgs - cv . py ) , [ py3 ] ( . . / demo / guide - python / cross_validation . py ) <nl> <nl> Parameters for Linear Booster <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl>
Merge pull request from geneorama / geneorama - patch - 1
dmlc/xgboost
9c26566eb09733423f821f139938ff4105c3775d
2016-05-11T22:06:21Z
mmm a / tensorflow / examples / tutorials / mnist / BUILD <nl> ppp b / tensorflow / examples / tutorials / mnist / BUILD <nl> py_binary ( <nl> ] , <nl> ) <nl> <nl> + py_binary ( <nl> + name = " mnist_deep " , <nl> + srcs = [ <nl> + " mnist_deep . py " , <nl> + ] , <nl> + srcs_version = " PY2AND3 " , <nl> + deps = [ <nl> + " : input_data " , <nl> + " / / tensorflow : tensorflow_py " , <nl> + ] , <nl> + ) <nl> + <nl> py_test ( <nl> name = " fully_connected_feed_test " , <nl> size = " small " , <nl>
Add missing py_binary for mnist_deep . py
tensorflow/tensorflow
c215c55d5424fba9e0d10aeea0c1b81c44b10334
2017-07-31T20:20:09Z
mmm a / tensorflow / python / data / ops / dataset_ops . py <nl> ppp b / tensorflow / python / data / ops / dataset_ops . py <nl> def filter ( self , predicate ) : <nl> " " " Filters this dataset according to ` predicate ` . <nl> <nl> ` ` ` python <nl> - # NOTE : The following examples use ` { . . . } ` to represent the <nl> - # contents of a dataset . <nl> - a = { 1 , 2 , 3 } <nl> - b = { 4 , 5 , 6 , 7 } <nl> - <nl> - a . filter ( lambda x : x < 3 ) = = { 1 , 2 } <nl> + d = tf . data . Dataset . from_tensor_slices ( [ 1 , 2 , 3 ] ) <nl> + <nl> + d = d . filter ( lambda x : x < 3 ) # [ 1 , 2 ] <nl> <nl> # ` tf . math . equal ( x , y ) ` is required for equality comparison <nl> def filter_fn ( x ) : <nl> - return tf . math . equal ( x , 4 ) <nl> + return tf . math . equal ( x , 1 ) <nl> <nl> - b . filter ( filter_fn ) = = { 4 } <nl> + d = d . filter ( filter_fn ) # [ 1 ] <nl> ` ` ` <nl> <nl> Args : <nl>
Changed tensor pseudo - code so that the example is runnable
tensorflow/tensorflow
131270d780a85ccb97e1f7c6e1c92dcee176bc28
2019-02-02T01:57:33Z
mmm a / Telegram / SourceFiles / window / window_main_menu . cpp <nl> ppp b / Telegram / SourceFiles / window / window_main_menu . cpp <nl> void MainMenu : : initResetScaleButton ( ) { <nl> handle - > screen ( ) <nl> ) | rpl : : then ( <nl> Core : : QtSignalProducer ( handle , & QWindow : : screenChanged ) <nl> - ) | rpl : : map ( [ ] ( QScreen * screen ) { <nl> + ) | rpl : : filter ( [ ] ( QScreen * screen ) { <nl> + return screen ! = nullptr ; <nl> + } ) | rpl : : map ( [ ] ( QScreen * screen ) { <nl> return rpl : : single ( <nl> screen - > availableGeometry ( ) <nl> ) | rpl : : then ( <nl>
Fix possible crash with nullptr screen .
telegramdesktop/tdesktop
12614ab68c9be7d95b6e67a324a808b09b4a557f
2019-04-12T13:30:43Z
mmm a / hphp / runtime / server / admin - request - handler . cpp <nl> ppp b / hphp / runtime / server / admin - request - handler . cpp <nl> typedef std : : map < int , PCInfo > InfoMap ; <nl> bool AdminRequestHandler : : handleVMRequest ( const std : : string & cmd , <nl> Transport * transport ) { <nl> if ( cmd = = " vm - tcspace " ) { <nl> - transport - > sendString ( jit : : mcg - > getUsage ( ) ) ; <nl> + transport - > sendString ( jit : : mcg - > getUsageString ( ) ) ; <nl> return true ; <nl> } <nl> if ( cmd = = " vm - tcaddr " ) { <nl> mmm a / hphp / runtime / server / memory - stats . cpp <nl> ppp b / hphp / runtime / server / memory - stats . cpp <nl> <nl> # include < string > <nl> # include < sstream > <nl> # include < fstream > <nl> + # include < algorithm > <nl> <nl> # include " hphp / runtime / base / static - string - table . h " <nl> + # include " hphp / runtime / vm / jit / mc - generator . h " <nl> <nl> namespace HPHP { <nl> <nl> + MemoryStats g_memoryStats ; <nl> + <nl> void MemoryStats : : ReportMemory ( std : : string & output , Writer : : Format format ) { <nl> std : : ostringstream out ; <nl> Writer * w ; <nl> namespace HPHP { <nl> size_t totalBytes = GetStaticStringSize ( ) ; <nl> totalBytes + = procStatM . m_text ; <nl> <nl> - w - > beginObject ( " Memory " ) ; <nl> + w - > beginObject ( " Memory " ) ; <nl> <nl> / / process memory statistics <nl> w - > beginObject ( " Process Stats ( bytes ) " ) ; <nl> namespace HPHP { <nl> / / static string stats <nl> w - > beginObject ( " Static Strings " ) ; <nl> w - > writeEntry ( " Bytes " , GetStaticStringSize ( ) ) ; <nl> + w - > beginObject ( " Details " ) ; <nl> w - > writeEntry ( " Count " , makeStaticStringCount ( ) ) ; <nl> + w - > endObject ( " Details " ) ; <nl> w - > endObject ( " Static Strings " ) ; <nl> <nl> / / code segment stats <nl> w - > beginObject ( " Code " ) ; <nl> + w - > beginObject ( " Details " ) ; <nl> w - > writeEntry ( " Bytes " , procStatM . m_text ) ; <nl> + w - > endObject ( " Details " ) ; <nl> w - > endObject ( " Code " ) ; <nl> <nl> + / / TC / Jit <nl> + w - > beginObject ( " TC / Jit " ) ; <nl> + { <nl> + size_t globalTCUsed = 0 ; <nl> + size_t globalTCSize = 0 ; <nl> + <nl> + auto processUsageInfo = [ & ] ( jit : : UsageInfo blockUsageInfo ) { <nl> + if ( blockUsageInfo . m_global ) { <nl> + globalTCSize + = blockUsageInfo . m_capacity ; <nl> + globalTCUsed + = blockUsageInfo . m_used ; <nl> + w - > beginObject ( blockUsageInfo . m_name . c_str ( ) ) ; <nl> + w - > writeEntry ( " Used " , blockUsageInfo . m_used ) ; <nl> + w - > writeEntry ( " Capacity " , blockUsageInfo . m_capacity ) ; <nl> + w - > endObject ( blockUsageInfo . m_name . c_str ( ) ) ; <nl> + } <nl> + } ; <nl> + auto usageInfo = jit : : mcg - > getUsageInfo ( ) ; <nl> + w - > beginObject ( " Details " ) ; <nl> + for_each ( usageInfo . begin ( ) , usageInfo . end ( ) , processUsageInfo ) ; <nl> + w - > writeEntry ( " Total Used " , globalTCUsed ) ; <nl> + w - > writeEntry ( " Total Capacity " , globalTCSize ) ; <nl> + w - > endObject ( " Details " ) ; <nl> + w - > writeEntry ( " Bytes " , globalTCSize ) ; <nl> + totalBytes + = globalTCSize ; <nl> + } <nl> + w - > endObject ( " TC / Jit " ) ; <nl> + <nl> / / currently unknown portion of vmSize <nl> w - > writeEntry ( " Unknown " , procStatM . m_vmSize - totalBytes ) ; <nl> <nl> namespace HPHP { <nl> } <nl> <nl> MemoryStats * MemoryStats : : GetInstance ( ) { <nl> - static MemoryStats memoryStatsInstance ; <nl> - return & memoryStatsInstance ; <nl> + return & g_memoryStats ; <nl> } <nl> <nl> void MemoryStats : : ResetStaticStringSize ( ) { <nl> mmm a / hphp / runtime / server / memory - stats . h <nl> ppp b / hphp / runtime / server / memory - stats . h <nl> <nl> # include < memory > <nl> <nl> # include " hphp / runtime / server / writer . h " <nl> + <nl> namespace HPHP { <nl> <nl> class MemoryStats { <nl> class MemoryStats { <nl> static MemoryStats * GetInstance ( ) ; <nl> void ResetStaticStringSize ( ) ; <nl> void LogStaticStringAlloc ( size_t bytes ) ; <nl> + MemoryStats ( ) { } <nl> <nl> private : <nl> - MemoryStats ( ) { } <nl> size_t GetStaticStringSize ( ) ; <nl> bool FillProcessStatM ( StatM * pStatM ) ; <nl> std : : atomic < size_t > m_staticStringSize ; <nl> mmm a / hphp / runtime / vm / jit / mc - generator . cpp <nl> ppp b / hphp / runtime / vm / jit / mc - generator . cpp <nl> MCGenerator : : translateWork ( const TranslArgs & args ) { <nl> <nl> TRACE ( 1 , " mcg : % zd - byte tracelet \ n " , code . main ( ) . frontier ( ) - start ) ; <nl> if ( Trace : : moduleEnabledRelease ( Trace : : tcspace , 1 ) ) { <nl> - Trace : : traceRelease ( " % s " , getUsage ( ) . c_str ( ) ) ; <nl> + Trace : : traceRelease ( " % s " , getUsageString ( ) . c_str ( ) ) ; <nl> } <nl> } <nl> <nl> void MCGenerator : : recordGdbStub ( const CodeBlock & cb , <nl> } <nl> } <nl> <nl> - std : : string MCGenerator : : getUsage ( ) { <nl> + std : : vector < UsageInfo > MCGenerator : : getUsageInfo ( ) { <nl> + std : : vector < UsageInfo > tcUsageInfo ; <nl> + code . forEachBlock ( [ & ] ( const char * name , const CodeBlock & a ) { <nl> + tcUsageInfo . emplace_back ( UsageInfo { std : : string ( " code . " ) + name , <nl> + a . used ( ) , <nl> + a . capacity ( ) , <nl> + true } ) ; <nl> + } ) ; <nl> + / / Report code . stubs usage = code . cold + code . frozen usage , so <nl> + / / ODS doesn ' t break . <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + std : : string ( " code . stubs " ) , <nl> + code . realCold ( ) . used ( ) + code . realFrozen ( ) . used ( ) , <nl> + code . realCold ( ) . capacity ( ) + code . realFrozen ( ) . capacity ( ) , <nl> + false } ) ; <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + " data " , <nl> + code . data ( ) . used ( ) , <nl> + code . data ( ) . capacity ( ) , <nl> + true } ) ; <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + " RDS " , <nl> + RDS : : usedBytes ( ) , <nl> + RuntimeOption : : EvalJitTargetCacheSize * 3 / 4 , <nl> + false } ) ; <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + " RDSLocal " , <nl> + RDS : : usedLocalBytes ( ) , <nl> + RuntimeOption : : EvalJitTargetCacheSize * 3 / 4 , <nl> + false } ) ; <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + " persistentRDS " , <nl> + RDS : : usedPersistentBytes ( ) , <nl> + RuntimeOption : : EvalJitTargetCacheSize / 4 , <nl> + false } ) ; <nl> + tcUsageInfo . emplace_back ( UsageInfo { <nl> + " cloned - closuers " , <nl> + Func : : s_totalClonedClosures , <nl> + RuntimeOption : : EvalMaxClonedClosures } ) ; <nl> + return tcUsageInfo ; <nl> + } <nl> + <nl> + std : : string MCGenerator : : getUsageString ( ) { <nl> std : : string usage ; <nl> size_t totalBlockSize = 0 ; <nl> size_t totalBlockCapacity = 0 ; <nl> - <nl> - auto addRow = [ & ] ( const std : : string & name , size_t used , size_t capacity ) { <nl> - auto percent = capacity ? 100 * used / capacity : 0 ; <nl> + auto addRow = [ & ] ( UsageInfo blockUsageInfo ) { <nl> + auto percent = blockUsageInfo . m_capacity ? <nl> + 100 * blockUsageInfo . m_used / blockUsageInfo . m_capacity : 0 ; <nl> usage + = folly : : format ( " mcg : { : 9 } bytes ( { } % ) in { } \ n " , <nl> - used , percent , name ) . str ( ) ; <nl> + blockUsageInfo . m_used , <nl> + percent , <nl> + blockUsageInfo . m_name ) . str ( ) ; <nl> + if ( blockUsageInfo . m_global ) { <nl> + totalBlockSize + = blockUsageInfo . m_used ; <nl> + totalBlockCapacity + = blockUsageInfo . m_capacity ; <nl> + } <nl> } ; <nl> - code . forEachBlock ( [ & ] ( const char * name , const CodeBlock & a ) { <nl> - addRow ( std : : string ( " code . " ) + name , a . used ( ) , a . capacity ( ) ) ; <nl> - totalBlockSize + = a . used ( ) ; <nl> - totalBlockCapacity + = a . capacity ( ) ; <nl> - } ) ; <nl> - / / Report code . stubs usage = code . cold + code . frozen usage , so <nl> - / / ODS doesn ' t break . <nl> - auto const stubsUsed = code . realCold ( ) . used ( ) + code . realFrozen ( ) . used ( ) ; <nl> - auto const stubsCapacity = code . realCold ( ) . capacity ( ) + <nl> - code . realFrozen ( ) . capacity ( ) ; <nl> - addRow ( std : : string ( " code . stubs " ) , stubsUsed , stubsCapacity ) ; <nl> - addRow ( " data " , code . data ( ) . used ( ) , code . data ( ) . capacity ( ) ) ; <nl> - addRow ( " RDS " , RDS : : usedBytes ( ) , <nl> - RuntimeOption : : EvalJitTargetCacheSize * 3 / 4 ) ; <nl> - addRow ( " RDSLocal " , RDS : : usedLocalBytes ( ) , <nl> - RuntimeOption : : EvalJitTargetCacheSize * 3 / 4 ) ; <nl> - addRow ( " persistentRDS " , RDS : : usedPersistentBytes ( ) , <nl> - RuntimeOption : : EvalJitTargetCacheSize / 4 ) ; <nl> - addRow ( " cloned - closures " , Func : : s_totalClonedClosures , <nl> - RuntimeOption : : EvalMaxClonedClosures ) ; <nl> - addRow ( " total " , <nl> - totalBlockSize + code . data ( ) . used ( ) <nl> - + RDS : : usedPersistentBytes ( ) , <nl> - totalBlockCapacity + code . data ( ) . capacity ( ) <nl> - + ( RuntimeOption : : EvalJitTargetCacheSize / 4 ) ) ; <nl> - <nl> + auto tcUsageInfo = getUsageInfo ( ) ; <nl> + for_each ( tcUsageInfo . begin ( ) , tcUsageInfo . end ( ) , addRow ) ; <nl> + addRow ( UsageInfo { " total " , totalBlockSize , totalBlockCapacity , false } ) ; <nl> return usage ; <nl> } <nl> <nl> mmm a / hphp / runtime / vm / jit / mc - generator . h <nl> ppp b / hphp / runtime / vm / jit / mc - generator . h <nl> struct RelocationInfo { <nl> std : : set < TCA > m_addressImmediates ; <nl> } ; <nl> <nl> + struct UsageInfo { <nl> + std : : string m_name ; <nl> + size_t m_used ; <nl> + size_t m_capacity ; <nl> + bool m_global ; <nl> + } ; <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> / * <nl> struct MCGenerator : private boost : : noncopyable { <nl> / * <nl> * Return cache usage information as a string <nl> * / <nl> - std : : string getUsage ( ) ; <nl> + std : : string getUsageString ( ) ; <nl> std : : string getTCAddrs ( ) ; <nl> + std : : vector < UsageInfo > getUsageInfo ( ) ; <nl> <nl> / * <nl> * Returns the total size of the TC now and at the beginning of this request , <nl>
refactor tc usage report and add tc usage stats to memory page
facebook/hhvm
a75fb95e62a7fddff6875da0899d22693a72413d
2014-09-09T03:30:26Z
mmm a / doc / build . py <nl> ppp b / doc / build . py <nl> def build_docs ( ) : <nl> pip_install ( ' michaeljones / breathe ' , <nl> ' 511b0887293e7c6b12310bb61b3659068f48f0f4 ' ) <nl> print ( check_output ( [ ' pip ' , ' - - version ' ] ) ) <nl> + print ( check_output ( [ ' pip ' , ' show ' , ' alabaster ' ] ) ) <nl> print ( check_output ( [ ' sphinx - build ' , ' - - version ' ] ) ) <nl> print ( ' PATH : ' , os . environ [ ' PATH ' ] ) <nl> print ( check_output ( [ ' which ' , ' sphinx - build ' ] ) ) <nl>
Print alabaster version
fmtlib/fmt
ee1fdc575b136c279e53a6fb3da192f987b46509
2015-10-16T14:18:04Z
mmm a / torch / nn / quantized / modules / linear . py <nl> ppp b / torch / nn / quantized / modules / linear . py <nl> def __init__ ( self , out_scale , out_zero_point , out_dtype ) : <nl> self . out_dtype = out_dtype <nl> <nl> def forward ( self , X ) : <nl> - return torch . quantize_linear ( X , self . out_scale . item ( ) , \ <nl> - self . out_zero_point . item ( ) , self . out_dtype ) <nl> + return torch . quantize_linear ( X , self . out_scale . item ( ) , <nl> + self . out_zero_point . item ( ) , self . out_dtype ) <nl> <nl> @ staticmethod <nl> def from_float ( mod ) : <nl>
fix lint in torch / nn / quantized / modules / linear . py ( )
pytorch/pytorch
08044527093bf056d65af16c87223486f4cd8a21
2019-06-28T06:18:42Z
mmm a / editor / plugins / visual_shader_editor_plugin . cpp <nl> ppp b / editor / plugins / visual_shader_editor_plugin . cpp <nl> <nl> # include " visual_shader_editor_plugin . h " <nl> <nl> # include " core / io / resource_loader . h " <nl> + # include " core / math / math_defs . h " <nl> # include " core / os / input . h " <nl> # include " core / os / keyboard . h " <nl> # include " core / project_settings . h " <nl> void VisualShaderEditor : : _add_node ( int p_idx , int p_op_idx ) { <nl> VisualShaderNode * vsn = Object : : cast_to < VisualShaderNode > ( ClassDB : : instance ( add_options [ p_idx ] . type ) ) ; <nl> ERR_FAIL_COND ( ! vsn ) ; <nl> <nl> + VisualShaderNodeScalarConstant * constant = Object : : cast_to < VisualShaderNodeScalarConstant > ( vsn ) ; <nl> + <nl> + if ( constant ) { <nl> + if ( ( int ) add_options [ p_idx ] . value ! = - 1 ) <nl> + constant - > set_constant ( add_options [ p_idx ] . value ) ; <nl> + } <nl> + <nl> if ( p_op_idx ! = - 1 ) { <nl> <nl> VisualShaderNodeInput * input = Object : : cast_to < VisualShaderNodeInput > ( vsn ) ; <nl> VisualShaderEditor : : VisualShaderEditor ( ) { <nl> add_options . push_back ( AddOption ( " ColorUniform " , " Color " , " Variables " , " VisualShaderNodeColorUniform " , TTR ( " Color uniform . " ) , - 1 , VisualShaderNode : : PORT_TYPE_COLOR ) ) ; <nl> <nl> / / BOOLEAN <nl> + <nl> add_options . push_back ( AddOption ( " If " , " Conditional " , " Functions " , " VisualShaderNodeIf " , TTR ( " Returns an associated vector if the provided scalars are equal , greater or less . " ) , - 1 , VisualShaderNode : : PORT_TYPE_VECTOR ) ) ; <nl> add_options . push_back ( AddOption ( " Switch " , " Conditional " , " Functions " , " VisualShaderNodeSwitch " , TTR ( " Returns an associated vector if the provided boolean value is true or false . " ) , - 1 , VisualShaderNode : : PORT_TYPE_VECTOR ) ) ; <nl> add_options . push_back ( AddOption ( " BooleanConstant " , " Conditional " , " Variables " , " VisualShaderNodeBooleanConstant " , TTR ( " Boolean constant . " ) , - 1 , VisualShaderNode : : PORT_TYPE_BOOLEAN ) ) ; <nl> VisualShaderEditor : : VisualShaderEditor ( ) { <nl> add_options . push_back ( AddOption ( " ScalarFunc " , " Scalar " , " Common " , " VisualShaderNodeScalarFunc " , TTR ( " Scalar function . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR ) ) ; <nl> add_options . push_back ( AddOption ( " ScalarOp " , " Scalar " , " Common " , " VisualShaderNodeScalarOp " , TTR ( " Scalar operator . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR ) ) ; <nl> <nl> + / / CONSTANTS <nl> + <nl> + add_options . push_back ( AddOption ( " E " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " E constant ( 2 . 718282 ) . Represents the base of the natural logarithm . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_E ) ) ; <nl> + add_options . push_back ( AddOption ( " Epsilon " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Epsilon constant ( 0 . 00001 ) . Smallest possible scalar number . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , CMP_EPSILON ) ) ; <nl> + add_options . push_back ( AddOption ( " Phi " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Phi constant ( 1 . 618034 ) . Golden ratio . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , 1 . 618034f ) ) ; <nl> + add_options . push_back ( AddOption ( " Pi / 4 " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Pi / 4 constant ( 0 . 785398 ) or 45 degrees . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_PI / 4 ) ) ; <nl> + add_options . push_back ( AddOption ( " Pi / 2 " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Pi / 2 constant ( 1 . 570796 ) or 90 degrees . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_PI / 2 ) ) ; <nl> + add_options . push_back ( AddOption ( " Pi " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Pi constant ( 3 . 141593 ) or 180 degrees . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_PI ) ) ; <nl> + add_options . push_back ( AddOption ( " Tau " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Tau constant ( 6 . 283185 ) or 360 degrees . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_TAU ) ) ; <nl> + add_options . push_back ( AddOption ( " Sqrt2 " , " Scalar " , " Constants " , " VisualShaderNodeScalarConstant " , TTR ( " Sqrt2 constant ( 1 . 414214 ) . Square root of 2 . " ) , - 1 , VisualShaderNode : : PORT_TYPE_SCALAR , - 1 , - 1 , Math_SQRT2 ) ) ; <nl> + <nl> + / / FUNCTIONS <nl> + <nl> add_options . push_back ( AddOption ( " Abs " , " Scalar " , " Functions " , " VisualShaderNodeScalarFunc " , TTR ( " Returns the absolute value of the parameter . " ) , VisualShaderNodeScalarFunc : : FUNC_ABS , VisualShaderNode : : PORT_TYPE_SCALAR ) ) ; <nl> add_options . push_back ( AddOption ( " ACos " , " Scalar " , " Functions " , " VisualShaderNodeScalarFunc " , TTR ( " Returns the arc - cosine of the parameter . " ) , VisualShaderNodeScalarFunc : : FUNC_ACOS , VisualShaderNode : : PORT_TYPE_SCALAR ) ) ; <nl> add_options . push_back ( AddOption ( " ACosH " , " Scalar " , " Functions " , " VisualShaderNodeScalarFunc " , TTR ( " ( GLES3 only ) Returns the inverse hyperbolic cosine of the parameter . " ) , VisualShaderNodeScalarFunc : : FUNC_ACOSH , VisualShaderNode : : PORT_TYPE_SCALAR ) ) ; <nl> mmm a / editor / plugins / visual_shader_editor_plugin . h <nl> ppp b / editor / plugins / visual_shader_editor_plugin . h <nl> class VisualShaderEditor : public VBoxContainer { <nl> int mode ; <nl> int return_type ; <nl> int func ; <nl> + float value ; <nl> <nl> - AddOption ( const String & p_name = String ( ) , const String & p_category = String ( ) , const String & p_sub_category = String ( ) , const String & p_type = String ( ) , const String & p_description = String ( ) , int p_sub_func = - 1 , int p_return_type = - 1 , int p_mode = - 1 , int p_func = - 1 ) { <nl> + AddOption ( const String & p_name = String ( ) , const String & p_category = String ( ) , const String & p_sub_category = String ( ) , const String & p_type = String ( ) , const String & p_description = String ( ) , int p_sub_func = - 1 , int p_return_type = - 1 , int p_mode = - 1 , int p_func = - 1 , float p_value = - 1 ) { <nl> name = p_name ; <nl> type = p_type ; <nl> category = p_category ; <nl> class VisualShaderEditor : public VBoxContainer { <nl> return_type = p_return_type ; <nl> mode = p_mode ; <nl> func = p_func ; <nl> + value = p_value ; <nl> } <nl> <nl> - AddOption ( const String & p_name , const String & p_category , const String & p_sub_category , const String & p_type , const String & p_description , const String & p_sub_func , int p_return_type = - 1 , int p_mode = - 1 , int p_func = - 1 ) { <nl> + AddOption ( const String & p_name , const String & p_category , const String & p_sub_category , const String & p_type , const String & p_description , const String & p_sub_func , int p_return_type = - 1 , int p_mode = - 1 , int p_func = - 1 , float p_value = - 1 ) { <nl> name = p_name ; <nl> type = p_type ; <nl> category = p_category ; <nl> class VisualShaderEditor : public VBoxContainer { <nl> return_type = p_return_type ; <nl> mode = p_mode ; <nl> func = p_func ; <nl> + value = p_value ; <nl> } <nl> } ; <nl> <nl>
Merge pull request from Chaosus / vs_constants
godotengine/godot
25e36f35404c076edb445d0fe595b694db57536d
2019-05-27T20:26:13Z
mmm a / Telegram / SourceFiles / data / data_media_types . cpp <nl> ppp b / Telegram / SourceFiles / data / data_media_types . cpp <nl> For license and copyright information please follow this link : <nl> namespace Data { <nl> namespace { <nl> <nl> - Call ComputeCallData ( const MTPDmessageActionPhoneCall & call ) { <nl> + constexpr auto kFastRevokeRestriction = 24 * 60 * TimeId ( 60 ) ; <nl> + <nl> + [ [ nodiscard ] ] Call ComputeCallData ( const MTPDmessageActionPhoneCall & call ) { <nl> auto result = Call ( ) ; <nl> result . finishReason = [ & ] { <nl> if ( const auto reason = call . vreason ( ) ) { <nl> Call ComputeCallData ( const MTPDmessageActionPhoneCall & call ) { <nl> return result ; <nl> } <nl> <nl> - Invoice ComputeInvoiceData ( <nl> + [ [ nodiscard ] ] Invoice ComputeInvoiceData ( <nl> not_null < HistoryItem * > item , <nl> const MTPDmessageMediaInvoice & data ) { <nl> auto result = Invoice ( ) ; <nl> Invoice ComputeInvoiceData ( <nl> return result ; <nl> } <nl> <nl> - QString WithCaptionDialogsText ( <nl> + [ [ nodiscard ] ] QString WithCaptionDialogsText ( <nl> const QString & attachType , <nl> const QString & caption ) { <nl> if ( caption . isEmpty ( ) ) { <nl> QString WithCaptionDialogsText ( <nl> TextUtilities : : Clean ( caption ) ) ; <nl> } <nl> <nl> - QString WithCaptionNotificationText ( <nl> + [ [ nodiscard ] ] QString WithCaptionNotificationText ( <nl> const QString & attachType , <nl> const QString & caption ) { <nl> if ( caption . isEmpty ( ) ) { <nl> bool Media : : allowsEditMedia ( ) const { <nl> return false ; <nl> } <nl> <nl> - bool Media : : allowsRevoke ( ) const { <nl> + bool Media : : allowsRevoke ( TimeId now ) const { <nl> return true ; <nl> } <nl> <nl> int MediaDice : : value ( ) const { <nl> return _value ; <nl> } <nl> <nl> + bool MediaDice : : allowsRevoke ( TimeId now ) const { <nl> + const auto peer = parent ( ) - > history ( ) - > peer ; <nl> + if ( peer - > isSelf ( ) | | ! peer - > isUser ( ) ) { <nl> + return true ; <nl> + } <nl> + return ( now > = parent ( ) - > date ( ) + kFastRevokeRestriction ) ; <nl> + } <nl> + <nl> QString MediaDice : : notificationText ( ) const { <nl> return _emoji ; <nl> } <nl> mmm a / Telegram / SourceFiles / data / data_media_types . h <nl> ppp b / Telegram / SourceFiles / data / data_media_types . h <nl> class Media { <nl> virtual bool allowsEdit ( ) const ; <nl> virtual bool allowsEditCaption ( ) const ; <nl> virtual bool allowsEditMedia ( ) const ; <nl> - virtual bool allowsRevoke ( ) const ; <nl> + virtual bool allowsRevoke ( TimeId now ) const ; <nl> virtual bool forwardedBecomesUnread ( ) const ; <nl> virtual QString errorTextForForward ( not_null < PeerData * > peer ) const ; <nl> <nl> class MediaDice final : public Media { <nl> [ [ nodiscard ] ] QString emoji ( ) const ; <nl> [ [ nodiscard ] ] int value ( ) const ; <nl> <nl> + bool allowsRevoke ( TimeId now ) const override ; <nl> QString notificationText ( ) const override ; <nl> QString pinnedTextSubstring ( ) const override ; <nl> TextForMimeData clipboardText ( ) const override ; <nl> mmm a / Telegram / SourceFiles / history / history_item . cpp <nl> ppp b / Telegram / SourceFiles / history / history_item . cpp <nl> bool HistoryItem : : canDeleteForEveryone ( TimeId now ) const { <nl> return false ; <nl> } <nl> } <nl> - if ( ! peer - > isUser ( ) ) { <nl> - if ( ! toHistoryMessage ( ) ) { <nl> + if ( ! peer - > isUser ( ) & & ! toHistoryMessage ( ) ) { <nl> + return false ; <nl> + } else if ( const auto media = this - > media ( ) ) { <nl> + if ( ! media - > allowsRevoke ( now ) ) { <nl> return false ; <nl> - } else if ( const auto media = this - > media ( ) ) { <nl> - if ( ! media - > allowsRevoke ( ) ) { <nl> - return false ; <nl> - } <nl> } <nl> } <nl> if ( ! out ( ) ) { <nl>
Disallow revoking dice media in first 24 hours .
telegramdesktop/tdesktop
d8e55081b076e586cffd6924a005847508d9a176
2020-05-01T09:21:57Z
mmm a / src / compiler / backend / arm64 / code - generator - arm64 . cc <nl> ppp b / src / compiler / backend / arm64 / code - generator - arm64 . cc <nl> CodeGenerator : : CodeGenResult CodeGenerator : : AssembleArchInstruction ( <nl> case kArm64Sxtw : <nl> __ Sxtw ( i . OutputRegister ( ) , i . InputRegister32 ( 0 ) ) ; <nl> break ; <nl> + case kArm64Sbfx : <nl> + __ Sbfx ( i . OutputRegister ( ) , i . InputRegister ( 0 ) , i . InputInt6 ( 1 ) , <nl> + i . InputInt6 ( 2 ) ) ; <nl> + break ; <nl> case kArm64Sbfx32 : <nl> __ Sbfx ( i . OutputRegister32 ( ) , i . InputRegister32 ( 0 ) , i . InputInt5 ( 1 ) , <nl> i . InputInt5 ( 2 ) ) ; <nl> mmm a / src / compiler / backend / arm64 / instruction - codes - arm64 . h <nl> ppp b / src / compiler / backend / arm64 / instruction - codes - arm64 . h <nl> namespace compiler { <nl> V ( Arm64Sxtb ) \ <nl> V ( Arm64Sxth ) \ <nl> V ( Arm64Sxtw ) \ <nl> + V ( Arm64Sbfx ) \ <nl> V ( Arm64Sbfx32 ) \ <nl> V ( Arm64Ubfx ) \ <nl> V ( Arm64Ubfx32 ) \ <nl> mmm a / src / compiler / backend / arm64 / instruction - scheduler - arm64 . cc <nl> ppp b / src / compiler / backend / arm64 / instruction - scheduler - arm64 . cc <nl> int InstructionScheduler : : GetTargetInstructionFlags ( <nl> case kArm64Sxth : <nl> case kArm64Sxth32 : <nl> case kArm64Sxtw : <nl> + case kArm64Sbfx : <nl> case kArm64Sbfx32 : <nl> case kArm64Ubfx : <nl> case kArm64Ubfx32 : <nl> int InstructionScheduler : : GetInstructionLatency ( const Instruction * instr ) { <nl> <nl> case kArm64Clz : <nl> case kArm64Clz32 : <nl> + case kArm64Sbfx : <nl> case kArm64Sbfx32 : <nl> case kArm64Sxtb32 : <nl> case kArm64Sxth32 : <nl> mmm a / src / compiler / backend / arm64 / instruction - selector - arm64 . cc <nl> ppp b / src / compiler / backend / arm64 / instruction - selector - arm64 . cc <nl> void InstructionSelector : : VisitChangeInt32ToInt64 ( Node * node ) { <nl> return ; <nl> } <nl> EmitLoad ( this , value , opcode , immediate_mode , rep , node ) ; <nl> - } else { <nl> - VisitRR ( this , kArm64Sxtw , node ) ; <nl> + return ; <nl> } <nl> + <nl> + if ( value - > opcode ( ) = = IrOpcode : : kWord32Sar & & CanCover ( node , value ) ) { <nl> + Int32BinopMatcher m ( value ) ; <nl> + if ( m . right ( ) . HasValue ( ) ) { <nl> + Arm64OperandGenerator g ( this ) ; <nl> + / / Mask the shift amount , to keep the same semantics as Word32Sar . <nl> + int right = m . right ( ) . Value ( ) & 0x1F ; <nl> + Emit ( kArm64Sbfx , g . DefineAsRegister ( node ) , g . UseRegister ( m . left ( ) . node ( ) ) , <nl> + g . TempImmediate ( right ) , g . TempImmediate ( 32 - right ) ) ; <nl> + return ; <nl> + } <nl> + } <nl> + <nl> + VisitRR ( this , kArm64Sxtw , node ) ; <nl> } <nl> <nl> void InstructionSelector : : VisitChangeUint32ToUint64 ( Node * node ) { <nl> mmm a / test / unittests / compiler / arm64 / instruction - selector - arm64 - unittest . cc <nl> ppp b / test / unittests / compiler / arm64 / instruction - selector - arm64 - unittest . cc <nl> TEST_F ( InstructionSelectorTest , ChangeInt32ToInt64AfterLoad ) { <nl> } <nl> } <nl> <nl> + TEST_F ( InstructionSelectorTest , ChangeInt32ToInt64WithWord32Sar ) { <nl> + / / Test the mod 32 behaviour of Word32Sar by iterating up to 33 . <nl> + TRACED_FORRANGE ( int32_t , imm , 0 , 33 ) { <nl> + StreamBuilder m ( this , MachineType : : Int64 ( ) , MachineType : : Int32 ( ) ) ; <nl> + m . Return ( m . ChangeInt32ToInt64 ( <nl> + m . Word32Sar ( m . Parameter ( 0 ) , m . Int32Constant ( imm ) ) ) ) ; <nl> + Stream s = m . Build ( ) ; <nl> + ASSERT_EQ ( 1U , s . size ( ) ) ; <nl> + EXPECT_EQ ( kArm64Sbfx , s [ 0 ] - > arch_opcode ( ) ) ; <nl> + EXPECT_EQ ( 3U , s [ 0 ] - > InputCount ( ) ) ; <nl> + EXPECT_EQ ( 1U , s [ 0 ] - > OutputCount ( ) ) ; <nl> + EXPECT_EQ ( imm & 0x1f , s . ToInt32 ( s [ 0 ] - > InputAt ( 1 ) ) ) ; <nl> + EXPECT_EQ ( 32 - ( imm & 0x1f ) , s . ToInt32 ( s [ 0 ] - > InputAt ( 2 ) ) ) ; <nl> + } <nl> + } <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / Memory access instructions . <nl> <nl>
[ arm64 ] [ turbofan ] Fold sign extensions and right shifts
v8/v8
9b6e45e17907e06dee5a55c36d3ad421c9260ac1
2019-10-11T10:12:44Z
mmm a / validation - test / stdlib / Arrays . swift . gyb <nl> ppp b / validation - test / stdlib / Arrays . swift . gyb <nl> let indexTests : [ ArrayIndexTest < [ Int ] > ] = [ <nl> expectedEnd : 1 , <nl> operation : . append ( 1 ) <nl> ) , <nl> - ArrayIndexTest ( <nl> - data : [ 42 , 2525 , 3535 , 42 ] , <nl> - expectedStart : 1 , <nl> - expectedEnd : 3 , <nl> - operation : . append ( 1 ) , <nl> - range : 1 . . < 2 <nl> - ) , <nl> + / / TODO : re - enable when rdar : / / problem / 33358110 is addressed <nl> + / / ArrayIndexTest ( <nl> + / / data : [ 42 , 2525 , 3535 , 42 ] , <nl> + / / expectedStart : 1 , <nl> + / / expectedEnd : 3 , <nl> + / / operation : . append ( 1 ) , <nl> + / / range : 1 . . < 2 <nl> + / / ) , <nl> / / Check how insert ( _ : at : ) affects indices . <nl> ArrayIndexTest ( <nl> data : [ 2 ] , <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
0aaa472b35fd0bc2bab732fa0ea41a686718e8ba
2017-08-26T00:09:03Z
mmm a / hphp / hack / src / hackfmt / hack_format . ml <nl> ppp b / hphp / hack / src / hackfmt / hack_format . ml <nl> let rec transform node = <nl> let ( name , left_b , initializers , right_b ) = <nl> get_collection_literal_expression_children x <nl> in <nl> - Fmt [ <nl> - t name ; <nl> - Space ; <nl> - transform_argish ~ spaces : true left_b initializers right_b ; <nl> - ] <nl> + transform_container_literal ~ spaces : true name left_b initializers right_b <nl> | ObjectCreationExpression x - > <nl> let ( kw , obj_type , left_p , arg_list , right_p ) = <nl> get_object_creation_expression_children x <nl> let rec transform node = <nl> let ( kw , left_p , members , right_p ) = <nl> get_array_intrinsic_expression_children x <nl> in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | DarrayIntrinsicExpression x - > <nl> let ( kw , left_p , members , right_p ) = <nl> get_darray_intrinsic_expression_children x in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | DictionaryIntrinsicExpression x - > <nl> let ( kw , left_p , members , right_p ) = <nl> get_dictionary_intrinsic_expression_children x <nl> in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | KeysetIntrinsicExpression x - > <nl> let ( kw , left_p , members , right_p ) = <nl> get_keyset_intrinsic_expression_children x <nl> in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | VarrayIntrinsicExpression x - > <nl> let ( kw , left_p , members , right_p ) = <nl> get_varray_intrinsic_expression_children x in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | VectorIntrinsicExpression x - > <nl> let ( kw , left_p , members , right_p ) = <nl> get_vector_intrinsic_expression_children x <nl> in <nl> - Fmt [ <nl> - t kw ; <nl> - transform_argish left_p members right_p ; <nl> - ] <nl> + transform_container_literal kw left_p members right_p <nl> | ElementInitializer x - > <nl> let ( key , arrow , value ) = get_element_initializer_children x in <nl> transform_mapish_entry key arrow value <nl> and nest ? ( spaces = false ) right_delim nodes = <nl> transform right_delim ; <nl> ] <nl> <nl> - and after_each_argument is_last = <nl> - if is_last then Split else space_split ( ) <nl> + and after_each_argument ? ( force_newlines = false ) is_last = <nl> + if force_newlines <nl> + then Newline <nl> + else <nl> + if is_last <nl> + then Split <nl> + else space_split ( ) <nl> <nl> and handle_lambda_body node = <nl> match syntax node with <nl> and transform_argish_with_return_type left_p params right_p colon ret_type = <nl> ] ) <nl> ] <nl> <nl> - and transform_argish ? ( allow_trailing = true ) ? ( spaces = false ) <nl> + and transform_argish <nl> + ? ( allow_trailing = true ) ? ( force_newlines = false ) ? ( spaces = false ) <nl> left_p arg_list right_p = <nl> ( * When there is only one argument , with no surrounding whitespace in the <nl> * original source , allow that style to be preserved even when there are line <nl> and transform_argish ? ( allow_trailing = true ) ? ( spaces = false ) <nl> | _ - > true <nl> in <nl> delimited_nest ~ spaces ~ split_when_children_split left_p right_p [ <nl> - transform_arg_list ~ spaces ~ allow_trailing arg_list <nl> + transform_arg_list ~ spaces ~ allow_trailing ~ force_newlines arg_list <nl> ] <nl> <nl> and transform_braced_item left_p item right_p = <nl> and transform_braced_item_with_trailer left_p item comma right_p = <nl> trailing commas in all these places reach end - of - life . * ) <nl> [ transform_trailing_comma ~ allow_trailing : false item comma ] <nl> <nl> - and transform_arg_list ? ( allow_trailing = true ) ? ( spaces = false ) items = <nl> + and transform_arg_list <nl> + ? ( allow_trailing = true ) ? ( force_newlines = false ) ? ( spaces = false ) items = <nl> handle_possible_list items <nl> - ~ after_each : after_each_argument <nl> + ~ after_each : ( after_each_argument ~ force_newlines ) <nl> ~ handle_last : ( transform_last_arg ~ allow_trailing ) <nl> <nl> and transform_possible_comma_list ? ( allow_trailing = true ) ? ( spaces = false ) <nl> and transform_possible_comma_list ? ( allow_trailing = true ) ? ( spaces = false ) <nl> transform_arg_list ~ spaces ~ allow_trailing items <nl> ] <nl> <nl> + and transform_container_literal ? ( spaces = false ) kw left_p members right_p = <nl> + let force_newlines = <nl> + let trivia = trailing_trivia left_p in <nl> + List . exists trivia <nl> + ~ f : ( fun x - > Full_fidelity_editable_trivia . kind x = TriviaKind . EndOfLine ) <nl> + in <nl> + Fmt [ <nl> + transform kw ; <nl> + if spaces then Space else Nothing ; <nl> + transform_argish ~ spaces ~ force_newlines left_p members right_p ; <nl> + ] <nl> + <nl> and remove_leading_trivia node = <nl> match Syntax . leading_token node with <nl> | None - > [ ] , node <nl> new file mode 100644 <nl> index 00000000000 . . 4cecdb62b68 <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / hackfmt / tests / collection_literal_newlines . php <nl> <nl> + < ? hh / / strict <nl> + $ foo = array ( ' should_stay_on_same_line ' ) ; <nl> + $ foo = array ( <nl> + ' should_remain_on_new_line ' , <nl> + ) ; <nl> + $ foo = varray [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = varray [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + <nl> + $ foo = array ( ' should_stay ' = > ' on_same_line ' ) ; <nl> + $ foo = array ( <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ) ; <nl> + $ foo = darray [ ' should_stay ' = > ' on_same_line ' ] ; <nl> + $ foo = darray [ <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ] ; <nl> + <nl> + $ foo = Set { ' should_stay_on_same_line ' } ; <nl> + $ foo = Set { <nl> + ' should_remain_on_new_line ' , <nl> + } ; <nl> + $ foo = Vector { ' should_stay_on_same_line ' } ; <nl> + $ foo = Vector { <nl> + ' should_remain_on_new_line ' , <nl> + } ; <nl> + $ foo = Map { ' should_stay ' = > ' on_same_line ' } ; <nl> + $ foo = Map { <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + } ; <nl> + <nl> + $ foo = keyset [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = keyset [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + $ foo = vec [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = vec [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + $ foo = dict [ ' should_stay ' = > ' on_same_line ' ] ; <nl> + $ foo = dict [ <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ] ; <nl> + <nl> + / / If there are no elements , there should not be a newline . <nl> + $ foo = dict [ <nl> + ] ; <nl> new file mode 100644 <nl> index 00000000000 . . f72125a1e80 <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / hackfmt / tests / collection_literal_newlines . php . exp <nl> <nl> + < ? hh / / strict <nl> + $ foo = array ( ' should_stay_on_same_line ' ) ; <nl> + $ foo = array ( <nl> + ' should_remain_on_new_line ' , <nl> + ) ; <nl> + $ foo = varray [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = varray [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + <nl> + $ foo = array ( ' should_stay ' = > ' on_same_line ' ) ; <nl> + $ foo = array ( <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ) ; <nl> + $ foo = darray [ ' should_stay ' = > ' on_same_line ' ] ; <nl> + $ foo = darray [ <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ] ; <nl> + <nl> + $ foo = Set { ' should_stay_on_same_line ' } ; <nl> + $ foo = Set { <nl> + ' should_remain_on_new_line ' , <nl> + } ; <nl> + $ foo = Vector { ' should_stay_on_same_line ' } ; <nl> + $ foo = Vector { <nl> + ' should_remain_on_new_line ' , <nl> + } ; <nl> + $ foo = Map { ' should_stay ' = > ' on_same_line ' } ; <nl> + $ foo = Map { <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + } ; <nl> + <nl> + $ foo = keyset [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = keyset [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + $ foo = vec [ ' should_stay_on_same_line ' ] ; <nl> + $ foo = vec [ <nl> + ' should_remain_on_new_line ' , <nl> + ] ; <nl> + $ foo = dict [ ' should_stay ' = > ' on_same_line ' ] ; <nl> + $ foo = dict [ <nl> + ' should_remain ' = > ' on_new_line ' , <nl> + ] ; <nl> + <nl> + / / If there are no elements , there should not be a newline . <nl> + $ foo = dict [ ] ; <nl> mmm a / hphp / hack / test / hackfmt / tests / xhp_1 . php . exp <nl> ppp b / hphp / hack / test / hackfmt / tests / xhp_1 . php . exp <nl> final class : MyFancyXHPClass extends : OtherXHPThing { <nl> < x : column - layout - component <nl> attr1 = " attr " <nl> attr2 = { <nl> - FakeClassWithReallyLongAttributeStuff : : getCreateSomeStaticData ( <nl> - Map { ' key1 ' = > ' value1 ' } , <nl> - ) <nl> + FakeClassWithReallyLongAttributeStuff : : getCreateSomeStaticData ( Map { <nl> + ' key1 ' = > ' value1 ' , <nl> + } ) <nl> } > <nl> < x : div padding = " large " > < x : link href = " # " > Click Here ! < / x : link > < / x : div > <nl> < x : div padding = " large " > { $ link } < / x : div > <nl>
Preserve line breaks in container literals
facebook/hhvm
b4afb7ef1f56f8d1c800d6983b384c7b8f993386
2017-07-27T00:30:43Z
new file mode 160000 <nl> index 00000000000 . . 309c076fc26 <nl> mmm / dev / null <nl> ppp b / 3rdParty / s2geometry / 309c076 <nl> @ @ - 0 , 0 + 1 @ @ <nl> + Subproject commit 309c076fc267ba7d1ad7a7aebf27f1238358fbb8 <nl> mmm a / arangod / Aql / CollectionAccessingNode . cpp <nl> ppp b / arangod / Aql / CollectionAccessingNode . cpp <nl> void CollectionAccessingNode : : toVelocyPack ( arangodb : : velocypack : : Builder & builde <nl> void CollectionAccessingNode : : toVelocyPackHelperPrimaryIndex ( arangodb : : velocypack : : Builder & builder ) const { <nl> auto col = _collection - > getCollection ( ) ; <nl> builder . add ( VPackValue ( " indexes " ) ) ; <nl> - col - > getIndexesVPack ( builder , Index : : SERIALIZE_BASICS , [ ] ( arangodb : : Index const * idx ) { <nl> + col - > getIndexesVPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) , [ ] ( arangodb : : Index const * idx ) { <nl> return ( idx - > type ( ) = = arangodb : : Index : : TRI_IDX_TYPE_PRIMARY_INDEX ) ; <nl> } ) ; <nl> } <nl> mmm a / arangod / Aql / IndexNode . cpp <nl> ppp b / arangod / Aql / IndexNode . cpp <nl> void IndexNode : : toVelocyPackHelper ( VPackBuilder & builder , unsigned flags ) const <nl> { <nl> VPackArrayBuilder guard ( & builder ) ; <nl> for ( auto & index : _indexes ) { <nl> - index . toVelocyPack ( builder , Index : : SERIALIZE_ESTIMATES ) ; <nl> + index . toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Estimates ) ) ; <nl> } <nl> } <nl> builder . add ( VPackValue ( " condition " ) ) ; <nl> mmm a / arangod / Aql / OptimizerRules . cpp <nl> ppp b / arangod / Aql / OptimizerRules . cpp <nl> static bool distanceFuncArgCheck ( ExecutionPlan * plan , AstNode const * latArg , <nl> std : : vector < basics : : AttributeName > fields2 = idx - > fields ( ) [ 0 ] ; <nl> <nl> VPackBuilder builder ; <nl> - idx - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + idx - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> bool geoJson = basics : : VelocyPackHelper : : getBooleanValue ( builder . slice ( ) , " geoJson " , false ) ; <nl> <nl> fields1 . back ( ) . name + = geoJson ? " [ 1 ] " : " [ 0 ] " ; <nl> mmm a / arangod / Aql / OptimizerRulesReplaceFunctions . cpp <nl> ppp b / arangod / Aql / OptimizerRulesReplaceFunctions . cpp <nl> std : : pair < AstNode * , AstNode * > getAttributeAccessFromIndex ( Ast * ast , AstNode * doc <nl> AstNode * base = ast - > createNodeAttributeAccess ( accessNodeLon , accessBase ) ; <nl> <nl> VPackBuilder builder ; <nl> - idx - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + idx - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> bool geoJson = basics : : VelocyPackHelper : : getBooleanValue ( builder . slice ( ) , " geoJson " , false ) ; <nl> <nl> accessNodeLat = ast - > createNodeIndexedAccess ( base , ast - > createNodeValueInt ( geoJson ? 1 : 0 ) ) ; <nl> AstNode * replaceWithinRectangle ( AstNode * funAstNode , ExecutionNode * calcNode , Ex <nl> fargs - > addMember ( arr ) ; <nl> } else { <nl> VPackBuilder builder ; <nl> - index - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + index - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> bool geoJson = basics : : VelocyPackHelper : : getBooleanValue ( builder . slice ( ) , " geoJson " , false ) ; <nl> if ( geoJson ) { <nl> fargs - > addMember ( ast - > createNodeAccess ( collVar , index - > fields ( ) [ 0 ] ) ) ; <nl> mmm a / arangod / Cluster / ClusterInfo . cpp <nl> ppp b / arangod / Cluster / ClusterInfo . cpp <nl> int ClusterInfo : : ensureIndexCoordinator ( <nl> oldPlanIndexes . reset ( new VPackBuilder ( ) ) ; <nl> <nl> c = getCollection ( databaseName , collectionID ) ; <nl> - c - > getIndexesVPack ( * ( oldPlanIndexes . get ( ) ) , Index : : SERIALIZE_BASICS ) ; <nl> + c - > getIndexesVPack ( * ( oldPlanIndexes . get ( ) ) , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> VPackSlice const planIndexes = oldPlanIndexes - > slice ( ) ; <nl> <nl> if ( planIndexes . isArray ( ) ) { <nl> int ClusterInfo : : ensureIndexCoordinatorWithoutRollback ( <nl> std : : shared_ptr < LogicalCollection > c = <nl> getCollection ( databaseName , collectionID ) ; <nl> std : : shared_ptr < VPackBuilder > tmp = std : : make_shared < VPackBuilder > ( ) ; <nl> - c - > getIndexesVPack ( * ( tmp . get ( ) ) , Index : : SERIALIZE_BASICS ) ; <nl> + c - > getIndexesVPack ( * ( tmp . get ( ) ) , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> { <nl> MUTEX_LOCKER ( guard , * numberOfShardsMutex ) ; <nl> * numberOfShards = static_cast < int > ( c - > numberOfShards ( ) ) ; <nl> int ClusterInfo : : dropIndexCoordinator ( std : : string const & databaseName , <nl> <nl> READ_LOCKER ( readLocker , _planProt . lock ) ; <nl> <nl> - c - > getIndexesVPack ( tmp , Index : : SERIALIZE_BASICS ) ; <nl> + c - > getIndexesVPack ( tmp , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> indexes = tmp . slice ( ) ; <nl> <nl> if ( ! indexes . isArray ( ) ) { <nl> mmm a / arangod / ClusterEngine / ClusterIndex . cpp <nl> ppp b / arangod / ClusterEngine / ClusterIndex . cpp <nl> void ClusterIndex : : toVelocyPackFigures ( VPackBuilder & builder ) const { <nl> / / = = = = = = = = = = below is cluster schmutz = = = = = = = = = = = = <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void ClusterIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void ClusterIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( StaticStrings : : IndexUnique , VPackValue ( _unique ) ) ; <nl> mmm a / arangod / ClusterEngine / ClusterIndex . h <nl> ppp b / arangod / ClusterEngine / ClusterIndex . h <nl> class ClusterIndex : public Index { <nl> void toVelocyPackFigures ( velocypack : : Builder & builder ) const override ; <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void toVelocyPack ( velocypack : : Builder & builder , unsigned flags ) const override ; <nl> + void toVelocyPack ( velocypack : : Builder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> IndexType type ( ) const override { return _indexType ; } <nl> <nl> mmm a / arangod / Graph / BaseOptions . cpp <nl> ppp b / arangod / Graph / BaseOptions . cpp <nl> void BaseOptions : : LookupInfo : : buildEngineInfo ( VPackBuilder & result ) const { <nl> / / We only run toVelocyPack on Coordinator . <nl> TRI_ASSERT ( idxHandles . size ( ) = = 1 ) ; <nl> <nl> - idxHandles [ 0 ] . toVelocyPack ( result , Index : : SERIALIZE_BASICS ) ; <nl> + idxHandles [ 0 ] . toVelocyPack ( result , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> <nl> if ( expression ! = nullptr ) { <nl> result . add ( VPackValue ( " expression " ) ) ; <nl> void BaseOptions : : injectVelocyPackIndexes ( VPackBuilder & builder ) const { <nl> for ( auto const & it : _baseLookupInfos ) { <nl> for ( auto const & it2 : it . idxHandles ) { <nl> builder . openObject ( ) ; <nl> - it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> builder . close ( ) ; <nl> } <nl> } <nl> mmm a / arangod / Graph / ShortestPathOptions . cpp <nl> ppp b / arangod / Graph / ShortestPathOptions . cpp <nl> void ShortestPathOptions : : toVelocyPackIndexes ( VPackBuilder & builder ) const { <nl> builder . add ( " base " , VPackValue ( VPackValueType : : Array ) ) ; <nl> for ( auto const & it : _baseLookupInfos ) { <nl> for ( auto const & it2 : it . idxHandles ) { <nl> - it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> } <nl> } <nl> builder . close ( ) ; <nl> mmm a / arangod / Graph / TraverserOptions . cpp <nl> ppp b / arangod / Graph / TraverserOptions . cpp <nl> void TraverserOptions : : toVelocyPackIndexes ( VPackBuilder & builder ) const { <nl> builder . add ( " base " , VPackValue ( VPackValueType : : Array ) ) ; <nl> for ( auto const & it : _baseLookupInfos ) { <nl> for ( auto const & it2 : it . idxHandles ) { <nl> - it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + it2 . getIndex ( ) - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> } <nl> } <nl> builder . close ( ) ; <nl> void TraverserOptions : : toVelocyPackIndexes ( VPackBuilder & builder ) const { <nl> builder . add ( VPackValue ( VPackValueType : : Array ) ) ; <nl> for ( auto const & it2 : it . second ) { <nl> for ( auto const & it3 : it2 . idxHandles ) { <nl> - it3 . getIndex ( ) - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + it3 . getIndex ( ) - > toVelocyPack ( builder , Index : : makeFlags ( Index : : Serialize : : Basics ) ) ; <nl> } <nl> } <nl> builder . close ( ) ; <nl> mmm a / arangod / IResearch / IResearchLinkCoordinator . cpp <nl> ppp b / arangod / IResearch / IResearchLinkCoordinator . cpp <nl> bool IResearchLinkCoordinator : : matchesDefinition ( VPackSlice const & slice ) const <nl> <nl> void IResearchLinkCoordinator : : toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const { <nl> TRI_ASSERT ( _view ) ; <nl> TRI_ASSERT ( ! builder . isOpenObject ( ) ) ; <nl> void IResearchLinkCoordinator : : toVelocyPack ( <nl> arangodb : : velocypack : : Value ( _view - > guid ( ) ) <nl> ) ; <nl> <nl> - if ( flags & arangodb : : Index : : SERIALIZE_FIGURES ) { <nl> + if ( arangodb : : Index : : hasFlag ( flags , arangodb : : Index : : Serialize : : Figures ) ) { <nl> builder . add ( <nl> " figures " , <nl> arangodb : : velocypack : : Value ( arangodb : : velocypack : : ValueType : : Object ) <nl> mmm a / arangod / IResearch / IResearchLinkCoordinator . h <nl> ppp b / arangod / IResearch / IResearchLinkCoordinator . h <nl> class IResearchLinkCoordinator final : public arangodb : : Index { <nl> using Index : : toVelocyPack ; / / for Index : : toVelocyPack ( bool , unsigned ) <nl> virtual void toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const override ; <nl> <nl> virtual IndexType type ( ) const override { <nl> mmm a / arangod / IResearch / IResearchMMFilesLink . cpp <nl> ppp b / arangod / IResearch / IResearchMMFilesLink . cpp <nl> IResearchMMFilesLink : : ~ IResearchMMFilesLink ( ) { <nl> <nl> void IResearchMMFilesLink : : toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned int flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const { <nl> if ( builder . isOpenObject ( ) ) { <nl> THROW_ARANGO_EXCEPTION ( arangodb : : Result ( <nl> void IResearchMMFilesLink : : toVelocyPack ( <nl> ) ) ; <nl> } <nl> <nl> - if ( flags & arangodb : : Index : : SERIALIZE_FIGURES ) { <nl> + if ( arangodb : : Index : : hasFlag ( flags , arangodb : : Index : : Serialize : : Figures ) ) { <nl> VPackBuilder figuresBuilder ; <nl> <nl> figuresBuilder . openObject ( ) ; <nl> NS_END / / arangodb <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - END - OF - FILE <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> \ No newline at end of file <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> mmm a / arangod / IResearch / IResearchMMFilesLink . h <nl> ppp b / arangod / IResearch / IResearchMMFilesLink . h <nl> class IResearchMMFilesLink final <nl> using Index : : toVelocyPack ; / / for Index : : toVelocyPack ( bool , unsigned ) <nl> virtual void toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned int flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type <nl> ) const override ; <nl> <nl> virtual IndexType type ( ) const override { <nl> class IResearchMMFilesLink final <nl> NS_END / / iresearch <nl> NS_END / / arangodb <nl> <nl> - # endif <nl> \ No newline at end of file <nl> + # endif <nl> mmm a / arangod / IResearch / IResearchRocksDBLink . cpp <nl> ppp b / arangod / IResearch / IResearchRocksDBLink . cpp <nl> IResearchRocksDBLink : : ~ IResearchRocksDBLink ( ) { <nl> <nl> void IResearchRocksDBLink : : toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned int flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const { <nl> if ( builder . isOpenObject ( ) ) { <nl> THROW_ARANGO_EXCEPTION ( arangodb : : Result ( <nl> void IResearchRocksDBLink : : toVelocyPack ( <nl> ) ) ; <nl> } <nl> <nl> - if ( flags & arangodb : : Index : : SERIALIZE_FIGURES ) { <nl> + if ( arangodb : : Index : : hasFlag ( flags , arangodb : : Index : : Serialize : : Figures ) ) { <nl> VPackBuilder figuresBuilder ; <nl> <nl> figuresBuilder . openObject ( ) ; <nl> NS_END / / arangodb <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - END - OF - FILE <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> \ No newline at end of file <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> mmm a / arangod / IResearch / IResearchRocksDBLink . h <nl> ppp b / arangod / IResearch / IResearchRocksDBLink . h <nl> class IResearchRocksDBLink final <nl> using Index : : toVelocyPack ; / / for Index : : toVelocyPack ( bool , unsigned ) <nl> virtual void toVelocyPack ( <nl> arangodb : : velocypack : : Builder & builder , <nl> - unsigned int flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const override ; <nl> <nl> virtual IndexType type ( ) const override { <nl> class IResearchRocksDBLink final <nl> NS_END / / iresearch <nl> NS_END / / arangodb <nl> <nl> - # endif <nl> \ No newline at end of file <nl> + # endif <nl> mmm a / arangod / Indexes / Index . cpp <nl> ppp b / arangod / Indexes / Index . cpp <nl> std : : string Index : : context ( ) const { <nl> <nl> / / / @ brief create a VelocyPack representation of the index <nl> / / / base functionality ( called from derived classes ) <nl> - std : : shared_ptr < VPackBuilder > Index : : toVelocyPack ( unsigned flags ) const { <nl> + std : : shared_ptr < VPackBuilder > Index : : toVelocyPack ( std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> auto builder = std : : make_shared < VPackBuilder > ( ) ; <nl> toVelocyPack ( * builder , flags ) ; <nl> return builder ; <nl> std : : shared_ptr < VPackBuilder > Index : : toVelocyPack ( unsigned flags ) const { <nl> / / / @ brief create a VelocyPack representation of the index <nl> / / / base functionality ( called from derived classes ) <nl> / / / note : needs an already - opened object as its input ! <nl> - void Index : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void Index : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> TRI_ASSERT ( builder . isOpenObject ( ) ) ; <nl> builder . add ( <nl> arangodb : : StaticStrings : : IndexId , <nl> void Index : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> <nl> builder . close ( ) ; <nl> <nl> - if ( hasSelectivityEstimate ( ) & & ( flags & SERIALIZE_ESTIMATES ) ) { <nl> + if ( hasSelectivityEstimate ( ) & & <nl> + Index : : hasFlag ( flags , Index : : Serialize : : Estimates ) ) { <nl> builder . add ( " selectivityEstimate " , VPackValue ( selectivityEstimate ( ) ) ) ; <nl> } <nl> <nl> - if ( flags & SERIALIZE_FIGURES ) { <nl> + if ( Index : : hasFlag ( flags , Index : : Serialize : : Figures ) ) { <nl> builder . add ( " figures " , VPackValue ( VPackValueType : : Object ) ) ; <nl> toVelocyPackFigures ( builder ) ; <nl> builder . close ( ) ; <nl> mmm a / arangod / Indexes / Index . h <nl> ppp b / arangod / Indexes / Index . h <nl> class Index { <nl> <nl> virtual size_t memory ( ) const = 0 ; <nl> <nl> - / / serialization flags for indexes <nl> - <nl> - / / serialize the basics . this cannot be turne off <nl> - static constexpr unsigned SERIALIZE_BASICS = 0 ; <nl> - / / serialize figures for index <nl> - static constexpr unsigned SERIALIZE_FIGURES = 1 ; <nl> - / / serialize object ids for persistence <nl> - static constexpr unsigned SERIALIZE_OBJECTID = 1 < < 1 ; <nl> - / / serialize selectivity estimates <nl> - static constexpr unsigned SERIALIZE_ESTIMATES = 1 < < 2 ; <nl> + / / / @ brief serialization flags for indexes . <nl> + / / / note that these must be mutually exclusive when bit - ORed <nl> + enum class Serialize : uint8_t { <nl> + / / / @ brief serialize figures for index <nl> + Basics = 0 , <nl> + / / / @ brief serialize figures for index <nl> + Figures = 2 , <nl> + / / / @ brief serialize object ids for persistence <nl> + ObjectId = 4 , <nl> + / / / @ brief serialize selectivity estimates <nl> + Estimates = 8 <nl> + } ; <nl> + <nl> + / / / @ brief helper for building flags <nl> + template < typename . . . Args > <nl> + static inline constexpr std : : underlying_type < Serialize > : : type makeFlags ( Serialize flag , Args . . . args ) { <nl> + return static_cast < std : : underlying_type < Serialize > : : type > ( flag ) + makeFlags ( args . . . ) ; <nl> + } <nl> + <nl> + static inline constexpr std : : underlying_type < Serialize > : : type makeFlags ( ) { <nl> + return static_cast < std : : underlying_type < Serialize > : : type > ( Serialize : : Basics ) ; <nl> + } <nl> + <nl> + static inline constexpr bool hasFlag ( std : : underlying_type < Serialize > : : type flags , <nl> + Serialize aflag ) { <nl> + return ( flags & static_cast < std : : underlying_type < Serialize > : : type > ( aflag ) ) ! = 0 ; <nl> + } <nl> <nl> / / / serialize an index to velocypack , using the serialization flags above <nl> - virtual void toVelocyPack ( arangodb : : velocypack : : Builder & , unsigned flags ) const ; <nl> - std : : shared_ptr < arangodb : : velocypack : : Builder > toVelocyPack ( unsigned flags ) const ; <nl> + virtual void toVelocyPack ( arangodb : : velocypack : : Builder & , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const ; <nl> + std : : shared_ptr < arangodb : : velocypack : : Builder > toVelocyPack ( std : : underlying_type < Serialize > : : type flags ) const ; <nl> <nl> virtual void toVelocyPackFigures ( arangodb : : velocypack : : Builder & ) const ; <nl> std : : shared_ptr < arangodb : : velocypack : : Builder > toVelocyPackFigures ( ) const ; <nl> mmm a / arangod / Indexes / IndexResult . h <nl> ppp b / arangod / Indexes / IndexResult . h <nl> class IndexResult : public Result { <nl> <nl> / / build fields string <nl> VPackBuilder builder ; <nl> - index - > toVelocyPack ( builder , Index : : SERIALIZE_BASICS ) ; <nl> + index - > toVelocyPack ( builder , Index : : makeFlags ( ) ) ; <nl> VPackSlice fields = builder . slice ( ) . get ( " fields " ) ; <nl> if ( ! fields . isNone ( ) ) { <nl> _errorMessage . append ( " over " ) ; <nl> mmm a / arangod / MMFiles / MMFilesCollection . cpp <nl> ppp b / arangod / MMFiles / MMFilesCollection . cpp <nl> int MMFilesCollection : : saveIndex ( transaction : : Methods * trx , <nl> <nl> std : : shared_ptr < VPackBuilder > builder ; <nl> try { <nl> - builder = idx - > toVelocyPack ( Index : : SERIALIZE_OBJECTID ) ; <nl> + builder = idx - > toVelocyPack ( Index : : makeFlags ( Index : : Serialize : : ObjectId ) ) ; <nl> } catch ( arangodb : : basics : : Exception const & ex ) { <nl> LOG_TOPIC ( ERR , arangodb : : Logger : : FIXME ) < < " cannot save index definition : " < < ex . what ( ) ; <nl> return ex . code ( ) ; <nl> mmm a / arangod / MMFiles / MMFilesEdgeIndex . cpp <nl> ppp b / arangod / MMFiles / MMFilesEdgeIndex . cpp <nl> size_t MMFilesEdgeIndex : : memory ( ) const { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void MMFilesEdgeIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void MMFilesEdgeIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> / / hard - coded <nl> mmm a / arangod / MMFiles / MMFilesEdgeIndex . h <nl> ppp b / arangod / MMFiles / MMFilesEdgeIndex . h <nl> class MMFilesEdgeIndex final : public MMFilesIndex { <nl> <nl> size_t memory ( ) const override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> void toVelocyPackFigures ( VPackBuilder & ) const override ; <nl> <nl> mmm a / arangod / MMFiles / MMFilesFulltextIndex . cpp <nl> ppp b / arangod / MMFiles / MMFilesFulltextIndex . cpp <nl> size_t MMFilesFulltextIndex : : memory ( ) const { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void MMFilesFulltextIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void MMFilesFulltextIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( <nl> mmm a / arangod / MMFiles / MMFilesFulltextIndex . h <nl> ppp b / arangod / MMFiles / MMFilesFulltextIndex . h <nl> class MMFilesFulltextIndex final : public MMFilesIndex { <nl> <nl> size_t memory ( ) const override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , std : : underlying_type < Serialize > : : type ) const override ; <nl> <nl> bool matchesDefinition ( VPackSlice const & ) const override ; <nl> <nl> mmm a / arangod / MMFiles / MMFilesGeoIndex . cpp <nl> ppp b / arangod / MMFiles / MMFilesGeoIndex . cpp <nl> MMFilesGeoIndex : : MMFilesGeoIndex ( <nl> size_t MMFilesGeoIndex : : memory ( ) const { return _tree . bytes_used ( ) ; } <nl> <nl> / / / @ brief return a JSON representation of the index <nl> - void MMFilesGeoIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void MMFilesGeoIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags ) const { <nl> TRI_ASSERT ( _variant ! = geo_index : : Index : : Variant : : NONE ) ; <nl> builder . openObject ( ) ; <nl> / / Basic index <nl> mmm a / arangod / MMFiles / MMFilesGeoIndex . h <nl> ppp b / arangod / MMFiles / MMFilesGeoIndex . h <nl> class MMFilesGeoIndex final : public MMFilesIndex , public geo_index : : Index { <nl> <nl> size_t memory ( ) const override ; <nl> <nl> - void toVelocyPack ( velocypack : : Builder & , unsigned flags ) const override ; <nl> + using arangodb : : Index : : toVelocyPack ; <nl> + void toVelocyPack ( velocypack : : Builder & , <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type ) const override ; <nl> <nl> bool matchesDefinition ( velocypack : : Slice const & info ) const override ; <nl> <nl> mmm a / arangod / MMFiles / MMFilesPathBasedIndex . cpp <nl> ppp b / arangod / MMFiles / MMFilesPathBasedIndex . cpp <nl> void MMFilesPathBasedIndex : : toVelocyPackFigures ( VPackBuilder & builder ) const { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void MMFilesPathBasedIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void MMFilesPathBasedIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( <nl> mmm a / arangod / MMFiles / MMFilesPathBasedIndex . h <nl> ppp b / arangod / MMFiles / MMFilesPathBasedIndex . h <nl> class MMFilesPathBasedIndex : public MMFilesIndex { <nl> <nl> void toVelocyPackFigures ( arangodb : : velocypack : : Builder & ) const override ; <nl> <nl> - void toVelocyPack ( arangodb : : velocypack : : Builder & builder , unsigned flags ) const override ; <nl> + void toVelocyPack ( arangodb : : velocypack : : Builder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> / / / @ brief return the attribute paths <nl> std : : vector < std : : vector < std : : string > > const & paths ( ) <nl> mmm a / arangod / MMFiles / MMFilesPrimaryIndex . cpp <nl> ppp b / arangod / MMFiles / MMFilesPrimaryIndex . cpp <nl> size_t MMFilesPrimaryIndex : : memory ( ) const { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void MMFilesPrimaryIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void MMFilesPrimaryIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> / / hard - coded <nl> mmm a / arangod / MMFiles / MMFilesPrimaryIndex . h <nl> ppp b / arangod / MMFiles / MMFilesPrimaryIndex . h <nl> class MMFilesPrimaryIndex final : public MMFilesIndex { <nl> <nl> size_t memory ( ) const override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> void toVelocyPackFigures ( VPackBuilder & ) const override ; <nl> <nl> Result insert ( transaction : : Methods * , LocalDocumentId const & documentId , <nl> mmm a / arangod / RestHandler / RestIndexHandler . cpp <nl> ppp b / arangod / RestHandler / RestIndexHandler . cpp <nl> RestStatus RestIndexHandler : : getIndexes ( ) { <nl> return RestStatus : : DONE ; <nl> } <nl> <nl> - bool withFigures = _request - > parsedValue ( " withStats " , false ) ; <nl> - <nl> + auto flags = Index : : makeFlags ( Index : : Serialize : : Estimates ) ; <nl> + if ( _request - > parsedValue ( " withStats " , false ) ) { <nl> + flags = Index : : makeFlags ( Index : : Serialize : : Estimates , Index : : Serialize : : Figures ) ; <nl> + } <nl> + bool withLinks = _request - > parsedValue ( " withLinks " , false ) ; <nl> + <nl> VPackBuilder indexes ; <nl> - Result res = methods : : Indexes : : getAll ( coll , withFigures , indexes ) ; <nl> + Result res = methods : : Indexes : : getAll ( coll , flags , withLinks , indexes ) ; <nl> if ( ! res . ok ( ) ) { <nl> generateError ( rest : : ResponseCode : : BAD , res . errorNumber ( ) , <nl> res . errorMessage ( ) ) ; <nl> mmm a / arangod / RocksDBEngine / RocksDBCollection . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBCollection . cpp <nl> std : : shared_ptr < Index > RocksDBCollection : : createIndex ( <nl> { " path " , " statusString " } , true , / * forPersistence * / true ) ; <nl> VPackBuilder indexInfo ; <nl> <nl> - idx - > toVelocyPack ( indexInfo , Index : : SERIALIZE_OBJECTID ) ; <nl> + idx - > toVelocyPack ( indexInfo , Index : : makeFlags ( Index : : Serialize : : ObjectId ) ) ; <nl> res = static_cast < RocksDBEngine * > ( engine ) - > writeCreateCollectionMarker ( <nl> _logicalCollection . vocbase ( ) . id ( ) , <nl> _logicalCollection . id ( ) , <nl> int RocksDBCollection : : restoreIndex ( transaction : : Methods * trx , <nl> { " path " , " statusString " } , true , / * forPersistence * / true ) ; <nl> VPackBuilder indexInfo ; <nl> <nl> - newIdx - > toVelocyPack ( indexInfo , Index : : SERIALIZE_OBJECTID ) ; <nl> + newIdx - > toVelocyPack ( indexInfo , Index : : makeFlags ( Index : : Serialize : : ObjectId ) ) ; <nl> <nl> RocksDBEngine * engine = <nl> static_cast < RocksDBEngine * > ( EngineSelectorFeature : : ENGINE ) ; <nl> mmm a / arangod / RocksDBEngine / RocksDBEdgeIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBEdgeIndex . cpp <nl> double RocksDBEdgeIndex : : selectivityEstimate ( <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void RocksDBEdgeIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBEdgeIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> RocksDBIndex : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( <nl> mmm a / arangod / RocksDBEngine / RocksDBEdgeIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBEdgeIndex . h <nl> class RocksDBEdgeIndex final : public RocksDBIndex { <nl> RocksDBCuckooIndexEstimator < uint64_t > * estimator ( ) override ; <nl> bool needToPersistEstimate ( ) const override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> void batchInsert ( <nl> transaction : : Methods * , <nl> mmm a / arangod / RocksDBEngine / RocksDBFulltextIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBFulltextIndex . cpp <nl> RocksDBFulltextIndex : : RocksDBFulltextIndex ( <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void RocksDBFulltextIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBFulltextIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> RocksDBIndex : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( <nl> mmm a / arangod / RocksDBEngine / RocksDBFulltextIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBFulltextIndex . h <nl> class RocksDBFulltextIndex final : public RocksDBIndex { <nl> <nl> bool hasSelectivityEstimate ( ) const override { return false ; } <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> bool matchesDefinition ( VPackSlice const & ) const override ; <nl> <nl> mmm a / arangod / RocksDBEngine / RocksDBGeoIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBGeoIndex . cpp <nl> RocksDBGeoIndex : : RocksDBGeoIndex ( <nl> } <nl> <nl> / / / @ brief return a JSON representation of the index <nl> - void RocksDBGeoIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBGeoIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags ) const { <nl> TRI_ASSERT ( _variant ! = geo_index : : Index : : Variant : : NONE ) ; <nl> builder . openObject ( ) ; <nl> RocksDBIndex : : toVelocyPack ( builder , flags ) ; <nl> mmm a / arangod / RocksDBEngine / RocksDBGeoIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBGeoIndex . h <nl> class RocksDBGeoIndex final : public RocksDBIndex , public geo_index : : Index { <nl> <nl> bool hasSelectivityEstimate ( ) const override { return false ; } <nl> <nl> - void toVelocyPack ( velocypack : : Builder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( velocypack : : Builder & , <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type ) const override ; <nl> <nl> bool matchesDefinition ( velocypack : : Slice const & info ) const override ; <nl> <nl> mmm a / arangod / RocksDBEngine / RocksDBIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBIndex . cpp <nl> void RocksDBIndex : : unload ( ) { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void RocksDBIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> - if ( flags & Index : : SERIALIZE_OBJECTID ) { <nl> + if ( Index : : hasFlag ( flags , Index : : Serialize : : ObjectId ) ) { <nl> / / If we store it , it cannot be 0 <nl> TRI_ASSERT ( _objectId ! = 0 ) ; <nl> builder . add ( " objectId " , VPackValue ( std : : to_string ( _objectId ) ) ) ; <nl> mmm a / arangod / RocksDBEngine / RocksDBIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBIndex . h <nl> class RocksDBIndex : public Index { <nl> void toVelocyPackFigures ( VPackBuilder & builder ) const override ; <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void toVelocyPack ( velocypack : : Builder & builder , unsigned flags ) const override ; <nl> + void toVelocyPack ( velocypack : : Builder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> uint64_t objectId ( ) const { return _objectId ; } <nl> <nl> mmm a / arangod / RocksDBEngine / RocksDBPrimaryIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBPrimaryIndex . cpp <nl> void RocksDBPrimaryIndex : : load ( ) { <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void RocksDBPrimaryIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBPrimaryIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> RocksDBIndex : : toVelocyPack ( builder , flags ) ; <nl> / / hard - coded <nl> mmm a / arangod / RocksDBEngine / RocksDBPrimaryIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBPrimaryIndex . h <nl> class RocksDBPrimaryIndex final : public RocksDBIndex { <nl> <nl> void load ( ) override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> LocalDocumentId lookupKey ( transaction : : Methods * trx , <nl> arangodb : : StringRef key ) const ; <nl> mmm a / arangod / RocksDBEngine / RocksDBVPackIndex . cpp <nl> ppp b / arangod / RocksDBEngine / RocksDBVPackIndex . cpp <nl> double RocksDBVPackIndex : : selectivityEstimate ( <nl> } <nl> <nl> / / / @ brief return a VelocyPack representation of the index <nl> - void RocksDBVPackIndex : : toVelocyPack ( VPackBuilder & builder , unsigned flags ) const { <nl> + void RocksDBVPackIndex : : toVelocyPack ( VPackBuilder & builder , <nl> + std : : underlying_type < Serialize > : : type flags ) const { <nl> builder . openObject ( ) ; <nl> RocksDBIndex : : toVelocyPack ( builder , flags ) ; <nl> builder . add ( <nl> mmm a / arangod / RocksDBEngine / RocksDBVPackIndex . h <nl> ppp b / arangod / RocksDBEngine / RocksDBVPackIndex . h <nl> class RocksDBVPackIndex : public RocksDBIndex { <nl> RocksDBCuckooIndexEstimator < uint64_t > * estimator ( ) override ; <nl> bool needToPersistEstimate ( ) const override ; <nl> <nl> - void toVelocyPack ( VPackBuilder & , unsigned flags ) const override ; <nl> + void toVelocyPack ( VPackBuilder & , <nl> + std : : underlying_type < Index : : Serialize > : : type ) const override ; <nl> <nl> bool canBeDropped ( ) const override { return true ; } <nl> <nl> mmm a / arangod / Transaction / Methods . cpp <nl> ppp b / arangod / Transaction / Methods . cpp <nl> std : : shared_ptr < arangodb : : Index > transaction : : Methods : : IndexHandle : : getIndex ( ) <nl> <nl> / / / @ brief IndexHandle toVelocyPack method passthrough <nl> void transaction : : Methods : : IndexHandle : : toVelocyPack ( <nl> - arangodb : : velocypack : : Builder & builder , unsigned flags ) const { <nl> + arangodb : : velocypack : : Builder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const { <nl> _index - > toVelocyPack ( builder , flags ) ; <nl> } <nl> <nl> mmm a / arangod / Transaction / Methods . h <nl> ppp b / arangod / Transaction / Methods . h <nl> class Methods { <nl> std : : shared_ptr < arangodb : : Index > _index ; <nl> public : <nl> IndexHandle ( ) = default ; <nl> - void toVelocyPack ( arangodb : : velocypack : : Builder & builder , unsigned flags ) const ; <nl> + void toVelocyPack ( arangodb : : velocypack : : Builder & builder , <nl> + std : : underlying_type < Index : : Serialize > : : type flags ) const ; <nl> bool operator = = ( IndexHandle const & other ) const { <nl> return other . _index . get ( ) = = _index . get ( ) ; <nl> } <nl> mmm a / arangod / V8Server / v8 - vocindex . cpp <nl> ppp b / arangod / V8Server / v8 - vocindex . cpp <nl> static void JS_GetIndexesVocbaseCol ( <nl> TRI_V8_THROW_EXCEPTION_INTERNAL ( " cannot extract collection " ) ; <nl> } <nl> <nl> - bool withFigures = false ; <nl> - if ( args . Length ( ) > 0 ) { <nl> - withFigures = TRI_ObjectToBoolean ( args [ 0 ] ) ; <nl> + auto flags = Index : : makeFlags ( Index : : Serialize : : Estimates ) ; <nl> + if ( args . Length ( ) > 0 & & TRI_ObjectToBoolean ( args [ 0 ] ) ) { <nl> + flags = Index : : makeFlags ( Index : : Serialize : : Estimates , Index : : Serialize : : Figures ) ; <nl> + } <nl> + bool withLinks = false ; <nl> + if ( args . Length ( ) > 1 ) { <nl> + withLinks = TRI_ObjectToBoolean ( args [ 1 ] ) ; <nl> } <nl> <nl> VPackBuilder output ; <nl> - Result res = methods : : Indexes : : getAll ( collection , withFigures , output ) ; <nl> + Result res = methods : : Indexes : : getAll ( collection , flags , withLinks , output ) ; <nl> if ( res . fail ( ) ) { <nl> TRI_V8_THROW_EXCEPTION ( res ) ; <nl> } <nl> mmm a / arangod / VocBase / LogicalCollection . cpp <nl> ppp b / arangod / VocBase / LogicalCollection . cpp <nl> LogicalCollection : : getIndexes ( ) const { <nl> return getPhysical ( ) - > getIndexes ( ) ; <nl> } <nl> <nl> - void LogicalCollection : : getIndexesVPack ( VPackBuilder & result , unsigned flags , <nl> + void LogicalCollection : : getIndexesVPack ( VPackBuilder & result , <nl> + std : : underlying_type < Index : : Serialize > : : type flags , <nl> std : : function < bool ( arangodb : : Index const * ) > const & filter ) const { <nl> getPhysical ( ) - > getIndexesVPack ( result , flags , filter ) ; <nl> } <nl> void LogicalCollection : : toVelocyPackForClusterInventory ( VPackBuilder & result , <nl> } <nl> <nl> result . add ( VPackValue ( " indexes " ) ) ; <nl> - getIndexesVPack ( result , Index : : SERIALIZE_BASICS ) ; <nl> + getIndexesVPack ( result , Index : : makeFlags ( ) ) ; <nl> result . add ( " planVersion " , VPackValue ( planVersion ( ) ) ) ; <nl> result . add ( " isReady " , VPackValue ( isReady ) ) ; <nl> result . add ( " allInSync " , VPackValue ( allInSync ) ) ; <nl> arangodb : : Result LogicalCollection : : appendVelocyPack ( <nl> <nl> / / Indexes <nl> result . add ( VPackValue ( " indexes " ) ) ; <nl> - unsigned flags = Index : : SERIALIZE_BASICS ; <nl> + auto flags = Index : : makeFlags ( ) ; <nl> if ( forPersistence ) { <nl> - flags | = Index : : SERIALIZE_OBJECTID ; <nl> + flags = Index : : makeFlags ( Index : : Serialize : : ObjectId ) ; <nl> } <nl> getIndexesVPack ( result , flags ) ; <nl> <nl> mmm a / arangod / VocBase / LogicalCollection . h <nl> ppp b / arangod / VocBase / LogicalCollection . h <nl> class LogicalCollection : public LogicalDataSource { <nl> <nl> std : : vector < std : : shared_ptr < Index > > getIndexes ( ) const ; <nl> <nl> - void getIndexesVPack ( velocypack : : Builder & , unsigned flags , <nl> + void getIndexesVPack ( velocypack : : Builder & , uint8_t , <nl> std : : function < bool ( arangodb : : Index const * ) > const & filter = <nl> [ ] ( arangodb : : Index const * ) - > bool { return true ; } ) const ; <nl> <nl> mmm a / arangod / VocBase / Methods / Indexes . cpp <nl> ppp b / arangod / VocBase / Methods / Indexes . cpp <nl> Result Indexes : : getIndex ( LogicalCollection const * collection , <nl> return Result ( TRI_ERROR_ARANGO_INDEX_NOT_FOUND ) ; <nl> } <nl> <nl> + <nl> VPackBuilder tmp ; <nl> - Result res = Indexes : : getAll ( collection , false , tmp ) ; <nl> + Result res = Indexes : : getAll ( collection , Index : : makeFlags ( ) , false , tmp ) ; <nl> if ( res . ok ( ) ) { <nl> for ( VPackSlice const & index : VPackArrayIterator ( tmp . slice ( ) ) ) { <nl> if ( index . get ( " id " ) . compareString ( name ) = = 0 ) { <nl> Result Indexes : : getIndex ( LogicalCollection const * collection , <nl> return Result ( TRI_ERROR_ARANGO_INDEX_NOT_FOUND ) ; <nl> } <nl> <nl> + / / / @ brief get all indexes , skips view links <nl> arangodb : : Result Indexes : : getAll ( LogicalCollection const * collection , <nl> - bool withFigures , VPackBuilder & result ) { <nl> - <nl> - unsigned flags = Index : : SERIALIZE_ESTIMATES ; <nl> - if ( withFigures ) { <nl> - flags | = Index : : SERIALIZE_FIGURES ; <nl> - } <nl> + std : : underlying_type < Index : : Serialize > : : type flags , <nl> + bool withLinks , <nl> + VPackBuilder & result ) { <nl> VPackBuilder tmp ; <nl> if ( ServerState : : instance ( ) - > isCoordinator ( ) ) { <nl> TRI_ASSERT ( collection ) ; <nl> arangodb : : Result Indexes : : getAll ( LogicalCollection const * collection , <nl> <nl> VPackBuilder tmpInner ; <nl> auto c = ClusterInfo : : instance ( ) - > getCollection ( databaseName , cid ) ; <nl> + # ifdef USE_IRESEARCH <nl> + c - > getIndexesVPack ( tmpInner , flags , [ withLinks ] ( arangodb : : Index const * idx ) { <nl> + return withLinks | | idx - > type ( ) ! = Index : : TRI_IDX_TYPE_IRESEARCH_LINK ; <nl> + } ) ; <nl> + # else <nl> c - > getIndexesVPack ( tmpInner , flags ) ; <nl> + # endif <nl> <nl> tmp . openArray ( ) ; <nl> for ( VPackSlice const & s : VPackArrayIterator ( tmpInner . slice ( ) ) ) { <nl> arangodb : : Result Indexes : : getAll ( LogicalCollection const * collection , <nl> auto indexes = collection - > getIndexes ( ) ; <nl> <nl> tmp . openArray ( true ) ; <nl> - <nl> for ( std : : shared_ptr < arangodb : : Index > const & idx : indexes ) { <nl> + # ifdef USE_IRESEARCH <nl> + if ( withLinks & & idx - > type ( ) = = Index : : TRI_IDX_TYPE_IRESEARCH_LINK ) { <nl> + continue ; <nl> + } <nl> + # endif <nl> idx - > toVelocyPack ( tmp , flags ) ; <nl> } <nl> tmp . close ( ) ; <nl> arangodb : : Result Indexes : : getAll ( LogicalCollection const * collection , <nl> merge . close ( ) ; <nl> <nl> merge . add ( " selectivityEstimate " , VPackValue ( selectivity / 2 ) ) ; <nl> - if ( withFigures ) { <nl> + if ( Index : : hasFlag ( flags , Index : : Serialize : : Figures ) ) { <nl> merge . add ( " figures " , VPackValue ( VPackValueType : : Object ) ) ; <nl> merge . add ( " memory " , VPackValue ( memory ) ) ; <nl> if ( useCache ) { <nl> static Result EnsureIndexLocal ( arangodb : : LogicalCollection * collection , <nl> <nl> VPackBuilder tmp ; <nl> try { <nl> - idx - > toVelocyPack ( tmp , Index : : SERIALIZE_ESTIMATES ) ; <nl> + idx - > toVelocyPack ( tmp , Index : : makeFlags ( Index : : Serialize : : Estimates ) ) ; <nl> } catch ( . . . ) { <nl> return Result ( TRI_ERROR_OUT_OF_MEMORY ) ; <nl> } <nl> mmm a / arangod / VocBase / Methods / Indexes . h <nl> ppp b / arangod / VocBase / Methods / Indexes . h <nl> struct Indexes { <nl> velocypack : : Slice const & indexId , <nl> velocypack : : Builder & ) ; <nl> <nl> + / / / @ brief get all indexes , skips view links <nl> static arangodb : : Result getAll ( LogicalCollection const * collection , <nl> - bool withFigures , <nl> + std : : underlying_type < Index : : Serialize > : : type , <nl> + bool skipLinks , <nl> arangodb : : velocypack : : Builder & ) ; <nl> <nl> static arangodb : : Result createIndex ( LogicalCollection * , Index : : IndexType , <nl> mmm a / arangod / VocBase / Methods / UpgradeTasks . cpp <nl> ppp b / arangod / VocBase / Methods / UpgradeTasks . cpp <nl> arangodb : : Result recreateGeoIndex ( TRI_vocbase_t & vocbase , <nl> TRI_idx_iid_t iid = oldIndex - > id ( ) ; <nl> <nl> VPackBuilder oldDesc ; <nl> - oldIndex - > toVelocyPack ( oldDesc , Index : : SERIALIZE_BASICS ) ; <nl> + oldIndex - > toVelocyPack ( oldDesc , Index : : makeFlags ( ) ) ; <nl> VPackBuilder overw ; <nl> <nl> overw . openObject ( ) ; <nl> mmm a / arangod / VocBase / vocbase . cpp <nl> ppp b / arangod / VocBase / vocbase . cpp <nl> void TRI_vocbase_t : : inventory ( <nl> result . openObject ( ) ; <nl> <nl> result . add ( VPackValue ( " indexes " ) ) ; <nl> - collection - > getIndexesVPack ( result , Index : : SERIALIZE_BASICS , [ ] ( arangodb : : Index const * idx ) { <nl> + collection - > getIndexesVPack ( result , Index : : makeFlags ( ) , [ ] ( arangodb : : Index const * idx ) { <nl> / / we have to exclude the primary and the edge index here , because otherwise <nl> / / at least the MMFiles engine will try to create it <nl> return ( idx - > type ( ) ! = arangodb : : Index : : TRI_IDX_TYPE_PRIMARY_INDEX & & <nl> mmm a / js / client / modules / @ arangodb / arango - collection . js <nl> ppp b / js / client / modules / @ arangodb / arango - collection . js <nl> ArangoCollection . prototype . refresh = function ( ) { <nl> / / / @ brief gets all indexes <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - ArangoCollection . prototype . getIndexes = ArangoCollection . prototype . indexes = function ( withStats ) { <nl> - var requestResult = this . _database . _connection . GET ( this . _indexurl ( ) + <nl> - ' & withStats = ' + ( withStats | | false ) ) ; <nl> + ArangoCollection . prototype . getIndexes = ArangoCollection . prototype . indexes = function ( withStats , withLinks ) { <nl> + let url = this . _indexurl ( ) + ' & withStats = ' + ( withStats | | false ) ; <nl> + if ( withLinks ) { <nl> + url + = ' & withLinks = true ' ; <nl> + } <nl> + var requestResult = this . _database . _connection . GET ( url ) ; <nl> <nl> arangosh . checkRequestResult ( requestResult ) ; <nl> <nl> mmm a / lib / ProgramOptions / ProgramOptions . cpp <nl> ppp b / lib / ProgramOptions / ProgramOptions . cpp <nl> std : : vector < std : : string > ProgramOptions : : similar ( std : : string const & value , int c <nl> / / additionally add all options that have the search string as part <nl> / / of their name <nl> walk ( <nl> - [ this , & value , & result ] ( Section const & , Option const & option ) { <nl> + [ & value , & result ] ( Section const & , Option const & option ) { <nl> if ( option . fullName ( ) . find ( value ) ! = std : : string : : npos ) { <nl> result . emplace_back ( option . displayName ( ) ) ; <nl> } <nl> mmm a / tests / IResearch / IResearchLink - test . cpp <nl> ppp b / tests / IResearch / IResearchLink - test . cpp <nl> SECTION ( " test_defaults " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> - auto builder = link - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = link - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> std : : string error ; <nl> <nl> CHECK ( ( actualMeta . init ( builder - > slice ( ) , error ) & & expectedMeta = = actualMeta ) ) ; <nl> SECTION ( " test_defaults " ) { <nl> { <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> - auto builder = link - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = link - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> std : : string error ; <nl> <nl> CHECK ( ( actualMeta . init ( builder - > slice ( ) , error ) & & expectedMeta = = actualMeta ) ) ; <nl> SECTION ( " test_defaults " ) { <nl> / / ensure jSON is still valid after unload ( ) <nl> { <nl> link - > unload ( ) ; <nl> - auto builder = link - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = link - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> auto slice = builder - > slice ( ) ; <nl> CHECK ( ( <nl> slice . hasKey ( " view " ) <nl> mmm a / tests / IResearch / IResearchLinkCoordinator - test . cpp <nl> ppp b / tests / IResearch / IResearchLinkCoordinator - test . cpp <nl> SECTION ( " test_create_drop " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_create_drop " ) { <nl> { <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> std : : string error ; <nl> <nl> CHECK ( ( actualMeta . init ( builder - > slice ( ) , error ) & & expectedMeta = = actualMeta ) ) ; <nl> SECTION ( " test_create_drop " ) { <nl> { <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> std : : string error ; <nl> <nl> CHECK ( ( actualMeta . init ( builder - > slice ( ) , error ) & & expectedMeta = = actualMeta ) ) ; <nl> SECTION ( " test_create_drop " ) { <nl> / / ensure jSON is still valid after unload ( ) <nl> { <nl> index - > unload ( ) ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> auto slice = builder - > slice ( ) ; <nl> CHECK ( ( <nl> slice . hasKey ( " view " ) <nl> mmm a / tests / IResearch / IResearchViewCoordinator - test . cpp <nl> ppp b / tests / IResearch / IResearchViewCoordinator - test . cpp <nl> SECTION ( " test_update_links_partial_remove " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_remove " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _trackListPositions = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_remove " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_remove " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_remove " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_add " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_add " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_add " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_add " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _trackListPositions = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_partial_add " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_replace " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_replace " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_replace " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _trackListPositions = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_replace " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_clear " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_clear " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _trackListPositions = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_update_links_clear " ) { <nl> <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " test_drop_link " ) { <nl> arangodb : : iresearch : : IResearchLinkMeta expectedMeta ; <nl> expectedMeta . _includeAllFields = true ; <nl> arangodb : : iresearch : : IResearchLinkMeta actualMeta ; <nl> - auto builder = index - > toVelocyPack ( arangodb : : Index : : SERIALIZE_FIGURES ) ; <nl> + auto builder = index - > toVelocyPack ( arangodb : : Index : : makeFlags ( arangodb : : Index : : Serialize : : Figures ) ) ; <nl> <nl> error . clear ( ) ; <nl> CHECK ( actualMeta . init ( builder - > slice ( ) , error ) ) ; <nl> SECTION ( " IResearchViewNode : : createBlock " ) { <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - END - OF - FILE <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> \ No newline at end of file <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> mmm a / tests / IResearch / StorageEngineMock . cpp <nl> ppp b / tests / IResearch / StorageEngineMock . cpp <nl> class EdgeIndexMock final : public arangodb : : Index { <nl> <nl> void toVelocyPack ( <nl> VPackBuilder & builder , <nl> - unsigned flags <nl> + std : : underlying_type < arangodb : : Index : : Serialize > : : type flags <nl> ) const override { <nl> builder . openObject ( ) ; <nl> Index : : toVelocyPack ( builder , flags ) ; <nl> bool TransactionStateMock : : hasFailedOperations ( ) const { <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - END - OF - FILE <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> \ No newline at end of file <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> mmm a / tests / js / common / aql / aql - view - arangosearch - ddl - cluster . js <nl> ppp b / tests / js / common / aql / aql - view - arangosearch - ddl - cluster . js <nl> function IResearchFeatureDDLTestSuite ( ) { <nl> let properties = view . properties ( ) ; <nl> assertTrue ( Object = = = properties . links . constructor ) ; <nl> assertEqual ( 1 , Object . keys ( properties . links ) . length ) ; <nl> - var indexes = db . TestCollection0 . getIndexes ( ) ; <nl> + var indexes = db . TestCollection0 . getIndexes ( false , true ) ; <nl> assertEqual ( 2 , indexes . length ) ; <nl> var link = indexes [ 1 ] ; <nl> assertEqual ( " primary " , indexes [ 0 ] . type ) ; <nl> function IResearchFeatureDDLTestSuite ( ) { <nl> assertEqual ( " arangosearch " , link . type ) ; <nl> db . _dropView ( " TestView " ) ; <nl> assertEqual ( null , db . _view ( " TestView " ) ) ; <nl> - assertEqual ( 1 , db . TestCollection0 . getIndexes ( ) . length ) ; <nl> + assertEqual ( 1 , db . TestCollection0 . getIndexes ( false , true ) . length ) ; <nl> } <nl> } , <nl> <nl> function IResearchFeatureDDLTestSuite ( ) { <nl> let properties = view . properties ( ) ; <nl> assertTrue ( Object = = = properties . links . constructor ) ; <nl> assertEqual ( 1 , Object . keys ( properties . links ) . length ) ; <nl> - var indexes = db . TestCollection0 . getIndexes ( ) ; <nl> + var indexes = db . TestCollection0 . getIndexes ( false , true ) ; <nl> assertEqual ( 2 , indexes . length ) ; <nl> var link = indexes [ 1 ] ; <nl> assertEqual ( " primary " , indexes [ 0 ] . type ) ; <nl> function IResearchFeatureDDLTestSuite ( ) { <nl> properties = view . properties ( ) ; <nl> assertTrue ( Object = = = properties . links . constructor ) ; <nl> assertEqual ( 0 , Object . keys ( properties . links ) . length ) ; <nl> - assertEqual ( 1 , db . TestCollection0 . getIndexes ( ) . length ) ; <nl> + assertEqual ( 1 , db . TestCollection0 . getIndexes ( false , true ) . length ) ; <nl> } <nl> } , <nl> <nl>
Hide Links from getIndexes ( ) ( )
arangodb/arangodb
0661a4c1fea9651dd1966567c77422769ca1068b
2018-09-03T13:17:24Z
mmm a / src / clustering / administration / persist / migrate / migrate_v1_16 . cc <nl> ppp b / src / clustering / administration / persist / migrate / migrate_v1_16 . cc <nl> cluster_version_t auth_superblock_version ( const auth_metadata_superblock_t * sb ) <nl> struct regioned_version_t { <nl> regioned_version_t ( const region_t & r , const : : version_t & v ) : <nl> region ( r ) , version ( v ) { } <nl> - const region_t region ; <nl> - const : : version_t version ; <nl> + region_t region ; <nl> + : : version_t version ; <nl> } ; <nl> <nl> bool operator < ( const regioned_version_t & a , const regioned_version_t & b ) { <nl> void migrate_databases ( const metadata_v1_16 : : cluster_semilattice_metadata_t & met <nl> <nl> : : branch_history_t migrate_branch_ids ( <nl> const namespace_id_t & table_id , <nl> - std : : set < regioned_version_t > seen_versions , <nl> + const std : : vector < regioned_version_t > & table_versions , <nl> const metadata_v1_16 : : branch_history_t & branch_history , <nl> metadata_file_t : : write_txn_t * out , <nl> signal_t * interruptor ) { <nl> branch_history_t result ; <nl> - std : : deque < regioned_version_t > versions_to_save ( seen_versions . begin ( ) , seen_versions . end ( ) ) ; <nl> + std : : set < branch_id_t > seen_branches { nil_uuid ( ) } ; <nl> + std : : deque < branch_id_t > branches_to_save ; <nl> <nl> - while ( ! versions_to_save . empty ( ) ) { <nl> - auto const & regioned_version = versions_to_save . front ( ) ; <nl> - auto const branch_it = branch_history . branches . find ( regioned_version . version . branch ) ; <nl> - branch_birth_certificate_t new_birth_certificate ; <nl> + for ( auto const & rv : table_versions ) { <nl> + auto const branch_it = branch_history . branches . find ( rv . version . branch ) ; <nl> <nl> / / If we don ' t find the branch , we assume that it is referencing a dummy branch <nl> / / that we created to replace an incoherent version_range_t . In this case , we <nl> : : branch_history_t migrate_branch_ids ( <nl> / / the table and a more - recent coherent replica is found . At that point the <nl> / / incoherent data shall be erased and backfilled from the coherent replica . <nl> if ( branch_it = = branch_history . branches . end ( ) ) { <nl> - guarantee ( regioned_version . region ! = region_t : : empty ( ) ) ; <nl> + branch_birth_certificate_t new_birth_certificate ; <nl> new_birth_certificate . initial_timestamp = <nl> version_t : : zero ( ) . timestamp ; <nl> - new_birth_certificate . origin . update ( regioned_version . region , <nl> - version_t : : zero ( ) ) ; <nl> - } else { <nl> - new_birth_certificate . initial_timestamp = <nl> - branch_it - > second . initial_timestamp ; <nl> new_birth_certificate . origin = <nl> - branch_it - > second . origin . map ( branch_it - > second . region , <nl> - [ & ] ( const metadata_v1_16 : : version_range_t & v ) - > : : version_t { <nl> - : : version_t res ( v . earliest . branch , v . earliest . timestamp ) ; <nl> - regioned_version_t regioned_res ( region_t : : empty ( ) , res ) ; <nl> - guarantee ( v . is_coherent ( ) ) ; <nl> - if ( ! res . branch . is_nil ( ) & & seen_versions . count ( regioned_res ) = = 0 ) { <nl> - seen_versions . insert ( regioned_res ) ; <nl> - versions_to_save . push_back ( regioned_res ) ; <nl> - } <nl> - return res ; <nl> - } ) ; <nl> + region_map_t < version_t > ( rv . region , version_t : : zero ( ) ) ; <nl> + <nl> + result . branches . insert ( std : : make_pair ( rv . version . branch , <nl> + new_birth_certificate ) ) ; <nl> + <nl> + out - > write ( mdprefix_branch_birth_certificate ( ) . suffix ( <nl> + uuid_to_str ( table_id ) + " / " + <nl> + uuid_to_str ( rv . version . branch ) ) , <nl> + new_birth_certificate , interruptor ) ; <nl> + } else if ( seen_branches . count ( rv . version . branch ) = = 0 ) { <nl> + seen_branches . insert ( rv . version . branch ) ; <nl> + branches_to_save . push_back ( rv . version . branch ) ; <nl> } <nl> + } <nl> + <nl> + while ( ! branches_to_save . empty ( ) ) { <nl> + auto const branch_it = branch_history . branches . find ( branches_to_save . front ( ) ) ; <nl> + guarantee ( branch_it ! = branch_history . branches . end ( ) ) ; <nl> + branches_to_save . pop_front ( ) ; <nl> <nl> - result . branches . insert ( std : : make_pair ( regioned_version . version . branch , new_birth_certificate ) ) ; <nl> + branch_birth_certificate_t new_birth_certificate ; <nl> + <nl> + new_birth_certificate . initial_timestamp = branch_it - > second . initial_timestamp ; <nl> + new_birth_certificate . origin = <nl> + branch_it - > second . origin . map ( branch_it - > second . region , <nl> + [ & ] ( const metadata_v1_16 : : version_range_t & v ) - > : : version_t { <nl> + : : version_t res ( v . earliest . branch , v . earliest . timestamp ) ; <nl> + guarantee ( v . is_coherent ( ) ) ; <nl> + if ( seen_branches . count ( res . branch ) = = 0 ) { <nl> + seen_branches . insert ( res . branch ) ; <nl> + branches_to_save . push_back ( res . branch ) ; <nl> + } <nl> + return res ; <nl> + } ) ; <nl> + <nl> + result . branches . insert ( std : : make_pair ( branch_it - > first , new_birth_certificate ) ) ; <nl> <nl> out - > write ( mdprefix_branch_birth_certificate ( ) . suffix ( <nl> - uuid_to_str ( table_id ) + " / " + uuid_to_str ( regioned_version . version . branch ) ) , <nl> + uuid_to_str ( table_id ) + " / " + uuid_to_str ( branch_it - > first ) ) , <nl> new_birth_certificate , interruptor ) ; <nl> - <nl> - versions_to_save . pop_front ( ) ; <nl> } <nl> + <nl> return result ; <nl> } <nl> <nl> multi_table_manager_timestamp_t max_versioned_timestamp ( const versioned_t < Args > <nl> return res ; <nl> } <nl> <nl> + bool is_server_deleted ( const server_id_t & server_id , <nl> + const metadata_v1_16 : : servers_semilattice_metadata_t & servers_metadata ) { <nl> + auto serv_it = servers_metadata . servers . find ( server_id ) ; <nl> + return ( serv_it = = servers_metadata . servers . end ( ) ) | | <nl> + serv_it - > second . is_deleted ( ) ; <nl> + } <nl> + <nl> void migrate_table ( const server_id_t & this_server_id , <nl> const namespace_id_t & table_id , <nl> const metadata_v1_16 : : namespace_semilattice_metadata_t & table_metadata , <nl> void migrate_table ( const server_id_t & this_server_id , <nl> const : : branch_history_t & branch_history , <nl> metadata_file_t : : write_txn_t * out , <nl> signal_t * interruptor ) { <nl> - const metadata_v1_16 : : table_replication_info_t & old_config = table_metadata . replication_info . get_ref ( ) ; <nl> + metadata_v1_16 : : table_replication_info_t old_config = table_metadata . replication_info . get_ref ( ) ; <nl> <nl> table_config_and_shards_t config ; <nl> config . config . basic . name = table_metadata . name . get_ref ( ) ; <nl> void migrate_table ( const server_id_t & this_server_id , <nl> config . config . durability = old_config . config . durability ; <nl> config . shard_scheme . split_points = old_config . shard_scheme . split_points ; <nl> <nl> + / / Scan the servers in the old shard config - need to remove deleted and nil servers <nl> + for ( size_t i = 0 ; i < old_config . config . shards . size ( ) ; + + i ) { <nl> + metadata_v1_16 : : table_config_t : : shard_t & s = old_config . config . shards [ i ] ; <nl> + std : : set < server_id_t > replicas_copy = s . replicas ; <nl> + for ( auto const & serv : replicas_copy ) { <nl> + if ( is_server_deleted ( serv , servers_metadata ) ) { <nl> + s . replicas . erase ( serv ) ; <nl> + } <nl> + } <nl> + if ( is_server_deleted ( s . primary_replica , servers_metadata ) ) { <nl> + if ( s . replicas . empty ( ) ) { <nl> + logWRN ( " Table % s has no replicas for the region % s \ n " , <nl> + uuid_to_str ( table_id ) . c_str ( ) , <nl> + old_config . shard_scheme . get_shard_range ( i ) . print ( ) . c_str ( ) ) ; <nl> + s . replicas . insert ( s . primary_replica ) ; <nl> + } else { <nl> + s . primary_replica = * s . replicas . begin ( ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> std : : set < server_id_t > used_servers ; <nl> for ( auto const & s : old_config . config . shards ) { <nl> : : table_config_t : : shard_t new_shard ; <nl> void migrate_table ( const server_id_t & this_server_id , <nl> if ( serv_it ! = servers_metadata . servers . end ( ) & & ! serv_it - > second . is_deleted ( ) ) { <nl> config . server_names . names . insert ( std : : make_pair ( <nl> serv_id , std : : make_pair ( 1 , serv_it - > second . get_ref ( ) . name . get_ref ( ) ) ) ) ; <nl> + } else { <nl> + config . server_names . names . insert ( std : : make_pair ( <nl> + serv_id , <nl> + std : : make_pair ( 1 , name_string_t : : guarantee_valid ( " __deleted_server__ " ) ) ) ) ; <nl> } <nl> } <nl> <nl> void migrate_tables ( io_backender_t * io_backender , <nl> std : : vector < serializer_t * > underlying ( { & merger_serializer } ) ; <nl> serializer_multiplexer_t multiplexer ( underlying ) ; <nl> <nl> - std : : set < regioned_version_t > seen_versions ; <nl> + std : : vector < regioned_version_t > table_versions ; <nl> std : : map < std : : string , std : : pair < sindex_config_t , sindex_status_t > > sindex_list ; <nl> <nl> pmap ( CPU_SHARDING_FACTOR , [ & ] ( int index ) { <nl> void migrate_tables ( io_backender_t * io_backender , <nl> if ( ! v . is_coherent ( ) ) { <nl> / / Create a dummy branch that will be assigned a birth <nl> / / certificate off of version_t : : zero <nl> - res = : : version_t ( generate_uuid ( ) , v . latest . timestamp ) ; <nl> + res = : : version_t ( generate_uuid ( ) , <nl> + state_timestamp_t : : zero ( ) ) ; <nl> } <nl> if ( ! res . branch . is_nil ( ) ) { <nl> - seen_versions . insert ( regioned_version_t ( r , res ) ) ; <nl> + table_versions . push_back ( regioned_version_t ( r , res ) ) ; <nl> } <nl> return binary_blob_t : : make < version_t > ( res ) ; <nl> } , interruptor ) ; <nl> void migrate_tables ( io_backender_t * io_backender , <nl> interruptor ) = = cluster_version_t : : v2_1 ) ; <nl> } ) ; <nl> <nl> - debugf ( " migrating % zu branch ids \ n " , seen_versions . size ( ) ) ; <nl> branch_history_t new_branch_history = <nl> migrate_branch_ids ( info . first , <nl> - std : : move ( seen_versions ) , <nl> + table_versions , <nl> old_branch_history , <nl> out , <nl> interruptor ) ; <nl>
handling corner cases in table migration
rethinkdb/rethinkdb
a381f5427985673f29535bf8d87d58cfef9bbcbd
2015-08-11T04:41:16Z
mmm a / docs / source / rpc . rst <nl> ppp b / docs / source / rpc . rst <nl> This library provides primitives allowing users to create and modify references <nl> . . autofunction : : rpc_async <nl> . . autofunction : : remote <nl> . . autofunction : : get_worker_info <nl> - . . autofunction : : join_rpc <nl> + . . autofunction : : wait_all_workers <nl> <nl> Distributed Autograd Framework <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl>
Update API doc for wait_all_workers after rename
pytorch/pytorch
2803261a233cd80e7ab380b599ce91bb82de081d
2019-11-21T00:12:30Z
mmm a / test / onnx / test_pytorch_onnx_onnxruntime . py <nl> ppp b / test / onnx / test_pytorch_onnx_onnxruntime . py <nl> def test_maxpool ( self ) : <nl> x = torch . randn ( 20 , 16 , 50 ) <nl> self . run_test ( model , x ) <nl> <nl> + def test_conv ( self ) : <nl> + class TraceModel ( torch . nn . Module ) : <nl> + def __init__ ( self ) : <nl> + super ( TraceModel , self ) . __init__ ( ) <nl> + self . conv1 = torch . nn . Conv1d ( 16 , 33 , 3 , stride = 2 ) <nl> + self . conv2 = torch . nn . Conv2d ( 16 , 33 , ( 3 , 5 ) , stride = ( 2 , 1 ) , padding = ( 4 , 2 ) , dilation = ( 3 , 1 ) ) <nl> + self . conv3 = torch . nn . Conv3d ( 16 , 33 , ( 3 , 5 , 2 ) , stride = ( 2 , 1 , 1 ) , padding = ( 4 , 2 , 0 ) ) <nl> + <nl> + def forward ( self , input1 , input2 , input3 ) : <nl> + return self . conv1 ( input1 ) , self . conv2 ( input2 ) , self . conv3 ( input3 ) <nl> + <nl> + class ScriptModel ( torch . jit . ScriptModule ) : <nl> + def __init__ ( self ) : <nl> + super ( ScriptModel , self ) . __init__ ( ) <nl> + self . conv1 = torch . nn . Conv1d ( 16 , 33 , 3 , stride = 2 ) <nl> + self . conv2 = torch . nn . Conv2d ( 16 , 33 , ( 3 , 5 ) , stride = ( 2 , 1 ) , padding = ( 4 , 2 ) , dilation = ( 3 , 1 ) ) <nl> + self . conv3 = torch . nn . Conv3d ( 16 , 33 , ( 3 , 5 , 2 ) , stride = ( 2 , 1 , 1 ) , padding = ( 4 , 2 , 0 ) ) <nl> + <nl> + @ torch . jit . script_method <nl> + def forward ( self , input1 , input2 , input3 ) : <nl> + return self . conv1 ( input1 ) , self . conv2 ( input2 ) , self . conv3 ( input3 ) <nl> + <nl> + x1 = torch . randn ( 20 , 16 , 50 ) <nl> + x2 = torch . randn ( 20 , 16 , 50 , 100 ) <nl> + x3 = torch . randn ( 20 , 16 , 10 , 50 , 100 ) <nl> + <nl> + self . run_test ( TraceModel ( ) , ( x1 , x2 , x3 ) , atol = 10e - 5 ) <nl> + self . run_test ( ScriptModel ( ) , ( x1 , x2 , x3 ) , atol = 10e - 5 ) <nl> + <nl> + # TODO : Add ConvTranspose1d and ConvTranspose3d when supported in ORT <nl> + # TODO : Add test with dilation ! = 1 when ORT fixed <nl> + def test_conv_transpose ( self ) : <nl> + class TraceModel ( torch . nn . Module ) : <nl> + def __init__ ( self ) : <nl> + super ( TraceModel , self ) . __init__ ( ) <nl> + self . conv2 = torch . nn . ConvTranspose2d ( 16 , 33 , ( 3 , 5 ) , stride = ( 2 , 1 ) , padding = ( 4 , 2 ) , dilation = ( 1 , 1 ) ) <nl> + <nl> + def forward ( self , input2 ) : <nl> + return self . conv2 ( input2 ) <nl> + <nl> + class ScriptModel ( torch . jit . ScriptModule ) : <nl> + def __init__ ( self ) : <nl> + super ( ScriptModel , self ) . __init__ ( ) <nl> + self . conv2 = torch . nn . ConvTranspose2d ( 16 , 33 , ( 3 , 5 ) , stride = ( 2 , 1 ) , padding = ( 4 , 2 ) , dilation = ( 1 , 1 ) ) <nl> + <nl> + @ torch . jit . script_method <nl> + def forward ( self , input2 ) : <nl> + return self . conv2 ( input2 ) <nl> + <nl> + x2 = torch . randn ( 20 , 16 , 50 , 100 ) <nl> + <nl> + self . run_test ( TraceModel ( ) , ( x2 , ) , atol = 10e - 5 ) <nl> + self . run_test ( ScriptModel ( ) , ( x2 , ) , atol = 10e - 5 ) <nl> <nl> def test_squeeze ( self ) : <nl> class Squeeze ( torch . nn . Module ) : <nl> mmm a / torch / onnx / symbolic_opset9 . py <nl> ppp b / torch / onnx / symbolic_opset9 . py <nl> def _convolution ( g , input , weight , bias , stride , padding , dilation , <nl> return n <nl> <nl> <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' ) <nl> + def conv1d ( g , input , weight , bias , stride , padding , dilation , groups ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , False , ( ) , groups , None , None , None ) <nl> + <nl> + <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' ) <nl> + def conv2d ( g , input , weight , bias , stride , padding , dilation , groups ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , False , ( ) , groups , None , None , None ) <nl> + <nl> + <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' ) <nl> + def conv3d ( g , input , weight , bias , stride , padding , dilation , groups ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , False , ( ) , groups , None , None , None ) <nl> + <nl> + <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' , ' is ' ) <nl> + def conv_transpose1d ( g , input , weight , bias , stride , padding , output_padding , groups , dilation ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , True , output_padding , groups , None , None , None ) <nl> + <nl> + <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' , ' is ' ) <nl> + def conv_transpose2d ( g , input , weight , bias , stride , padding , output_padding , groups , dilation ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , True , output_padding , groups , None , None , None ) <nl> + <nl> + <nl> + @ parse_args ( ' v ' , ' v ' , ' v ' , ' is ' , ' is ' , ' is ' , ' i ' , ' is ' ) <nl> + def conv_transpose3d ( g , input , weight , bias , stride , padding , output_padding , groups , dilation ) : <nl> + return _convolution ( g , input , weight , bias , stride , padding , dilation , True , output_padding , groups , None , None , None ) <nl> + <nl> + <nl> @ parse_args ( ' v ' , ' v ' , ' v ' , ' v ' , ' v ' , ' i ' , ' f ' , ' f ' , ' i ' ) <nl> def batch_norm ( g , input , weight , bias , running_mean , running_var , training , momentum , eps , cudnn_enabled ) : <nl> input_sizes = input . type ( ) . sizes ( ) <nl>
Add ONNX Scripting Conv Support ( )
pytorch/pytorch
4d30415f12746fb1d03b033e09076e636af555d4
2019-12-03T18:28:38Z
mmm a / src / core / hle / kernel / resource_limit . h <nl> ppp b / src / core / hle / kernel / resource_limit . h <nl> namespace Kernel { <nl> <nl> class KernelCore ; <nl> <nl> - enum class ResourceType { <nl> + enum class ResourceType : u32 { <nl> PhysicalMemory , <nl> Threads , <nl> Events , <nl> enum class ResourceType { <nl> ResourceTypeCount <nl> } ; <nl> <nl> + constexpr bool IsValidResourceType ( ResourceType type ) { <nl> + return type < ResourceType : : ResourceTypeCount ; <nl> + } <nl> + <nl> class ResourceLimit final : public Object { <nl> public : <nl> / * * <nl> mmm a / src / core / hle / kernel / svc . cpp <nl> ppp b / src / core / hle / kernel / svc . cpp <nl> static ResultCode CreateResourceLimit ( Handle * out_handle ) { <nl> return RESULT_SUCCESS ; <nl> } <nl> <nl> + static ResultCode GetResourceLimitLimitValue ( u64 * out_value , Handle resource_limit , <nl> + u32 resource_type ) { <nl> + LOG_DEBUG ( Kernel_SVC , " called . Handle = { : 08X } , Resource type = { } " , resource_limit , resource_type ) ; <nl> + <nl> + const auto type = static_cast < ResourceType > ( resource_type ) ; <nl> + if ( ! IsValidResourceType ( type ) ) { <nl> + LOG_ERROR ( Kernel_SVC , " Invalid resource limit type : ' { } ' . " , resource_type ) ; <nl> + return ERR_INVALID_ENUM_VALUE ; <nl> + } <nl> + <nl> + const auto & kernel = Core : : System : : GetInstance ( ) . Kernel ( ) ; <nl> + const auto * const current_process = kernel . CurrentProcess ( ) ; <nl> + ASSERT ( current_process ! = nullptr ) ; <nl> + <nl> + const auto resource_limit_object = <nl> + current_process - > GetHandleTable ( ) . Get < ResourceLimit > ( resource_limit ) ; <nl> + if ( ! resource_limit_object ) { <nl> + LOG_ERROR ( Kernel_SVC , " Handle to non - existent resource limit instance used . Handle = { : 08X } " , <nl> + resource_limit ) ; <nl> + return ERR_INVALID_HANDLE ; <nl> + } <nl> + <nl> + const s64 limit_value = resource_limit_object - > GetMaxResourceValue ( type ) ; <nl> + * out_value = static_cast < u64 > ( limit_value ) ; <nl> + return RESULT_SUCCESS ; <nl> + } <nl> + <nl> namespace { <nl> struct FunctionDef { <nl> using Func = void ( ) ; <nl> static const FunctionDef SVC_Table [ ] = { <nl> { 0x2D , nullptr , " UnmapPhysicalMemory " } , <nl> { 0x2E , nullptr , " GetFutureThreadInfo " } , <nl> { 0x2F , nullptr , " GetLastThreadInfo " } , <nl> - { 0x30 , nullptr , " GetResourceLimitLimitValue " } , <nl> + { 0x30 , SvcWrap < GetResourceLimitLimitValue > , " GetResourceLimitLimitValue " } , <nl> { 0x31 , nullptr , " GetResourceLimitCurrentValue " } , <nl> { 0x32 , SvcWrap < SetThreadActivity > , " SetThreadActivity " } , <nl> { 0x33 , SvcWrap < GetThreadContext > , " GetThreadContext " } , <nl>
svc : Implement svcGetResourceLimitLimitValue ( )
yuzu-emu/yuzu
1d6399c222e6c0478193160648cddf43b8d8eff9
2018-11-27T02:12:13Z
mmm a / stdlib / public / core / Misc . swift <nl> ppp b / stdlib / public / core / Misc . swift <nl> func _typeName ( type : Any . Type , qualified : Bool = true ) - > String { <nl> input : UnsafeBufferPointer ( start : stringPtr , count : count ) ) <nl> } <nl> <nl> + @ warn_unused_result <nl> + @ _silgen_name ( " swift_stdlib_demangleName " ) <nl> + func _stdlib_demangleNameImpl ( <nl> + mangledName : UnsafePointer < UInt8 > , <nl> + _ mangledNameLength : UInt , <nl> + _ demangledName : UnsafeMutablePointer < String > ) <nl> + <nl> + / / NB : This function is not used directly in the Swift codebase , but is <nl> + / / exported for Xcode support . Please coordinate before changing . <nl> + @ warn_unused_result <nl> + public / / @ testable <nl> + func _stdlib_demangleName ( mangledName : String ) - > String { <nl> + let mangledNameUTF8 = Array ( mangledName . utf8 ) <nl> + return mangledNameUTF8 . withUnsafeBufferPointer { <nl> + ( mangledNameUTF8 ) in <nl> + let ( _ , demangledName ) = _withUninitializedString { <nl> + _stdlib_demangleNameImpl ( <nl> + mangledNameUTF8 . baseAddress , UInt ( mangledNameUTF8 . endIndex ) , <nl> + $ 0 ) <nl> + } <nl> + return demangledName <nl> + } <nl> + } <nl> + <nl> / / / Returns ` floor ( log ( x ) ) ` . This equals to the position of the most <nl> / / / significant non - zero bit , or 63 - number - of - zeros before it . <nl> / / / <nl> mmm a / stdlib / public / runtime / Reflection . mm <nl> ppp b / stdlib / public / runtime / Reflection . mm <nl> static Mirror ObjC_getMirrorForSuperclass ( Class sup , <nl> T - > vw_destroy ( value ) ; <nl> return MirrorReturn ( result ) ; <nl> } <nl> + <nl> + / / NB : This function is not used directly in the Swift codebase , but is <nl> + / / exported for Xcode support . Please coordinate before changing . <nl> + extern " C " void swift_stdlib_demangleName ( const char * mangledName , <nl> + size_t mangledNameLength , <nl> + String * demangledName ) { <nl> + auto options = Demangle : : DemangleOptions ( ) ; <nl> + options . DisplayDebuggerGeneratedModule = false ; <nl> + auto result = <nl> + Demangle : : demangleSymbolAsString ( mangledName , <nl> + mangledNameLength , <nl> + options ) ; <nl> + new ( demangledName ) String ( result . data ( ) , result . size ( ) ) ; <nl> + } <nl> mmm a / test / 1_stdlib / Runtime . swift <nl> ppp b / test / 1_stdlib / Runtime . swift <nl> Runtime . test ( " typeName " ) { <nl> expectEqual ( " protocol < > . Protocol " , _typeName ( a . dynamicType ) ) <nl> } <nl> <nl> + Runtime . test ( " demangleName " ) { <nl> + expectEqual ( " " , _stdlib_demangleName ( " " ) ) <nl> + expectEqual ( " abc " , _stdlib_demangleName ( " abc " ) ) <nl> + expectEqual ( " \ 0 " , _stdlib_demangleName ( " \ 0 " ) ) <nl> + expectEqual ( " Swift . Double " , _stdlib_demangleName ( " _TtSd " ) ) <nl> + expectEqual ( " x . a : x . Foo < x . Foo < x . Foo < Swift . Int , Swift . Int > , x . Foo < Swift . Int , Swift . Int > > , x . Foo < x . Foo < Swift . Int , Swift . Int > , x . Foo < Swift . Int , Swift . Int > > > " , <nl> + _stdlib_demangleName ( " _Tv1x1aGCS_3FooGS0_GS0_SiSi_GS0_SiSi__GS0_GS0_SiSi_GS0_SiSi___ " ) ) <nl> + expectEqual ( " Foobar " , _stdlib_demangleName ( " _TtC13__lldb_expr_46Foobar " ) ) <nl> + } <nl> + <nl> Runtime . test ( " _stdlib_atomicCompareExchangeStrongPtr " ) { <nl> typealias IntPtr = UnsafeMutablePointer < Int > <nl> var origP1 = IntPtr ( bitPattern : 0x10101010 ) <nl>
Runtime : Reinstate _stdlib_demangleName hook .
apple/swift
76eb96e29ea7bff09c5348eebfc7b82d0ca1f151
2015-12-05T02:45:51Z
mmm a / Code / Sandbox / Plugins / EditorCommon / Notifications / NotificationList . cpp <nl> ppp b / Code / Sandbox / Plugins / EditorCommon / Notifications / NotificationList . cpp <nl> void CNotificationList : : ClearAll ( ) <nl> void CNotificationList : : OnContextMenu ( const QPoint & point ) <nl> { <nl> QMenu menu ; <nl> - connect ( menu . addAction ( CryIcon ( " icons : General / File_Copy . ico " ) , " Copy " ) , & QAction : : triggered , [ this , point ] ( ) <nl> + connect ( menu . addAction ( CryIcon ( " icons : General / Copy . ico " ) , " Copy " ) , & QAction : : triggered , [ this , point ] ( ) <nl> { <nl> QObject * pChild = childAt ( point ) ; <nl> CNotificationWidget * pNotificationWidget = qobject_cast < CNotificationWidget * > ( pChild ) ; <nl>
! XB ( Sandbox ) ( CE - 17994 ) Fixed icon used to copy a notification in notification center
CRYTEK/CRYENGINE
6aa42e623fa2e72e497ee4875a51b2fe9bae3d4e
2019-06-26T10:36:09Z
mmm a / src / arm / codegen - arm . cc <nl> ppp b / src / arm / codegen - arm . cc <nl> <nl> <nl> # include " bootstrapper . h " <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " parser . h " <nl> # include " register - allocator - inl . h " <nl> void CodeGenerator : : LoadTypeofExpression ( Expression * expr ) { <nl> / / load to make sure we do not get reference errors . <nl> Slot global ( variable , Slot : : CONTEXT , Context : : GLOBAL_INDEX ) ; <nl> Literal key ( variable - > name ( ) ) ; <nl> - / / TODO ( 1241834 ) : Fetch the position from the variable instead of using <nl> - / / no position . <nl> Property property ( & global , & key , RelocInfo : : kNoPosition ) ; <nl> Reference ref ( this , & property ) ; <nl> ref . GetValueAndSpill ( ) ; <nl> void CodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * node ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( node ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( node , script_ , this ) ; <nl> / / Check for stack - overflow exception . <nl> if ( HasStackOverflow ( ) ) { <nl> ASSERT ( frame_ - > height ( ) = = original_height ) ; <nl> mmm a / src / arm / codegen - arm . h <nl> ppp b / src / arm / codegen - arm . h <nl> class CodeGenerator : public AstVisitor { <nl> <nl> / / Accessors <nl> MacroAssembler * masm ( ) { return masm_ ; } <nl> - <nl> VirtualFrame * frame ( ) const { return frame_ ; } <nl> + Handle < Script > script ( ) { return script_ ; } <nl> <nl> bool has_valid_frame ( ) const { return frame_ ! = NULL ; } <nl> <nl> class CodeGenerator : public AstVisitor { <nl> InlineRuntimeLUT * old_entry ) ; <nl> <nl> static Handle < Code > ComputeLazyCompile ( int argc ) ; <nl> - Handle < JSFunction > BuildBoilerplate ( FunctionLiteral * node ) ; <nl> void ProcessDeclarations ( ZoneList < Declaration * > * declarations ) ; <nl> <nl> static Handle < Code > ComputeCallInitialize ( int argc , InLoopFlag in_loop ) ; <nl> mmm a / src / arm / fast - codegen - arm . cc <nl> ppp b / src / arm / fast - codegen - arm . cc <nl> <nl> # include " v8 . h " <nl> <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " fast - codegen . h " <nl> # include " parser . h " <nl> void FastCodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * expr ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( expr ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( expr , script_ , this ) ; <nl> if ( HasStackOverflow ( ) ) return ; <nl> <nl> ASSERT ( boilerplate - > IsBoilerplate ( ) ) ; <nl> mmm a / src / codegen . cc <nl> ppp b / src / codegen . cc <nl> <nl> <nl> # include " bootstrapper . h " <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " oprofile - agent . h " <nl> # include " prettyprinter . h " <nl> bool CodeGenerator : : ShouldGenerateLog ( Expression * type ) { <nl> # endif <nl> <nl> <nl> - / / Sets the function info on a function . <nl> - / / The start_position points to the first ' ( ' character after the function name <nl> - / / in the full script source . When counting characters in the script source the <nl> - / / the first character is number 0 ( not 1 ) . <nl> - void CodeGenerator : : SetFunctionInfo ( Handle < JSFunction > fun , <nl> - FunctionLiteral * lit , <nl> - bool is_toplevel , <nl> - Handle < Script > script ) { <nl> - fun - > shared ( ) - > set_length ( lit - > num_parameters ( ) ) ; <nl> - fun - > shared ( ) - > set_formal_parameter_count ( lit - > num_parameters ( ) ) ; <nl> - fun - > shared ( ) - > set_script ( * script ) ; <nl> - fun - > shared ( ) - > set_function_token_position ( lit - > function_token_position ( ) ) ; <nl> - fun - > shared ( ) - > set_start_position ( lit - > start_position ( ) ) ; <nl> - fun - > shared ( ) - > set_end_position ( lit - > end_position ( ) ) ; <nl> - fun - > shared ( ) - > set_is_expression ( lit - > is_expression ( ) ) ; <nl> - fun - > shared ( ) - > set_is_toplevel ( is_toplevel ) ; <nl> - fun - > shared ( ) - > set_inferred_name ( * lit - > inferred_name ( ) ) ; <nl> - fun - > shared ( ) - > SetThisPropertyAssignmentsInfo ( <nl> - lit - > has_only_this_property_assignments ( ) , <nl> - lit - > has_only_simple_this_property_assignments ( ) , <nl> - * lit - > this_property_assignments ( ) ) ; <nl> - fun - > shared ( ) - > set_try_fast_codegen ( lit - > try_fast_codegen ( ) ) ; <nl> - } <nl> - <nl> - <nl> - Handle < Code > CodeGenerator : : ComputeLazyCompile ( int argc ) { <nl> - CALL_HEAP_FUNCTION ( StubCache : : ComputeLazyCompile ( argc ) , Code ) ; <nl> - } <nl> - <nl> - <nl> - Handle < JSFunction > CodeGenerator : : BuildBoilerplate ( FunctionLiteral * node ) { <nl> - # ifdef DEBUG <nl> - / / We should not try to compile the same function literal more than <nl> - / / once . <nl> - node - > mark_as_compiled ( ) ; <nl> - # endif <nl> - <nl> - / / Determine if the function can be lazily compiled . This is <nl> - / / necessary to allow some of our builtin JS files to be lazily <nl> - / / compiled . These builtins cannot be handled lazily by the parser , <nl> - / / since we have to know if a function uses the special natives <nl> - / / syntax , which is something the parser records . <nl> - bool allow_lazy = node - > AllowsLazyCompilation ( ) ; <nl> - <nl> - / / Generate code <nl> - Handle < Code > code ; <nl> - if ( FLAG_lazy & & allow_lazy ) { <nl> - code = ComputeLazyCompile ( node - > num_parameters ( ) ) ; <nl> - } else { <nl> - / / The bodies of function literals have not yet been visited by <nl> - / / the AST optimizer / analyzer . <nl> - if ( ! Rewriter : : Optimize ( node ) ) { <nl> - return Handle < JSFunction > : : null ( ) ; <nl> - } <nl> - <nl> - code = MakeCode ( node , script_ , false ) ; <nl> - <nl> - / / Check for stack - overflow exception . <nl> - if ( code . is_null ( ) ) { <nl> - SetStackOverflow ( ) ; <nl> - return Handle < JSFunction > : : null ( ) ; <nl> - } <nl> - <nl> - / / Function compilation complete . <nl> - LOG ( CodeCreateEvent ( Logger : : FUNCTION_TAG , * code , * node - > name ( ) ) ) ; <nl> - <nl> - # ifdef ENABLE_OPROFILE_AGENT <nl> - OProfileAgent : : CreateNativeCodeRegion ( * node - > name ( ) , <nl> - code - > instruction_start ( ) , <nl> - code - > instruction_size ( ) ) ; <nl> - # endif <nl> - } <nl> - <nl> - / / Create a boilerplate function . <nl> - Handle < JSFunction > function = <nl> - Factory : : NewFunctionBoilerplate ( node - > name ( ) , <nl> - node - > materialized_literal_count ( ) , <nl> - code ) ; <nl> - CodeGenerator : : SetFunctionInfo ( function , node , false , script_ ) ; <nl> - <nl> - # ifdef ENABLE_DEBUGGER_SUPPORT <nl> - / / Notify debugger that a new function has been added . <nl> - Debugger : : OnNewFunction ( function ) ; <nl> - # endif <nl> - <nl> - / / Set the expected number of properties for instances and return <nl> - / / the resulting function . <nl> - SetExpectedNofPropertiesFromEstimate ( function , <nl> - node - > expected_property_count ( ) ) ; <nl> - return function ; <nl> - } <nl> - <nl> - <nl> Handle < Code > CodeGenerator : : ComputeCallInitialize ( <nl> int argc , <nl> InLoopFlag in_loop ) { <nl> void CodeGenerator : : ProcessDeclarations ( ZoneList < Declaration * > * declarations ) { <nl> array - > set_undefined ( j + + ) ; <nl> } <nl> } else { <nl> - Handle < JSFunction > function = BuildBoilerplate ( node - > fun ( ) ) ; <nl> + Handle < JSFunction > function = <nl> + Compiler : : BuildBoilerplate ( node - > fun ( ) , script ( ) , this ) ; <nl> / / Check for stack - overflow exception . <nl> if ( HasStackOverflow ( ) ) return ; <nl> array - > set ( j + + , * function ) ; <nl> mmm a / src / codegen . h <nl> ppp b / src / codegen . h <nl> <nl> / / MakeCode <nl> / / MakeCodePrologue <nl> / / MakeCodeEpilogue <nl> - / / SetFunctionInfo <nl> / / masm <nl> / / frame <nl> + / / script <nl> / / has_valid_frame <nl> / / SetFrame <nl> / / DeleteFrame <nl> mmm a / src / compiler . cc <nl> ppp b / src / compiler . cc <nl> static Handle < JSFunction > MakeFunction ( bool is_global , <nl> code ) ; <nl> <nl> ASSERT_EQ ( RelocInfo : : kNoPosition , lit - > function_token_position ( ) ) ; <nl> - CodeGenerator : : SetFunctionInfo ( fun , lit , true , script ) ; <nl> + Compiler : : SetFunctionInfo ( fun , lit , true , script ) ; <nl> <nl> / / Hint to the runtime system used when allocating space for initial <nl> / / property space by setting the expected number of properties for <nl> bool Compiler : : CompileLazy ( Handle < SharedFunctionInfo > shared , <nl> } <nl> <nl> <nl> + Handle < JSFunction > Compiler : : BuildBoilerplate ( FunctionLiteral * literal , <nl> + Handle < Script > script , <nl> + AstVisitor * caller ) { <nl> + # ifdef DEBUG <nl> + / / We should not try to compile the same function literal more than <nl> + / / once . <nl> + literal - > mark_as_compiled ( ) ; <nl> + # endif <nl> + <nl> + / / Determine if the function can be lazily compiled . This is <nl> + / / necessary to allow some of our builtin JS files to be lazily <nl> + / / compiled . These builtins cannot be handled lazily by the parser , <nl> + / / since we have to know if a function uses the special natives <nl> + / / syntax , which is something the parser records . <nl> + bool allow_lazy = literal - > AllowsLazyCompilation ( ) ; <nl> + <nl> + / / Generate code <nl> + Handle < Code > code ; <nl> + if ( FLAG_lazy & & allow_lazy ) { <nl> + code = ComputeLazyCompile ( literal - > num_parameters ( ) ) ; <nl> + } else { <nl> + / / The bodies of function literals have not yet been visited by <nl> + / / the AST optimizer / analyzer . <nl> + if ( ! Rewriter : : Optimize ( literal ) ) { <nl> + return Handle < JSFunction > : : null ( ) ; <nl> + } <nl> + <nl> + / / Generate code and return it . <nl> + if ( FLAG_fast_compiler & & literal - > try_fast_codegen ( ) ) { <nl> + CodeGenSelector selector ; <nl> + CodeGenSelector : : CodeGenTag code_gen = selector . Select ( literal ) ; <nl> + if ( code_gen = = CodeGenSelector : : FAST ) { <nl> + code = FastCodeGenerator : : MakeCode ( literal , <nl> + script , <nl> + false ) ; / / Not eval . <nl> + } <nl> + ASSERT ( code_gen = = CodeGenSelector : : NORMAL ) ; <nl> + } else { <nl> + code = CodeGenerator : : MakeCode ( literal , <nl> + script , <nl> + false ) ; / / Not eval . <nl> + } <nl> + <nl> + / / Check for stack - overflow exception . <nl> + if ( code . is_null ( ) ) { <nl> + caller - > SetStackOverflow ( ) ; <nl> + return Handle < JSFunction > : : null ( ) ; <nl> + } <nl> + <nl> + / / Function compilation complete . <nl> + LOG ( CodeCreateEvent ( Logger : : FUNCTION_TAG , * code , * literal - > name ( ) ) ) ; <nl> + <nl> + # ifdef ENABLE_OPROFILE_AGENT <nl> + OProfileAgent : : CreateNativeCodeRegion ( * node - > name ( ) , <nl> + code - > instruction_start ( ) , <nl> + code - > instruction_size ( ) ) ; <nl> + # endif <nl> + } <nl> + <nl> + / / Create a boilerplate function . <nl> + Handle < JSFunction > function = <nl> + Factory : : NewFunctionBoilerplate ( literal - > name ( ) , <nl> + literal - > materialized_literal_count ( ) , <nl> + code ) ; <nl> + SetFunctionInfo ( function , literal , false , script ) ; <nl> + <nl> + # ifdef ENABLE_DEBUGGER_SUPPORT <nl> + / / Notify debugger that a new function has been added . <nl> + Debugger : : OnNewFunction ( function ) ; <nl> + # endif <nl> + <nl> + / / Set the expected number of properties for instances and return <nl> + / / the resulting function . <nl> + SetExpectedNofPropertiesFromEstimate ( function , <nl> + literal - > expected_property_count ( ) ) ; <nl> + return function ; <nl> + } <nl> + <nl> + <nl> + / / Sets the function info on a function . <nl> + / / The start_position points to the first ' ( ' character after the function name <nl> + / / in the full script source . When counting characters in the script source the <nl> + / / the first character is number 0 ( not 1 ) . <nl> + void Compiler : : SetFunctionInfo ( Handle < JSFunction > fun , <nl> + FunctionLiteral * lit , <nl> + bool is_toplevel , <nl> + Handle < Script > script ) { <nl> + fun - > shared ( ) - > set_length ( lit - > num_parameters ( ) ) ; <nl> + fun - > shared ( ) - > set_formal_parameter_count ( lit - > num_parameters ( ) ) ; <nl> + fun - > shared ( ) - > set_script ( * script ) ; <nl> + fun - > shared ( ) - > set_function_token_position ( lit - > function_token_position ( ) ) ; <nl> + fun - > shared ( ) - > set_start_position ( lit - > start_position ( ) ) ; <nl> + fun - > shared ( ) - > set_end_position ( lit - > end_position ( ) ) ; <nl> + fun - > shared ( ) - > set_is_expression ( lit - > is_expression ( ) ) ; <nl> + fun - > shared ( ) - > set_is_toplevel ( is_toplevel ) ; <nl> + fun - > shared ( ) - > set_inferred_name ( * lit - > inferred_name ( ) ) ; <nl> + fun - > shared ( ) - > SetThisPropertyAssignmentsInfo ( <nl> + lit - > has_only_this_property_assignments ( ) , <nl> + lit - > has_only_simple_this_property_assignments ( ) , <nl> + * lit - > this_property_assignments ( ) ) ; <nl> + fun - > shared ( ) - > set_try_fast_codegen ( lit - > try_fast_codegen ( ) ) ; <nl> + } <nl> + <nl> + <nl> CodeGenSelector : : CodeGenTag CodeGenSelector : : Select ( FunctionLiteral * fun ) { <nl> Scope * scope = fun - > scope ( ) ; <nl> if ( scope - > num_heap_slots ( ) ! = 0 ) { <nl> mmm a / src / compiler . h <nl> ppp b / src / compiler . h <nl> class Compiler : public AllStatic { <nl> / / true on success and false if the compilation resulted in a stack <nl> / / overflow . <nl> static bool CompileLazy ( Handle < SharedFunctionInfo > shared , int loop_nesting ) ; <nl> + <nl> + / / Compile a function boilerplate object ( the function is possibly <nl> + / / lazily compiled ) . Called recursively from a backend code <nl> + / / generator ' caller ' to build the boilerplate . <nl> + static Handle < JSFunction > BuildBoilerplate ( FunctionLiteral * node , <nl> + Handle < Script > script , <nl> + AstVisitor * caller ) ; <nl> + <nl> + / / Set the function info for a newly compiled function . <nl> + static void SetFunctionInfo ( Handle < JSFunction > fun , <nl> + FunctionLiteral * lit , <nl> + bool is_toplevel , <nl> + Handle < Script > script ) ; <nl> } ; <nl> <nl> <nl> mmm a / src / fast - codegen . cc <nl> ppp b / src / fast - codegen . cc <nl> <nl> # include " v8 . h " <nl> <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " fast - codegen . h " <nl> # include " stub - cache . h " <nl> # include " debug . h " <nl> void FastCodeGenerator : : VisitDeclarations ( <nl> int length = declarations - > length ( ) ; <nl> int globals = 0 ; <nl> for ( int i = 0 ; i < length ; i + + ) { <nl> - Declaration * node = declarations - > at ( i ) ; <nl> - Variable * var = node - > proxy ( ) - > var ( ) ; <nl> + Declaration * decl = declarations - > at ( i ) ; <nl> + Variable * var = decl - > proxy ( ) - > var ( ) ; <nl> Slot * slot = var - > slot ( ) ; <nl> <nl> / / If it was not possible to allocate the variable at compile <nl> void FastCodeGenerator : : VisitDeclarations ( <nl> / / Compute array of global variable and function declarations . <nl> Handle < FixedArray > array = Factory : : NewFixedArray ( 2 * globals , TENURED ) ; <nl> for ( int j = 0 , i = 0 ; i < length ; i + + ) { <nl> - Declaration * node = declarations - > at ( i ) ; <nl> - Variable * var = node - > proxy ( ) - > var ( ) ; <nl> + Declaration * decl = declarations - > at ( i ) ; <nl> + Variable * var = decl - > proxy ( ) - > var ( ) ; <nl> Slot * slot = var - > slot ( ) ; <nl> <nl> if ( ( slot = = NULL | | slot - > type ( ) ! = Slot : : LOOKUP ) & & var - > is_global ( ) ) { <nl> array - > set ( j + + , * ( var - > name ( ) ) ) ; <nl> - if ( node - > fun ( ) = = NULL ) { <nl> + if ( decl - > fun ( ) = = NULL ) { <nl> if ( var - > mode ( ) = = Variable : : CONST ) { <nl> / / In case this is const property use the hole . <nl> array - > set_the_hole ( j + + ) ; <nl> void FastCodeGenerator : : VisitDeclarations ( <nl> array - > set_undefined ( j + + ) ; <nl> } <nl> } else { <nl> - Handle < JSFunction > function = BuildBoilerplate ( node - > fun ( ) ) ; <nl> + Handle < JSFunction > function = <nl> + Compiler : : BuildBoilerplate ( decl - > fun ( ) , script_ , this ) ; <nl> / / Check for stack - overflow exception . <nl> if ( HasStackOverflow ( ) ) return ; <nl> array - > set ( j + + , * function ) ; <nl> void FastCodeGenerator : : VisitDeclarations ( <nl> DeclareGlobals ( array ) ; <nl> } <nl> <nl> - Handle < JSFunction > FastCodeGenerator : : BuildBoilerplate ( FunctionLiteral * fun ) { <nl> - # ifdef DEBUG <nl> - / / We should not try to compile the same function literal more than <nl> - / / once . <nl> - fun - > mark_as_compiled ( ) ; <nl> - # endif <nl> - <nl> - / / Generate code <nl> - Handle < Code > code = CodeGenerator : : ComputeLazyCompile ( fun - > num_parameters ( ) ) ; <nl> - / / Check for stack - overflow exception . <nl> - if ( code . is_null ( ) ) { <nl> - SetStackOverflow ( ) ; <nl> - return Handle < JSFunction > : : null ( ) ; <nl> - } <nl> - <nl> - / / Create a boilerplate function . <nl> - Handle < JSFunction > function = <nl> - Factory : : NewFunctionBoilerplate ( fun - > name ( ) , <nl> - fun - > materialized_literal_count ( ) , <nl> - code ) ; <nl> - CodeGenerator : : SetFunctionInfo ( function , fun , false , script_ ) ; <nl> - <nl> - # ifdef ENABLE_DEBUGGER_SUPPORT <nl> - / / Notify debugger that a new function has been added . <nl> - Debugger : : OnNewFunction ( function ) ; <nl> - # endif <nl> - <nl> - / / Set the expected number of properties for instances and return <nl> - / / the resulting function . <nl> - SetExpectedNofPropertiesFromEstimate ( function , <nl> - fun - > expected_property_count ( ) ) ; <nl> - return function ; <nl> - } <nl> - <nl> <nl> void FastCodeGenerator : : SetFunctionPosition ( FunctionLiteral * fun ) { <nl> if ( FLAG_debug_info ) { <nl> mmm a / src / fast - codegen . h <nl> ppp b / src / fast - codegen . h <nl> class FastCodeGenerator : public AstVisitor { <nl> void TestAndBranch ( Register source , Label * true_label , Label * false_label ) ; <nl> <nl> void VisitDeclarations ( ZoneList < Declaration * > * declarations ) ; <nl> - Handle < JSFunction > BuildBoilerplate ( FunctionLiteral * fun ) ; <nl> void DeclareGlobals ( Handle < FixedArray > pairs ) ; <nl> <nl> / / Platform - specific return sequence <nl> mmm a / src / handles . cc <nl> ppp b / src / handles . cc <nl> <nl> # include " global - handles . h " <nl> # include " natives . h " <nl> # include " runtime . h " <nl> + # include " stub - cache . h " <nl> <nl> namespace v8 { <nl> namespace internal { <nl> OptimizedObjectForAddingMultipleProperties ( Handle < JSObject > object , <nl> } <nl> <nl> <nl> + Handle < Code > ComputeLazyCompile ( int argc ) { <nl> + CALL_HEAP_FUNCTION ( StubCache : : ComputeLazyCompile ( argc ) , Code ) ; <nl> + } <nl> + <nl> + <nl> OptimizedObjectForAddingMultipleProperties : : <nl> ~ OptimizedObjectForAddingMultipleProperties ( ) { <nl> / / Reoptimize the object to allow fast property access . <nl> mmm a / src / handles . h <nl> ppp b / src / handles . h <nl> Handle < Object > SetPrototype ( Handle < JSFunction > function , <nl> Handle < Object > prototype ) ; <nl> <nl> <nl> - / / Do lazy compilation of the given function . Returns true on success <nl> - / / and false if the compilation resulted in a stack overflow . <nl> + / / Does lazy compilation of the given function . Returns true on success and <nl> + / / false if the compilation resulted in a stack overflow . <nl> enum ClearExceptionFlag { KEEP_EXCEPTION , CLEAR_EXCEPTION } ; <nl> <nl> bool CompileLazyShared ( Handle < SharedFunctionInfo > shared , <nl> bool CompileLazyShared ( Handle < SharedFunctionInfo > shared , <nl> bool CompileLazy ( Handle < JSFunction > function , ClearExceptionFlag flag ) ; <nl> bool CompileLazyInLoop ( Handle < JSFunction > function , ClearExceptionFlag flag ) ; <nl> <nl> + / / Returns the lazy compilation stub for argc arguments . <nl> + Handle < Code > ComputeLazyCompile ( int argc ) ; <nl> + <nl> / / These deal with lazily loaded properties . <nl> void SetupLazy ( Handle < JSObject > obj , <nl> int index , <nl> mmm a / src / ia32 / codegen - ia32 . cc <nl> ppp b / src / ia32 / codegen - ia32 . cc <nl> <nl> <nl> # include " bootstrapper . h " <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " ic - inl . h " <nl> # include " parser . h " <nl> void CodeGenerator : : LoadTypeofExpression ( Expression * expr ) { <nl> / / load to make sure we do not get reference errors . <nl> Slot global ( variable , Slot : : CONTEXT , Context : : GLOBAL_INDEX ) ; <nl> Literal key ( variable - > name ( ) ) ; <nl> - / / TODO ( 1241834 ) : Fetch the position from the variable instead of using <nl> - / / no position . <nl> Property property ( & global , & key , RelocInfo : : kNoPosition ) ; <nl> Reference ref ( this , & property ) ; <nl> ref . GetValue ( ) ; <nl> void CodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * node ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( node ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( node , script_ , this ) ; <nl> / / Check for stack - overflow exception . <nl> if ( HasStackOverflow ( ) ) return ; <nl> InstantiateBoilerplate ( boilerplate ) ; <nl> mmm a / src / ia32 / codegen - ia32 . h <nl> ppp b / src / ia32 / codegen - ia32 . h <nl> class CodeGenerator : public AstVisitor { <nl> static bool ShouldGenerateLog ( Expression * type ) ; <nl> # endif <nl> <nl> - static void SetFunctionInfo ( Handle < JSFunction > fun , <nl> - FunctionLiteral * lit , <nl> - bool is_toplevel , <nl> - Handle < Script > script ) ; <nl> - <nl> static void RecordPositions ( MacroAssembler * masm , int pos ) ; <nl> <nl> / / Accessors <nl> MacroAssembler * masm ( ) { return masm_ ; } <nl> - <nl> VirtualFrame * frame ( ) const { return frame_ ; } <nl> + Handle < Script > script ( ) { return script_ ; } <nl> <nl> bool has_valid_frame ( ) const { return frame_ ! = NULL ; } <nl> <nl> class CodeGenerator : public AstVisitor { <nl> const InlineRuntimeLUT & new_entry , <nl> InlineRuntimeLUT * old_entry ) ; <nl> <nl> - static Handle < Code > ComputeLazyCompile ( int argc ) ; <nl> - Handle < JSFunction > BuildBoilerplate ( FunctionLiteral * node ) ; <nl> void ProcessDeclarations ( ZoneList < Declaration * > * declarations ) ; <nl> <nl> static Handle < Code > ComputeCallInitialize ( int argc , InLoopFlag in_loop ) ; <nl> mmm a / src / ia32 / fast - codegen - ia32 . cc <nl> ppp b / src / ia32 / fast - codegen - ia32 . cc <nl> <nl> # include " v8 . h " <nl> <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " fast - codegen . h " <nl> # include " parser . h " <nl> # include " debug . h " <nl> void FastCodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * expr ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( expr ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( expr , script_ , this ) ; <nl> if ( HasStackOverflow ( ) ) return ; <nl> <nl> ASSERT ( boilerplate - > IsBoilerplate ( ) ) ; <nl> mmm a / src / x64 / codegen - x64 . cc <nl> ppp b / src / x64 / codegen - x64 . cc <nl> <nl> <nl> # include " bootstrapper . h " <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " ic - inl . h " <nl> # include " parser . h " <nl> void CodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * node ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( node ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( node , script_ , this ) ; <nl> / / Check for stack - overflow exception . <nl> if ( HasStackOverflow ( ) ) return ; <nl> InstantiateBoilerplate ( boilerplate ) ; <nl> void CodeGenerator : : LoadTypeofExpression ( Expression * expr ) { <nl> / / load to make sure we do not get reference errors . <nl> Slot global ( variable , Slot : : CONTEXT , Context : : GLOBAL_INDEX ) ; <nl> Literal key ( variable - > name ( ) ) ; <nl> - / / TODO ( 1241834 ) : Fetch the position from the variable instead of using <nl> - / / no position . <nl> Property property ( & global , & key , RelocInfo : : kNoPosition ) ; <nl> Reference ref ( this , & property ) ; <nl> ref . GetValue ( ) ; <nl> mmm a / src / x64 / codegen - x64 . h <nl> ppp b / src / x64 / codegen - x64 . h <nl> class CodeGenerator : public AstVisitor { <nl> static bool ShouldGenerateLog ( Expression * type ) ; <nl> # endif <nl> <nl> - static void SetFunctionInfo ( Handle < JSFunction > fun , <nl> - FunctionLiteral * lit , <nl> - bool is_toplevel , <nl> - Handle < Script > script ) ; <nl> - <nl> static void RecordPositions ( MacroAssembler * masm , int pos ) ; <nl> <nl> / / Accessors <nl> MacroAssembler * masm ( ) { return masm_ ; } <nl> - <nl> VirtualFrame * frame ( ) const { return frame_ ; } <nl> + Handle < Script > script ( ) { return script_ ; } <nl> <nl> bool has_valid_frame ( ) const { return frame_ ! = NULL ; } <nl> <nl> class CodeGenerator : public AstVisitor { <nl> static bool PatchInlineRuntimeEntry ( Handle < String > name , <nl> const InlineRuntimeLUT & new_entry , <nl> InlineRuntimeLUT * old_entry ) ; <nl> - static Handle < Code > ComputeLazyCompile ( int argc ) ; <nl> - Handle < JSFunction > BuildBoilerplate ( FunctionLiteral * node ) ; <nl> void ProcessDeclarations ( ZoneList < Declaration * > * declarations ) ; <nl> <nl> static Handle < Code > ComputeCallInitialize ( int argc , InLoopFlag in_loop ) ; <nl> mmm a / src / x64 / fast - codegen - x64 . cc <nl> ppp b / src / x64 / fast - codegen - x64 . cc <nl> <nl> # include " v8 . h " <nl> <nl> # include " codegen - inl . h " <nl> + # include " compiler . h " <nl> # include " debug . h " <nl> # include " fast - codegen . h " <nl> # include " parser . h " <nl> void FastCodeGenerator : : VisitFunctionLiteral ( FunctionLiteral * expr ) { <nl> Comment cmnt ( masm_ , " [ FunctionLiteral " ) ; <nl> <nl> / / Build the function boilerplate and instantiate it . <nl> - Handle < JSFunction > boilerplate = BuildBoilerplate ( expr ) ; <nl> + Handle < JSFunction > boilerplate = <nl> + Compiler : : BuildBoilerplate ( expr , script_ , this ) ; <nl> if ( HasStackOverflow ( ) ) return ; <nl> <nl> ASSERT ( boilerplate - > IsBoilerplate ( ) ) ; <nl>
Obey the flag - - lazy in the toplevel code generator .
v8/v8
0ce4eab1b2091778c8ddda95c87634ebc95c6c91
2009-11-04T17:59:24Z
mmm a / tests / cpp - tests / Classes / Camera3DTest / Camera3DTest . cpp <nl> ppp b / tests / cpp - tests / Classes / Camera3DTest / Camera3DTest . cpp <nl> static int sceneIdx = - 1 ; <nl> static std : : function < Layer * ( ) > createFunctions [ ] = <nl> { <nl> CL ( Camera3DTestDemo ) , <nl> - CL ( CameraClipDemo ) <nl> + CL ( CameraClipDemo ) , <nl> + CL ( CameraClipPerformance ) <nl> } ; <nl> # define MAX_LAYER ( sizeof ( createFunctions ) / sizeof ( createFunctions [ 0 ] ) ) <nl> <nl> void CameraClipDemo : : update ( float fDelta ) <nl> } <nl> } <nl> <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + / / CameraClipDemo <nl> + CameraClipPerformance : : CameraClipPerformance ( void ) <nl> + : BaseTest ( ) <nl> + , _labelDrawCall ( nullptr ) <nl> + , _layer3D ( nullptr ) <nl> + , _cameraFirst ( nullptr ) <nl> + , _drawAABB ( nullptr ) <nl> + / / , _sprite3D ( nullptr ) <nl> + { <nl> + } <nl> + CameraClipPerformance : : ~ CameraClipPerformance ( void ) <nl> + { <nl> + } <nl> + <nl> + std : : string CameraClipPerformance : : title ( ) const <nl> + { <nl> + return " Testing Camera " ; <nl> + } <nl> + <nl> + std : : string CameraClipPerformance : : subtitle ( ) const <nl> + { <nl> + return " ClipPerformance Test " ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : inFrustum ( Ref * sender ) <nl> + { <nl> + float newY = 0 . f - _posY ; <nl> + Mat4 mat = Mat4 : : IDENTITY ; <nl> + mat . translate ( 0 , newY , 0 ) ; <nl> + _drawAABB - > clear ( ) ; <nl> + <nl> + for ( auto & iter : listAABB ) <nl> + { <nl> + iter . transform ( mat ) ; <nl> + Vec3 corners [ 8 ] ; <nl> + iter . getCorners ( corners ) ; <nl> + _drawAABB - > drawCube ( corners , Color4F ( 0 , 1 , 0 , 1 ) ) ; <nl> + } <nl> + <nl> + _posY = 0 ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : partInFrustum ( Ref * sender ) <nl> + { <nl> + float newY = 60 . f - _posY ; <nl> + Mat4 mat = Mat4 : : IDENTITY ; <nl> + mat . translate ( 0 , newY , 0 ) ; <nl> + _drawAABB - > clear ( ) ; <nl> + <nl> + for ( auto & iter : listAABB ) <nl> + { <nl> + iter . transform ( mat ) ; <nl> + Vec3 corners [ 8 ] ; <nl> + iter . getCorners ( corners ) ; <nl> + _drawAABB - > drawCube ( corners , Color4F ( 0 , 1 , 0 , 1 ) ) ; <nl> + } <nl> + <nl> + _posY = 60 ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : outFrustum ( Ref * sender ) <nl> + { <nl> + float newY = 90 . f - _posY ; <nl> + Mat4 mat = Mat4 : : IDENTITY ; <nl> + mat . translate ( 0 , newY , 0 ) ; <nl> + _drawAABB - > clear ( ) ; <nl> + <nl> + for ( auto & iter : listAABB ) <nl> + { <nl> + iter . transform ( mat ) ; <nl> + Vec3 corners [ 8 ] ; <nl> + iter . getCorners ( corners ) ; <nl> + _drawAABB - > drawCube ( corners , Color4F ( 0 , 1 , 0 , 1 ) ) ; <nl> + } <nl> + <nl> + _posY = 90 ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : calculate ( Ref * sender ) <nl> + { <nl> + AABB aabb ; <nl> + _cameraFirst - > visibleInFrustum ( aabb ) ; <nl> + <nl> + auto lastTime = utils : : gettime ( ) ; <nl> + for ( auto & iter : listAABB ) <nl> + { <nl> + _cameraFirst - > visibleInFrustum ( iter ) ; <nl> + } <nl> + auto deltaTime = utils : : gettime ( ) - lastTime ; <nl> + <nl> + char szDrawCall [ 255 ] ; <nl> + sprintf ( szDrawCall , " Time : % f " , deltaTime ) ; <nl> + _labelDrawCall - > setString ( szDrawCall ) ; <nl> + } <nl> + <nl> + / / void CameraClipPerformance : : switchViewCallback ( Ref * sender , CameraType cameraType ) <nl> + / / { <nl> + / / if ( _cameraType = = cameraType ) <nl> + / / { <nl> + / / return ; <nl> + / / } <nl> + / / _cameraType = cameraType ; <nl> + / / if ( _cameraType = = CameraType : : FirstCamera ) <nl> + / / { <nl> + / / _drawFrustum - > clear ( ) ; <nl> + / / _cameraFirst - > setCameraFlag ( CameraFlag : : USER1 ) ; <nl> + / / _cameraThird - > setCameraFlag ( CameraFlag : : USER8 ) ; <nl> + / / _cameraFirst - > enableFrustumCull ( true , true ) ; <nl> + / / } <nl> + / / else if ( _cameraType = = CameraType : : ThirdCamera ) <nl> + / / { <nl> + / / _cameraThird - > setCameraFlag ( CameraFlag : : USER1 ) ; <nl> + / / _cameraFirst - > setCameraFlag ( CameraFlag : : USER8 ) ; <nl> + / / _cameraThird - > enableFrustumCull ( false , false ) ; <nl> + / / } <nl> + / / } <nl> + <nl> + void CameraClipPerformance : : onEnter ( ) <nl> + { <nl> + BaseTest : : onEnter ( ) ; <nl> + auto s = Director : : getInstance ( ) - > getWinSize ( ) ; <nl> + auto listener = EventListenerTouchAllAtOnce : : create ( ) ; <nl> + listener - > onTouchesBegan = CC_CALLBACK_2 ( CameraClipDemo : : onTouchesBegan , this ) ; <nl> + listener - > onTouchesMoved = CC_CALLBACK_2 ( CameraClipDemo : : onTouchesMoved , this ) ; <nl> + listener - > onTouchesEnded = CC_CALLBACK_2 ( CameraClipDemo : : onTouchesEnded , this ) ; <nl> + _eventDispatcher - > addEventListenerWithSceneGraphPriority ( listener , this ) ; <nl> + <nl> + <nl> + TTFConfig ttfConfig ( " fonts / arial . ttf " , 20 ) ; <nl> + auto label1 = Label : : createWithTTF ( ttfConfig , " In " ) ; <nl> + auto menuItem1 = MenuItemLabel : : create ( label1 , CC_CALLBACK_1 ( CameraClipPerformance : : inFrustum , this ) ) ; <nl> + auto label2 = Label : : createWithTTF ( ttfConfig , " Part In " ) ; <nl> + auto menuItem2 = MenuItemLabel : : create ( label2 , CC_CALLBACK_1 ( CameraClipPerformance : : partInFrustum , this ) ) ; <nl> + auto label3 = Label : : createWithTTF ( ttfConfig , " Out " ) ; <nl> + auto menuItem3 = MenuItemLabel : : create ( label3 , CC_CALLBACK_1 ( CameraClipPerformance : : outFrustum , this ) ) ; <nl> + auto label4 = Label : : createWithTTF ( ttfConfig , " Calculate " ) ; <nl> + auto menuItem4 = MenuItemLabel : : create ( label4 , CC_CALLBACK_1 ( CameraClipPerformance : : calculate , this ) ) ; <nl> + <nl> + auto menu = Menu : : create ( menuItem1 , menuItem2 , menuItem3 , menuItem4 , NULL ) ; <nl> + <nl> + menu - > setPosition ( Vec2 : : ZERO ) ; <nl> + menuItem1 - > setPosition ( VisibleRect : : left ( ) . x + 70 , VisibleRect : : top ( ) . y - 50 ) ; <nl> + menuItem2 - > setPosition ( VisibleRect : : left ( ) . x + 70 , VisibleRect : : top ( ) . y - 80 ) ; <nl> + menuItem3 - > setPosition ( VisibleRect : : left ( ) . x + 70 , VisibleRect : : top ( ) . y - 110 ) ; <nl> + menuItem4 - > setPosition ( VisibleRect : : left ( ) . x + 70 , VisibleRect : : top ( ) . y - 140 ) ; <nl> + addChild ( menu , 0 ) ; <nl> + <nl> + _labelDrawCall = Label : : createWithTTF ( ttfConfig , " Time : " ) ; <nl> + _labelDrawCall - > setPosition ( VisibleRect : : rightTop ( ) . x - 80 , VisibleRect : : rightTop ( ) . y - 50 ) ; <nl> + addChild ( _labelDrawCall , 0 ) ; <nl> + <nl> + / / 3D layer <nl> + auto layer3D = Layer : : create ( ) ; <nl> + addChild ( layer3D , 0 ) ; <nl> + _layer3D = layer3D ; <nl> + <nl> + / / init camera <nl> + initCamera ( ) ; <nl> + <nl> + / / draw line <nl> + DrawLine3D * line = DrawLine3D : : create ( ) ; <nl> + const int gridNum = 30 ; <nl> + const int girdSize = 5 ; <nl> + / / draw x <nl> + for ( int j = - gridNum ; j < = gridNum ; j + + ) <nl> + { <nl> + line - > drawLine ( Vec3 ( - gridNum * girdSize , 0 , 5 * j ) , Vec3 ( gridNum * girdSize , 0 , 5 * j ) , Color4F ( 1 , 0 , 0 , 1 ) ) ; <nl> + } <nl> + / / draw z <nl> + for ( int j = - gridNum ; j < = gridNum ; j + + ) <nl> + { <nl> + line - > drawLine ( Vec3 ( 5 * j , 0 , - gridNum * girdSize ) , Vec3 ( 5 * j , 0 , gridNum * girdSize ) , Color4F ( 0 , 0 , 1 , 1 ) ) ; <nl> + } <nl> + <nl> + _layer3D - > addChild ( line ) ; <nl> + <nl> + _drawAABB = DrawLine3D : : create ( ) ; <nl> + _layer3D - > addChild ( _drawAABB ) ; <nl> + <nl> + / / / / add some objects to 3d layer <nl> + / / _sprite3D = Sprite3D : : create ( " Sprite3DTest / boss . c3b " ) ; <nl> + / / _layer3D - > addChild ( _sprite3D ) ; <nl> + <nl> + _posY = 0 . f ; <nl> + <nl> + / / int num = 1000 ; <nl> + listAABB . clear ( ) ; <nl> + for ( int i = - 500 ; i < 500 ; i + + ) <nl> + { <nl> + AABB aabb ( Vec3 ( - 10 , - 10 , - 10 ) , Vec3 ( 10 , 10 , 10 ) ) ; <nl> + Mat4 mat = Mat4 : : IDENTITY ; <nl> + mat . translate ( i / 10 . f , _posY , 0 ) ; <nl> + aabb . transform ( mat ) ; <nl> + listAABB . push_back ( aabb ) ; <nl> + } <nl> + <nl> + for ( const auto & iter : listAABB ) { <nl> + Vec3 corners [ 8 ] ; <nl> + iter . getCorners ( corners ) ; <nl> + _drawAABB - > drawCube ( corners , Color4F ( 0 , 1 , 0 , 1 ) ) ; <nl> + } <nl> + <nl> + _layer3D - > setCameraMask ( 2 ) ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : onExit ( ) <nl> + { <nl> + BaseTest : : onExit ( ) ; <nl> + if ( _cameraFirst ) <nl> + { <nl> + _cameraFirst = nullptr ; <nl> + } <nl> + } <nl> + <nl> + void CameraClipPerformance : : restartCallback ( Ref * sender ) <nl> + { <nl> + auto s = new ( std : : nothrow ) Camera3DTestScene ( ) ; <nl> + s - > addChild ( restartSpriteTestAction ( ) ) ; <nl> + <nl> + Director : : getInstance ( ) - > replaceScene ( s ) ; <nl> + s - > release ( ) ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : nextCallback ( Ref * sender ) <nl> + { <nl> + auto s = new ( std : : nothrow ) Camera3DTestScene ( ) ; <nl> + s - > addChild ( nextSpriteTestAction ( ) ) ; <nl> + Director : : getInstance ( ) - > replaceScene ( s ) ; <nl> + s - > release ( ) ; <nl> + } <nl> + void CameraClipPerformance : : backCallback ( Ref * sender ) <nl> + { <nl> + auto s = new ( std : : nothrow ) Camera3DTestScene ( ) ; <nl> + s - > addChild ( backSpriteTestAction ( ) ) ; <nl> + Director : : getInstance ( ) - > replaceScene ( s ) ; <nl> + s - > release ( ) ; <nl> + } <nl> + <nl> + void CameraClipPerformance : : initCamera ( ) <nl> + { <nl> + auto s = Director : : getInstance ( ) - > getWinSize ( ) ; <nl> + _cameraFirst = Camera : : createPerspective ( 60 , ( GLfloat ) s . width / s . height , 1 , 300 ) ; <nl> + _cameraFirst - > setPosition3D ( Vec3 ( 0 , 0 , 100 ) ) ; <nl> + _cameraFirst - > lookAt ( Vec3 ( 0 , 0 , 0 ) , Vec3 ( 0 , 1 , 0 ) ) ; <nl> + _cameraFirst - > setCameraFlag ( CameraFlag : : USER1 ) ; <nl> + / / _cameraFirst - > enableFrustumCull ( false , false ) ; <nl> + _layer3D - > addChild ( _cameraFirst ) ; <nl> + } <nl> + <nl> void Camera3DTestScene : : runThisTest ( ) <nl> { <nl> auto layer = nextSpriteTestAction ( ) ; <nl> mmm a / tests / cpp - tests / Classes / Camera3DTest / Camera3DTest . h <nl> ppp b / tests / cpp - tests / Classes / Camera3DTest / Camera3DTest . h <nl> class CameraClipDemo : public BaseTest <nl> DrawLine3D * _drawFrustum ; <nl> } ; <nl> <nl> + class CameraClipPerformance : public BaseTest <nl> + { <nl> + public : <nl> + CREATE_FUNC ( CameraClipPerformance ) ; <nl> + CameraClipPerformance ( void ) ; <nl> + virtual ~ CameraClipPerformance ( void ) ; <nl> + <nl> + void restartCallback ( Ref * sender ) ; <nl> + void nextCallback ( Ref * sender ) ; <nl> + void backCallback ( Ref * sender ) ; <nl> + virtual void onEnter ( ) override ; <nl> + virtual void onExit ( ) override ; <nl> + / / overrides <nl> + virtual std : : string title ( ) const override ; <nl> + virtual std : : string subtitle ( ) const override ; <nl> + void reachEndCallBack ( ) ; <nl> + void inFrustum ( Ref * sender ) ; <nl> + void partInFrustum ( Ref * sender ) ; <nl> + void outFrustum ( Ref * sender ) ; <nl> + void calculate ( Ref * sender ) ; <nl> + void initCamera ( ) ; <nl> + <nl> + protected : <nl> + std : : string _title ; <nl> + Label * _labelDrawCall ; <nl> + Layer * _layer3D ; <nl> + Camera * _cameraFirst ; <nl> + DrawLine3D * _drawAABB ; <nl> + / / Sprite3D * _sprite3D ; <nl> + std : : vector < AABB > listAABB ; <nl> + float _posY ; <nl> + } ; <nl> + <nl> class Camera3DTestScene : public TestScene <nl> { <nl> public : <nl>
for camera performance test ! !
cocos2d/cocos2d-x
9485d8d41c515217c2dae1db235d0b3b31c54817
2014-11-06T03:07:58Z
mmm a / stdlib / private / StdlibUnittest / SymbolLookup . swift <nl> ppp b / stdlib / private / StdlibUnittest / SymbolLookup . swift <nl> <nl> # elseif os ( Linux ) <nl> let RTLD_DEFAULT = UnsafeMutableRawPointer ( bitPattern : 0 ) <nl> # elseif os ( Android ) <nl> - # if arch ( arm ) <nl> + # if arch ( arm ) | | arch ( i386 ) <nl> let RTLD_DEFAULT = UnsafeMutableRawPointer ( bitPattern : 0xffffffff as UInt ) <nl> - # elseif arch ( arm64 ) <nl> + # elseif arch ( arm64 ) | | arch ( x86_64 ) <nl> let RTLD_DEFAULT = UnsafeMutableRawPointer ( bitPattern : 0 ) <nl> # else <nl> # error ( " Unsupported platform " ) <nl>
Merge pull request from compnerd / android - x86
apple/swift
8c1bfbe0cad0710876b0b753dea348fb47bd146f
2019-11-04T16:33:48Z
mmm a / core / object . cpp <nl> ppp b / core / object . cpp <nl> void Object : : initialize_class ( ) { <nl> initialized = true ; <nl> } <nl> <nl> - StringName Object : : XL_MESSAGE ( const StringName & p_message ) const { <nl> + StringName Object : : localize ( const StringName & p_message ) const { <nl> <nl> if ( ! _can_translate | | ! TranslationServer : : get_singleton ( ) ) <nl> return p_message ; <nl> StringName Object : : XL_MESSAGE ( const StringName & p_message ) const { <nl> return TranslationServer : : get_singleton ( ) - > translate ( p_message ) ; <nl> } <nl> <nl> - StringName Object : : tr ( const StringName & p_message ) const { <nl> - <nl> - return XL_MESSAGE ( p_message ) ; <nl> - } <nl> - <nl> void Object : : _clear_internal_resource_paths ( const Variant & p_var ) { <nl> <nl> switch ( p_var . get_type ( ) ) { <nl> void Object : : _bind_methods ( ) { <nl> <nl> ClassDB : : bind_method ( D_METHOD ( " set_block_signals " , " enable " ) , & Object : : set_block_signals ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " is_blocking_signals " ) , & Object : : is_blocking_signals ) ; <nl> - ClassDB : : bind_method ( D_METHOD ( " set_message_translation " , " enable " ) , & Object : : set_message_translation ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " set_message_localization " , " enable " ) , & Object : : set_message_localization ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " can_translate_messages " ) , & Object : : can_translate_messages ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " property_list_changed_notify " ) , & Object : : property_list_changed_notify ) ; <nl> <nl> - ClassDB : : bind_method ( D_METHOD ( " XL_MESSAGE " , " message " ) , & Object : : XL_MESSAGE ) ; <nl> - ClassDB : : bind_method ( D_METHOD ( " tr " , " message " ) , & Object : : tr ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " localize " , " message " ) , & Object : : localize ) ; <nl> <nl> ClassDB : : bind_method ( D_METHOD ( " is_queued_for_deletion " ) , & Object : : is_queued_for_deletion ) ; <nl> <nl> mmm a / core / object . h <nl> ppp b / core / object . h <nl> class Object { <nl> <nl> virtual void get_argument_options ( const StringName & p_function , int p_idx , List < String > * r_options ) const ; <nl> <nl> - StringName XL_MESSAGE ( const StringName & p_message ) const ; / / translate message ( internationalization ) <nl> - StringName tr ( const StringName & p_message ) const ; / / translate message ( alternative ) <nl> + StringName localize ( const StringName & p_message ) const ; / / translate message ( internationalization ) <nl> <nl> bool _is_queued_for_deletion ; / / set to true by SceneTree : : queue_delete ( ) <nl> bool is_queued_for_deletion ( ) const ; <nl> <nl> - _FORCE_INLINE_ void set_message_translation ( bool p_enable ) { _can_translate = p_enable ; } <nl> + _FORCE_INLINE_ void set_message_localization ( bool p_enable ) { _can_translate = p_enable ; } <nl> _FORCE_INLINE_ bool can_translate_messages ( ) const { return _can_translate ; } <nl> <nl> # ifdef TOOLS_ENABLED <nl> mmm a / doc / base / classes . xml <nl> ppp b / doc / base / classes . xml <nl> <nl> Objects also receive notifications ( [ method _notification ] ) . Notifications are a simple way to notify the object about simple events , so they can all be handled together . <nl> < / description > <nl> < methods > <nl> - < method name = " XL_MESSAGE " qualifiers = " const " > <nl> - < return type = " String " > <nl> - < / return > <nl> - < argument index = " 0 " name = " message " type = " String " > <nl> - < / argument > <nl> - < description > <nl> - Deprecated , will go away . <nl> - < / description > <nl> - < / method > <nl> < method name = " _get " qualifiers = " virtual " > <nl> < argument index = " 0 " name = " property " type = " String " > <nl> < / argument > <nl> <nl> < description > <nl> < / description > <nl> < / method > <nl> + < method name = " localize " qualifiers = " const " > <nl> + < return type = " String " > <nl> + < / return > <nl> + < argument index = " 0 " name = " message " type = " String " > <nl> + < / argument > <nl> + < description > <nl> + Localize ( translate ) a message . Only works if message localization is enabled ( which it is by default ) . See [ method set_message_localization ] . <nl> + < / description > <nl> + < / method > <nl> < method name = " notification " > <nl> < argument index = " 0 " name = " what " type = " int " > <nl> < / argument > <nl> <nl> If set to true , signal emission is blocked . <nl> < / description > <nl> < / method > <nl> - < method name = " set_message_translation " > <nl> + < method name = " set_message_localization " > <nl> < argument index = " 0 " name = " enable " type = " bool " > <nl> < / argument > <nl> < description > <nl> - Set true if this object can translate strings ( in calls to tr ( ) ) . Default is true . <nl> + Define whether this object can localize strings ( with calls to [ code ] localize [ / code ] ) . Default is true . <nl> < / description > <nl> < / method > <nl> < method name = " set_meta " > <nl> <nl> Set a script into the object , scripts extend the object functionality . <nl> < / description > <nl> < / method > <nl> - < method name = " tr " qualifiers = " const " > <nl> - < return type = " String " > <nl> - < / return > <nl> - < argument index = " 0 " name = " message " type = " String " > <nl> - < / argument > <nl> - < description > <nl> - Translate a message . Only works in message translation is enabled ( which is by default ) . See [ method set_message_translation ] . <nl> - < / description > <nl> - < / method > <nl> < / methods > <nl> < signals > <nl> < signal name = " script_changed " > <nl> mmm a / scene / gui / button . cpp <nl> ppp b / scene / gui / button . cpp <nl> void Button : : _notification ( int p_what ) { <nl> <nl> if ( p_what = = NOTIFICATION_TRANSLATION_CHANGED ) { <nl> <nl> - xl_text = XL_MESSAGE ( text ) ; <nl> + xl_text = localize ( text ) ; <nl> minimum_size_changed ( ) ; <nl> update ( ) ; <nl> } <nl> void Button : : set_text ( const String & p_text ) { <nl> if ( text = = p_text ) <nl> return ; <nl> text = p_text ; <nl> - xl_text = XL_MESSAGE ( p_text ) ; <nl> + xl_text = localize ( p_text ) ; <nl> update ( ) ; <nl> _change_notify ( " text " ) ; <nl> minimum_size_changed ( ) ; <nl> mmm a / scene / gui / dialogs . cpp <nl> ppp b / scene / gui / dialogs . cpp <nl> int WindowDialog : : _drag_hit_test ( const Point2 & pos ) const { <nl> <nl> void WindowDialog : : set_title ( const String & p_title ) { <nl> <nl> - title = XL_MESSAGE ( p_title ) ; <nl> + title = localize ( p_title ) ; <nl> update ( ) ; <nl> } <nl> String WindowDialog : : get_title ( ) const { <nl> mmm a / scene / gui / file_dialog . cpp <nl> ppp b / scene / gui / file_dialog . cpp <nl> void FileDialog : : update_filters ( ) { <nl> String flt = filters [ i ] . get_slice ( " ; " , 0 ) . strip_edges ( ) ; <nl> String desc = filters [ i ] . get_slice ( " ; " , 1 ) . strip_edges ( ) ; <nl> if ( desc . length ( ) ) <nl> - filter - > add_item ( String ( XL_MESSAGE ( desc ) ) + " ( " + flt + " ) " ) ; <nl> + filter - > add_item ( String ( localize ( desc ) ) + " ( " + flt + " ) " ) ; <nl> else <nl> filter - > add_item ( " ( " + flt + " ) " ) ; <nl> } <nl> mmm a / scene / gui / label . cpp <nl> ppp b / scene / gui / label . cpp <nl> void Label : : _notification ( int p_what ) { <nl> <nl> if ( p_what = = NOTIFICATION_TRANSLATION_CHANGED ) { <nl> <nl> - String new_text = XL_MESSAGE ( text ) ; <nl> + String new_text = localize ( text ) ; <nl> if ( new_text = = xl_text ) <nl> return ; / / nothing new <nl> xl_text = new_text ; <nl> void Label : : set_text ( const String & p_string ) { <nl> if ( text = = p_string ) <nl> return ; <nl> text = p_string ; <nl> - xl_text = XL_MESSAGE ( p_string ) ; <nl> + xl_text = localize ( p_string ) ; <nl> word_cache_dirty = true ; <nl> if ( percent_visible < 1 ) <nl> visible_chars = get_total_character_count ( ) * percent_visible ; <nl> mmm a / scene / gui / line_edit . cpp <nl> ppp b / scene / gui / line_edit . cpp <nl> String LineEdit : : get_text ( ) const { <nl> <nl> void LineEdit : : set_placeholder ( String p_text ) { <nl> <nl> - placeholder = XL_MESSAGE ( p_text ) ; <nl> + placeholder = localize ( p_text ) ; <nl> update ( ) ; <nl> } <nl> <nl> mmm a / scene / gui / popup_menu . cpp <nl> ppp b / scene / gui / popup_menu . cpp <nl> Size2 PopupMenu : : get_minimum_size ( ) const { <nl> size . width + = check_w + hseparation ; <nl> } <nl> <nl> - String text = items [ i ] . shortcut . is_valid ( ) ? String ( tr ( items [ i ] . shortcut - > get_name ( ) ) ) : items [ i ] . xl_text ; <nl> + String text = items [ i ] . shortcut . is_valid ( ) ? String ( localize ( items [ i ] . shortcut - > get_name ( ) ) ) : items [ i ] . xl_text ; <nl> size . width + = font - > get_string_size ( text ) . width ; <nl> if ( i > 0 ) <nl> size . height + = vseparation ; <nl> void PopupMenu : : _notification ( int p_what ) { <nl> case NOTIFICATION_TRANSLATION_CHANGED : { <nl> <nl> for ( int i = 0 ; i < items . size ( ) ; i + + ) { <nl> - items [ i ] . xl_text = XL_MESSAGE ( items [ i ] . text ) ; <nl> + items [ i ] . xl_text = localize ( items [ i ] . text ) ; <nl> } <nl> <nl> minimum_size_changed ( ) ; <nl> void PopupMenu : : _notification ( int p_what ) { <nl> } <nl> <nl> item_ofs . y + = font - > get_ascent ( ) ; <nl> - String text = items [ i ] . shortcut . is_valid ( ) ? String ( tr ( items [ i ] . shortcut - > get_name ( ) ) ) : items [ i ] . xl_text ; <nl> + String text = items [ i ] . shortcut . is_valid ( ) ? String ( localize ( items [ i ] . shortcut - > get_name ( ) ) ) : items [ i ] . xl_text ; <nl> if ( ! items [ i ] . separator ) { <nl> <nl> font - > draw ( ci , item_ofs + Point2 ( 0 , Math : : floor ( ( h - font_h ) / 2 . 0 ) ) , text , items [ i ] . disabled ? font_color_disabled : ( i = = mouse_over ? font_color_hover : font_color ) ) ; <nl> void PopupMenu : : add_icon_item ( const Ref < Texture > & p_icon , const String & p_label , <nl> Item item ; <nl> item . icon = p_icon ; <nl> item . text = p_label ; <nl> - item . xl_text = XL_MESSAGE ( p_label ) ; <nl> + item . xl_text = localize ( p_label ) ; <nl> item . accel = p_accel ; <nl> item . ID = p_ID ; <nl> items . push_back ( item ) ; <nl> void PopupMenu : : add_item ( const String & p_label , int p_ID , uint32_t p_accel ) { <nl> <nl> Item item ; <nl> item . text = p_label ; <nl> - item . xl_text = XL_MESSAGE ( p_label ) ; <nl> + item . xl_text = localize ( p_label ) ; <nl> item . accel = p_accel ; <nl> item . ID = p_ID ; <nl> items . push_back ( item ) ; <nl> void PopupMenu : : add_submenu_item ( const String & p_label , const String & p_submenu , <nl> <nl> Item item ; <nl> item . text = p_label ; <nl> - item . xl_text = XL_MESSAGE ( p_label ) ; <nl> + item . xl_text = localize ( p_label ) ; <nl> item . ID = p_ID ; <nl> item . submenu = p_submenu ; <nl> items . push_back ( item ) ; <nl> void PopupMenu : : add_icon_check_item ( const Ref < Texture > & p_icon , const String & p_ <nl> Item item ; <nl> item . icon = p_icon ; <nl> item . text = p_label ; <nl> - item . xl_text = XL_MESSAGE ( p_label ) ; <nl> + item . xl_text = localize ( p_label ) ; <nl> item . accel = p_accel ; <nl> item . ID = p_ID ; <nl> item . checkable = true ; <nl> void PopupMenu : : add_check_item ( const String & p_label , int p_ID , uint32_t p_accel <nl> <nl> Item item ; <nl> item . text = p_label ; <nl> - item . xl_text = XL_MESSAGE ( p_label ) ; <nl> + item . xl_text = localize ( p_label ) ; <nl> item . accel = p_accel ; <nl> item . ID = p_ID ; <nl> item . checkable = true ; <nl> void PopupMenu : : set_item_text ( int p_idx , const String & p_text ) { <nl> <nl> ERR_FAIL_INDEX ( p_idx , items . size ( ) ) ; <nl> items [ p_idx ] . text = p_text ; <nl> - items [ p_idx ] . xl_text = XL_MESSAGE ( p_text ) ; <nl> + items [ p_idx ] . xl_text = localize ( p_text ) ; <nl> <nl> update ( ) ; <nl> } <nl> mmm a / scene / gui / tab_container . cpp <nl> ppp b / scene / gui / tab_container . cpp <nl> void TabContainer : : _notification ( int p_what ) { <nl> <nl> / / Draw the tab contents . <nl> Control * control = tabs [ i + first_tab_cache ] - > cast_to < Control > ( ) ; <nl> - String text = control - > has_meta ( " _tab_name " ) ? String ( XL_MESSAGE ( String ( control - > get_meta ( " _tab_name " ) ) ) ) : String ( control - > get_name ( ) ) ; <nl> + String text = control - > has_meta ( " _tab_name " ) ? String ( localize ( String ( control - > get_meta ( " _tab_name " ) ) ) ) : String ( control - > get_name ( ) ) ; <nl> <nl> int x_content = tab_rect . position . x + tab_style - > get_margin ( MARGIN_LEFT ) ; <nl> int top_margin = tab_style - > get_margin ( MARGIN_TOP ) ; <nl> int TabContainer : : _get_tab_width ( int p_index ) const { <nl> <nl> / / Get the width of the text displayed on the tab . <nl> Ref < Font > font = get_font ( " font " ) ; <nl> - String text = control - > has_meta ( " _tab_name " ) ? String ( XL_MESSAGE ( String ( control - > get_meta ( " _tab_name " ) ) ) ) : String ( control - > get_name ( ) ) ; <nl> + String text = control - > has_meta ( " _tab_name " ) ? String ( localize ( String ( control - > get_meta ( " _tab_name " ) ) ) ) : String ( control - > get_name ( ) ) ; <nl> int width = font - > get_string_size ( text ) . width ; <nl> <nl> / / Add space for a tab icon . <nl>
Rename ` XL_MESSAGE ` aka ` tr ` to ` localize `
godotengine/godot
c72529baf09927b381e7850a0f132c1473b16ee2
2017-08-17T16:10:22Z
mmm a / src / arch / io / timer / timer_signal_provider . cc <nl> ppp b / src / arch / io / timer / timer_signal_provider . cc <nl> <nl> # define sigev_notify_thread_id _sigev_un . _tid <nl> <nl> void timer_signal_provider_signal_handler ( UNUSED int signum , siginfo_t * siginfo , UNUSED void * uctx ) { <nl> - timer_provider_callback_t * callback = static_cast < timer_provider_callback_t * > ( siginfo - > si_value . sival_ptr ) ; <nl> + timer_signal_provider_t * provider = static_cast < timer_signal_provider_t * > ( siginfo - > si_value . sival_ptr ) ; <nl> <nl> - / / The number of timer ticks that have happened is 1 plus the timer signal ' s overrun count . <nl> - callback - > on_timer ( 1 + siginfo - > si_overrun ) ; <nl> + timer_provider_interactor_t * local_cb = provider - > callback ; <nl> + if ( local_cb ! = NULL ) { <nl> + provider - > callback = NULL ; <nl> + local_cb - > on_oneshot ( ) ; <nl> + } <nl> } <nl> <nl> / * Kernel timer provider based on signals * / <nl> - timer_signal_provider_t : : timer_signal_provider_t ( UNUSED linux_event_queue_t * queue , <nl> - timer_provider_callback_t * callback , <nl> - time_t secs , int32_t nsecs ) { <nl> + timer_signal_provider_t : : timer_signal_provider_t ( UNUSED linux_event_queue_t * queue ) <nl> + : callback ( NULL ) { <nl> struct sigaction sa = make_sa_sigaction ( SA_SIGINFO , & timer_signal_provider_signal_handler ) ; <nl> <nl> / / Register the signal . <nl> timer_signal_provider_t : : timer_signal_provider_t ( UNUSED linux_event_queue_t * que <nl> evp . sigev_signo = TIMER_NOTIFY_SIGNAL ; <nl> evp . sigev_notify = SIGEV_THREAD_ID ; <nl> evp . sigev_notify_thread_id = _gettid ( ) ; <nl> - evp . sigev_value . sival_ptr = callback ; <nl> + evp . sigev_value . sival_ptr = this ; <nl> <nl> / / Create the timer <nl> res = timer_create ( CLOCK_MONOTONIC , & evp , & timerid ) ; <nl> guarantee_err ( res = = 0 , " Could not create timer " ) ; <nl> - <nl> - / / Start the timer <nl> - itimerspec timer_spec ; <nl> - bzero ( & timer_spec , sizeof ( timer_spec ) ) ; <nl> - timer_spec . it_value . tv_sec = timer_spec . it_interval . tv_sec = secs ; <nl> - timer_spec . it_value . tv_nsec = timer_spec . it_interval . tv_nsec = nsecs ; <nl> - <nl> - res = timer_settime ( timerid , 0 , & timer_spec , NULL ) ; <nl> - guarantee_err ( res = = 0 , " Could not arm the timer " ) ; <nl> } <nl> <nl> timer_signal_provider_t : : ~ timer_signal_provider_t ( ) { <nl> + guarantee ( callback = = NULL ) ; <nl> + <nl> int res = timer_delete ( timerid ) ; <nl> guarantee_err ( res = = 0 , " timer_delete failed " ) ; <nl> <nl> timer_signal_provider_t : : ~ timer_signal_provider_t ( ) { <nl> guarantee_err ( res = = 0 , " timer signal provider could not unregister the signal handler " ) ; <nl> } <nl> <nl> + void timer_signal_provider_t : : schedule_oneshot ( int64_t next_time_in_nanos , timer_provider_interactor_t * cb ) { <nl> + / / We could ostensibly use TIMER_ABSTIME in the timer_settime call instead of specifying a <nl> + / / relative timer , but that would make our code fragilely depend on get_ticks ( ) using <nl> + / / CLOCK_MONOTONIC . <nl> + <nl> + const int64_t ticks = get_ticks ( ) ; <nl> + const int64_t time_diff = next_time_in_nanos - ticks ; <nl> + const int64_t wait_time = std : : max < int64_t > ( 1 , time_diff ) ; <nl> + <nl> + itimerspec spec ; <nl> + spec . it_value . tv_sec = wait_time / BILLION ; <nl> + spec . it_value . tv_nsec = wait_time % BILLION ; <nl> + spec . it_interval . tv_sec = 0 ; <nl> + spec . it_interval . tv_nsec = 0 ; <nl> + <nl> + const int res = timer_settime ( timerid , 0 , & spec , NULL ) ; <nl> + guarantee_err ( res = = 0 , " Could not arm the timer " ) ; <nl> + } <nl> + <nl> + void timer_signal_provider_t : : unschedule_oneshot ( ) { <nl> + struct itimerspec spec ; <nl> + spec . it_interval . tv_sec = 0 ; <nl> + spec . it_interval . tv_nsec = 0 ; <nl> + spec . it_value . tv_sec = 0 ; <nl> + spec . it_value . tv_nsec = 0 ; <nl> + <nl> + const int res = timer_settime ( timerid , 0 , & spec , NULL ) ; <nl> + guarantee_err ( res = = 0 , " Could not disarm the timer . " ) ; <nl> + } <nl> + <nl> # endif / / RDB_TIMER_PROVIDER = = RDB_TIMER_PROVIDER_SIGNAL <nl> mmm a / src / arch / io / timer / timer_signal_provider . hpp <nl> ppp b / src / arch / io / timer / timer_signal_provider . hpp <nl> <nl> <nl> # include " arch / runtime / event_queue . hpp " <nl> <nl> - struct timer_provider_callback_t ; <nl> + struct timer_provider_interactor_t ; <nl> <nl> # define TIMER_NOTIFY_SIGNAL ( SIGRTMIN + 3 ) <nl> <nl> / * Kernel timer provider based on signals * / <nl> struct timer_signal_provider_t { <nl> public : <nl> - timer_signal_provider_t ( linux_event_queue_t * _queue , <nl> - timer_provider_callback_t * _callback , <nl> - time_t secs , int32_t nsecs ) ; <nl> + timer_signal_provider_t ( linux_event_queue_t * _queue ) ; <nl> ~ timer_signal_provider_t ( ) ; <nl> <nl> + void schedule_oneshot ( int64_t next_time_in_nanos , timer_provider_interactor_t * cb ) ; <nl> + void unschedule_oneshot ( ) ; <nl> + <nl> private : <nl> + friend void timer_signal_provider_signal_handler ( UNUSED int signum , siginfo_t * siginfo , UNUSED void * uctx ) ; <nl> + <nl> timer_t timerid ; <nl> + timer_provider_interactor_t * callback ; <nl> <nl> DISABLE_COPYING ( timer_signal_provider_t ) ; <nl> } ; <nl> mmm a / src / arch / io / timer / timerfd_provider . cc <nl> ppp b / src / arch / io / timer / timerfd_provider . cc <nl> timerfd_provider_t : : ~ timerfd_provider_t ( ) { <nl> guarantee_err ( res = = 0 | | errno = = EINTR , " Could not close the timer . " ) ; <nl> } <nl> <nl> - void timerfd_provider_t : : schedule_oneshot ( const uint64_t next_time_in_nanos , timer_provider_interactor_t * const cb ) { <nl> + void timerfd_provider_t : : schedule_oneshot ( const int64_t next_time_in_nanos , timer_provider_interactor_t * const cb ) { <nl> / / We could pass TFD_TIMER_ABSTIME to timerfd_settime ( thus avoiding the std : : max logic below ) , <nl> / / but that would mean this code depends on the fact that get_ticks ( ) is implemented in terms of <nl> / / CLOCK_MONOTONIC . <nl> <nl> - const int64_t time_difference = static_cast < int64_t > ( next_time_in_nanos ) - static_cast < int64_t > ( get_ticks ( ) ) ; <nl> + const int64_t time_difference = next_time_in_nanos - static_cast < int64_t > ( get_ticks ( ) ) ; <nl> const int64_t wait_nanos = std : : max < int64_t > ( 1 , time_difference ) ; <nl> <nl> struct itimerspec spec ; <nl> void timerfd_provider_t : : schedule_oneshot ( const uint64_t next_time_in_nanos , tim <nl> spec . it_value . tv_sec = wait_nanos / BILLION ; <nl> spec . it_value . tv_nsec = wait_nanos % BILLION ; <nl> <nl> - <nl> - int res = timerfd_settime ( timer_fd , 0 , & spec , NULL ) ; <nl> + const int res = timerfd_settime ( timer_fd , 0 , & spec , NULL ) ; <nl> guarantee_err ( res = = 0 , " Could not arm the timer . " ) ; <nl> <nl> callback = cb ; <nl> void timerfd_provider_t : : unschedule_oneshot ( ) { <nl> spec . it_value . tv_sec = 0 ; <nl> spec . it_value . tv_nsec = 0 ; <nl> <nl> - int res = timerfd_settime ( timer_fd , 0 , & spec , NULL ) ; <nl> + const int res = timerfd_settime ( timer_fd , 0 , & spec , NULL ) ; <nl> guarantee_err ( res = = 0 , " Could not disarm the timer . " ) ; <nl> <nl> callback = NULL ; <nl> void timerfd_provider_t : : on_event ( int events ) { <nl> const int res = eventfd_read ( timer_fd , & nexpirations ) ; <nl> guarantee_err ( res = = 0 | | errno = = EAGAIN , " Could not read timer_fd value " ) ; <nl> if ( res = = 0 & & nexpirations > 0 ) { <nl> - timer_provider_interactor_t * local_cb = callback ; <nl> - callback = NULL ; <nl> - local_cb - > on_oneshot ( ) ; <nl> + / / The callback could be unscheduled but after the timerfd rang , maybe . So we check here . <nl> + if ( callback ! = NULL ) { <nl> + timer_provider_interactor_t * local_cb = callback ; <nl> + callback = NULL ; <nl> + local_cb - > on_oneshot ( ) ; <nl> + } <nl> } <nl> } <nl> <nl> mmm a / src / arch / io / timer / timerfd_provider . hpp <nl> ppp b / src / arch / io / timer / timerfd_provider . hpp <nl> struct timerfd_provider_t : public linux_event_callback_t { <nl> timerfd_provider_t ( linux_event_queue_t * _queue ) ; <nl> ~ timerfd_provider_t ( ) ; <nl> <nl> - void schedule_oneshot ( uint64_t next_time_in_nanos , timer_provider_interactor_t * cb ) ; <nl> + void schedule_oneshot ( int64_t next_time_in_nanos , timer_provider_interactor_t * cb ) ; <nl> void unschedule_oneshot ( ) ; <nl> <nl> private : <nl> mmm a / src / arch / runtime / runtime_utils . cc <nl> ppp b / src / arch / runtime / runtime_utils . cc <nl> uint64_t get_clock_cycles ( ) { <nl> <nl> bool watchdog_check_enabled = false ; <nl> __thread uint64_t watchdog_start_time = 0 ; <nl> - const uint64_t MAX_WATCHDOG_DELTA = 100000000 ; <nl> + const uint64_t MAX_WATCHDOG_DELTA = 100 * MILLION ; <nl> # endif / / NDEBUG <nl> <nl> int get_cpu_count ( ) { <nl> mmm a / src / arch / timer . cc <nl> ppp b / src / arch / timer . cc <nl> void timer_handler_t : : on_oneshot ( ) { <nl> } <nl> <nl> timer_token_t * timer_handler_t : : add_timer_internal ( const int64_t ms , timer_callback_t * callback , const bool once ) { <nl> - const int64_t nanos = ms * 1000000LL ; <nl> + const int64_t nanos = ms * MILLION ; <nl> guarantee ( nanos > 0 ) ; <nl> <nl> const int64_t next_time_in_nanos = get_ticks ( ) + nanos ; <nl> mmm a / src / clustering / administration / http / log_app . cc <nl> ppp b / src / clustering / administration / http / log_app . cc <nl> cJSON * render_as_json ( log_message_t * message ) { <nl> std : : string timestamp_buffer = strprintf ( " % ld . % 09ld " , message - > timestamp . tv_sec , message - > timestamp . tv_nsec ) ; <nl> scoped_cJSON_t json ( cJSON_CreateObject ( ) ) ; <nl> json . AddItemToObject ( " timestamp " , cJSON_CreateString ( timestamp_buffer . c_str ( ) ) ) ; <nl> - json . AddItemToObject ( " uptime " , cJSON_CreateNumber ( message - > uptime . tv_sec + message - > uptime . tv_nsec / 1000000000 . 0 ) ) ; <nl> + json . AddItemToObject ( " uptime " , cJSON_CreateNumber ( message - > uptime . tv_sec + message - > uptime . tv_nsec / static_cast < double > ( BILLION ) ) ) ; <nl> json . AddItemToObject ( " level " , cJSON_CreateString ( format_log_level ( message - > level ) . c_str ( ) ) ) ; <nl> json . AddItemToObject ( " message " , cJSON_CreateString ( message - > message . c_str ( ) ) ) ; <nl> return json . release ( ) ; <nl> http_res_t log_http_app_t : : handle ( const http_req_t & req ) { <nl> } <nl> <nl> int max_length = 100 ; <nl> - struct timespec min_timestamp = { 0 , 0 } , max_timestamp = { time ( NULL ) + 1000 , 0 } ; <nl> + struct timespec min_timestamp = { 0 , 0 } , max_timestamp = { time ( NULL ) + THOUSAND , 0 } ; <nl> if ( boost : : optional < std : : string > max_length_string = req . find_query_param ( " max_length " ) ) { <nl> char dummy ; <nl> int res = sscanf ( max_length_string . get ( ) . c_str ( ) , " % d % c " , & max_length , & dummy ) ; <nl> mmm a / src / clustering / administration / logger . cc <nl> ppp b / src / clustering / administration / logger . cc <nl> std : : string format_log_message ( const log_message_t & m , bool for_console ) { <nl> <nl> std : : string prepend ; <nl> if ( ! for_console ) { <nl> - prepend = strprintf ( " % s % ld . % 06lds % s : " , <nl> + prepend = strprintf ( " % s % ld . % 06llds % s : " , <nl> format_time ( m . timestamp ) . c_str ( ) , <nl> m . uptime . tv_sec , <nl> - m . uptime . tv_nsec / 1000 , <nl> + m . uptime . tv_nsec / THOUSAND , <nl> format_log_level ( m . level ) . c_str ( ) ) ; <nl> } else { <nl> prepend = strprintf ( " % s : " , format_log_level ( m . level ) . c_str ( ) ) ; <nl> log_message_t parse_log_message ( const std : : string & s ) THROWS_ONLY ( std : : runtime_e <nl> } <nl> <nl> / / TODO : Seriously ? We assume three decimal places ? <nl> - uptime . tv_nsec = 1000 * tv_nsec ; <nl> + uptime . tv_nsec = THOUSAND * tv_nsec ; <nl> } <nl> <nl> log_level_t level = parse_log_level ( std : : string ( start_level , end_level - start_level ) ) ; <nl> log_message_t assemble_log_message ( log_level_t level , const std : : string & message <nl> struct timespec timestamp = clock_realtime ( ) ; <nl> struct timespec uptime = clock_monotonic ( ) ; <nl> if ( uptime . tv_nsec < uptime_reference . tv_nsec ) { <nl> - uptime . tv_nsec + = 1000000000 ; <nl> + uptime . tv_nsec + = BILLION ; <nl> uptime . tv_sec - = 1 ; <nl> } <nl> uptime . tv_nsec - = uptime_reference . tv_nsec ; <nl> mmm a / src / unittest / server_test_helper . cc <nl> ppp b / src / unittest / server_test_helper . cc <nl> void server_test_helper_t : : run_serializer_tests ( ) { <nl> mirrored_cache_static_config_t cache_static_cfg ; <nl> cache_t : : create ( this - > serializer , & cache_static_cfg ) ; <nl> mirrored_cache_config_t cache_cfg ; <nl> - cache_cfg . flush_timer_ms = 1000000 ; <nl> - cache_cfg . flush_dirty_size = 1000000000 ; <nl> + cache_cfg . flush_timer_ms = MILLION ; <nl> + cache_cfg . flush_dirty_size = BILLION ; <nl> cache_cfg . max_size = GIGABYTE ; <nl> cache_t cache ( this - > serializer , & cache_cfg , & get_global_perfmon_collection ( ) ) ; <nl> <nl> mmm a / src / utils . cc <nl> ppp b / src / utils . cc <nl> microtime_t current_microtime ( ) { <nl> struct timeval t ; <nl> DEBUG_VAR int res = gettimeofday ( & t , NULL ) ; <nl> rassert ( 0 = = res ) ; <nl> - return uint64_t ( t . tv_sec ) * ( 1000 * 1000 ) + t . tv_usec ; <nl> + return uint64_t ( t . tv_sec ) * MILLION + t . tv_usec ; <nl> } <nl> <nl> void * malloc_aligned ( size_t size , size_t alignment ) { <nl> int64_t round_up_to_power_of_two ( int64_t x ) { <nl> } <nl> <nl> ticks_t secs_to_ticks ( time_t secs ) { <nl> - return static_cast < ticks_t > ( secs ) * 1000000000 ; <nl> + return static_cast < ticks_t > ( secs ) * BILLION ; <nl> } <nl> <nl> # ifdef __MACH__ <nl> time_t get_secs ( ) { <nl> } <nl> <nl> double ticks_to_secs ( ticks_t ticks ) { <nl> - return ticks / 1000000000 . 0 ; <nl> + return ticks / static_cast < double > ( BILLION ) ; <nl> } <nl> <nl> <nl>
Replaced some numeric literals with the macros MILLION , THOUSAND , etc .
rethinkdb/rethinkdb
02a1e8ac0c1a9fd4ab918d802ea67c57dff720b9
2013-01-17T23:50:44Z
mmm a / test / functional / p2p_filter . py <nl> ppp b / test / functional / p2p_filter . py <nl> def set_test_params ( self ) : <nl> def skip_test_if_missing_module ( self ) : <nl> self . skip_if_no_wallet ( ) <nl> <nl> - def run_test ( self ) : <nl> - filter_node = self . nodes [ 0 ] . add_p2p_connection ( FilterNode ( ) ) <nl> - <nl> + def test_size_limits ( self , filter_node ) : <nl> self . log . info ( ' Check that too large filter is rejected ' ) <nl> - with self . nodes [ 0 ] . assert_debug_log ( [ ' Misbehaving ' ] ) : <nl> - filter_node . send_and_ping ( msg_filterload ( data = b ' \ xaa ' , nHashFuncs = MAX_BLOOM_HASH_FUNCS + 1 ) ) <nl> with self . nodes [ 0 ] . assert_debug_log ( [ ' Misbehaving ' ] ) : <nl> filter_node . send_and_ping ( msg_filterload ( data = b ' \ xbb ' * ( MAX_BLOOM_FILTER_SIZE + 1 ) ) ) <nl> <nl> + self . log . info ( ' Check that max size filter is accepted ' ) <nl> + with self . nodes [ 0 ] . assert_debug_log ( [ ] , unexpected_msgs = [ ' Misbehaving ' ] ) : <nl> + filter_node . send_and_ping ( msg_filterload ( data = b ' \ xbb ' * ( MAX_BLOOM_FILTER_SIZE ) ) ) <nl> + filter_node . send_and_ping ( msg_filterclear ( ) ) <nl> + <nl> + self . log . info ( ' Check that filter with too many hash functions is rejected ' ) <nl> + with self . nodes [ 0 ] . assert_debug_log ( [ ' Misbehaving ' ] ) : <nl> + filter_node . send_and_ping ( msg_filterload ( data = b ' \ xaa ' , nHashFuncs = MAX_BLOOM_HASH_FUNCS + 1 ) ) <nl> + <nl> + self . log . info ( ' Check that filter with max hash functions is accepted ' ) <nl> + with self . nodes [ 0 ] . assert_debug_log ( [ ] , unexpected_msgs = [ ' Misbehaving ' ] ) : <nl> + filter_node . send_and_ping ( msg_filterload ( data = b ' \ xaa ' , nHashFuncs = MAX_BLOOM_HASH_FUNCS ) ) <nl> + # Don ' t send filterclear until next two filteradd checks are done <nl> + <nl> + self . log . info ( ' Check that max size data element to add to the filter is accepted ' ) <nl> + with self . nodes [ 0 ] . assert_debug_log ( [ ] , unexpected_msgs = [ ' Misbehaving ' ] ) : <nl> + filter_node . send_and_ping ( msg_filteradd ( data = b ' \ xcc ' * ( MAX_SCRIPT_ELEMENT_SIZE ) ) ) <nl> + <nl> self . log . info ( ' Check that too large data element to add to the filter is rejected ' ) <nl> with self . nodes [ 0 ] . assert_debug_log ( [ ' Misbehaving ' ] ) : <nl> filter_node . send_and_ping ( msg_filteradd ( data = b ' \ xcc ' * ( MAX_SCRIPT_ELEMENT_SIZE + 1 ) ) ) <nl> <nl> + filter_node . send_and_ping ( msg_filterclear ( ) ) <nl> + <nl> + def run_test ( self ) : <nl> + filter_node = self . nodes [ 0 ] . add_p2p_connection ( FilterNode ( ) ) <nl> + <nl> + self . test_size_limits ( filter_node ) <nl> + <nl> self . log . info ( ' Add filtered P2P connection to the node ' ) <nl> filter_node . send_and_ping ( filter_node . watch_filter_init ) <nl> filter_address = self . nodes [ 0 ] . decodescript ( filter_node . watch_script_pubkey ) [ ' addresses ' ] [ 0 ] <nl>
test : check misbehavior more independently in p2p_filter . py
bitcoin/bitcoin
cd543d9193ac1882c1b4a8a84e3ac7356a8b7ce9
2020-04-25T16:28:22Z
mmm a / src / mongo / db / repl / bgsync . cpp <nl> ppp b / src / mongo / db / repl / bgsync . cpp <nl> void BackgroundSync : : producerThread ( ) { <nl> std : : string msg ( str : : stream ( ) < < " sync producer problem : " < < e . toString ( ) ) ; <nl> error ( ) < < msg ; <nl> _replCoord - > setMyHeartbeatMessage ( msg ) ; <nl> + sleepmillis ( 100 ) ; / / sleep a bit to keep from hammering this thread with temp . errors . <nl> } catch ( const std : : exception & e2 ) { <nl> severe ( ) < < " sync producer exception : " < < e2 . what ( ) ; <nl> fassertFailed ( 28546 ) ; <nl>
SERVER - 22845 : Do not busy loop on bgsync start errors
mongodb/mongo
145b512c1934a94b7143e540b0c848256d0dfd20
2016-03-11T12:50:19Z
mmm a / Documentation / Makefile . files <nl> ppp b / Documentation / Makefile . files <nl> DOXYGEN = \ <nl> Doxygen / js / server / modules / org / arangodb / arango - collection . c \ <nl> Doxygen / js / server / modules / org / arangodb / arango - database . c \ <nl> Doxygen / js / server / modules / org / arangodb / foxx . c \ <nl> - Doxygen / js / server / modules / org / arangodb / foxx / application . c \ <nl> Doxygen / js / server / modules / org / arangodb / foxx / authentication . c \ <nl> Doxygen / js / server / modules / org / arangodb / foxx / base_middleware . c \ <nl> Doxygen / js / server / modules / org / arangodb / foxx / controller . c \ <nl> mmm a / Documentation / UserManual / FoxxTOC . md <nl> ppp b / Documentation / UserManual / FoxxTOC . md <nl> TOC { # UserManualFoxxTOC } <nl> - @ ref UserManualFoxx <nl> - @ ref UserManualFoxxIntro <nl> - @ ref UserManualFoxxHandlingRequests <nl> - - @ ref UserManualFoxxDetailsApplication <nl> + - @ ref UserManualFoxxDetailsController <nl> - @ ref UserManualFoxxDetailsModel <nl> - @ ref UserManualFoxxDetailsRepository <nl>
fixed doxygen
arangodb/arangodb
95e09941df47cbb05ad97dce9d2dc0762203e9d7
2013-09-05T12:19:22Z
mmm a / folly / Portability . h <nl> ppp b / folly / Portability . h <nl> constexpr auto kIsWindows = true ; <nl> constexpr auto kIsWindows = false ; <nl> # endif <nl> <nl> + # if defined ( __APPLE__ ) <nl> + constexpr auto kIsApple = true ; <nl> + # else <nl> + constexpr auto kIsApple = false ; <nl> + # endif <nl> + <nl> constexpr bool kIsAppleIOS = FOLLY_APPLE_IOS = = 1 ; <nl> constexpr bool kIsAppleMacOS = FOLLY_APPLE_MACOS = = 1 ; <nl> constexpr bool kIsAppleTVOS = FOLLY_APPLE_TVOS = = 1 ; <nl> mmm a / folly / test / TraitsTest . cpp <nl> ppp b / folly / test / TraitsTest . cpp <nl> TEST ( Traits , is_constexpr_default_constructible ) { <nl> / / under clang 10 , crash : https : / / bugs . llvm . org / show_bug . cgi ? id = 47620 <nl> / / and , with assertions disabled , expectation failures showing compiler <nl> / / deviation from the language spec <nl> - if ( kClangVerMajor ! = 10 ) { <nl> + if ( kClangVerMajor ! = ( kIsApple ? 12 : 10 ) ) { <nl> struct NonTrivialDtor { <nl> ~ NonTrivialDtor ( ) { } <nl> } ; <nl>
Fix the Apple LLVM version when disabling tests for Xcode 12
facebook/folly
d8e10145f0f1d83fadad9d223202255717a318eb
2020-09-25T01:21:37Z
mmm a / src / objects . h <nl> ppp b / src / objects . h <nl> class JSObject : public JSReceiver { <nl> static const int kInitialMaxFastElementArray = 100000 ; <nl> <nl> static const int kFastPropertiesSoftLimit = 12 ; <nl> - static const int kMaxFastProperties = 64 ; <nl> + static const int kMaxFastProperties = 128 ; <nl> static const int kMaxInstanceSize = 255 * kPointerSize ; <nl> / / When extending the backing storage for property values , we increase <nl> / / its size by more than the 1 entry necessary , so sequentially adding fields <nl>
Bump kMaxFastProperties ( non - keyed assignments ) to 128 .
v8/v8
76e1386acb3dbc4890bc3c20195474c1b13c2182
2014-04-15T08:59:51Z
mmm a / tools / dockerfile / test / sanity / Dockerfile <nl> ppp b / tools / dockerfile / test / sanity / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> build - essential \ <nl> bzip2 \ <nl> ccache \ <nl> + cmake \ <nl> curl \ <nl> dnsutils \ <nl> gcc \ <nl>
Restore inadvertent change
grpc/grpc
bebd78ee265596c6aa8aed4bc3ff5eaabab0b14a
2020-04-01T19:07:14Z
mmm a / src / runtime / base / server / libevent_server . cpp <nl> ppp b / src / runtime / base / server / libevent_server . cpp <nl> void PendingResponseQueue : : process ( ) { <nl> evhttp_request * request = res . request ; <nl> int code = res . code ; <nl> <nl> + bool skip_sync = false ; <nl> + # ifdef _EVENT_USE_OPENSSL <nl> + skip_sync = evhttp_is_connection_ssl ( request - > evcon ) ; <nl> + # endif <nl> + <nl> if ( res . chunked ) { <nl> if ( res . chunk ) { <nl> if ( res . firstChunk ) { <nl> void PendingResponseQueue : : process ( ) { <nl> } else { <nl> evhttp_send_reply_end ( request ) ; <nl> } <nl> - } else if ( RuntimeOption : : LibEventSyncSend ) { <nl> + } else if ( RuntimeOption : : LibEventSyncSend & & ! skip_sync ) { <nl> evhttp_send_reply_sync_end ( res . nwritten , request ) ; <nl> } else { <nl> const char * reason = HttpProtocol : : GetReasonString ( code ) ; <nl>
Fix SSL support , missed a condition that was sending synced replies
facebook/hhvm
c8153e667e936183edfd66c8f11191928ef30e4b
2010-06-29T01:14:42Z
mmm a / Changelog <nl> ppp b / Changelog <nl> <nl> * Unreleased - Christophe Dumez < chris @ qbittorrent . org > - v2 . 3 . 0 <nl> + - FEATURE : Simplified torrent root folder renaming / truncating ( < v2 . 3 . 0 is no longer forward compatible ) <nl> - FEATURE : Max number of half - open connections can now be edited <nl> - FEATURE : Added support for strict super seeding <nl> <nl> mmm a / src / bittorrent . cpp <nl> ppp b / src / bittorrent . cpp <nl> QTorrentHandle Bittorrent : : addMagnetUri ( QString magnet_uri , bool resumed ) { <nl> qDebug ( " Successfuly loaded " ) ; <nl> } <nl> } <nl> - const QString & savePath = getSavePath ( hash ) ; <nl> + QString torrent_name = misc : : magnetUriToName ( magnet_uri ) ; <nl> + const QString & savePath = getSavePath ( hash , false , QString : : null , torrent_name ) ; <nl> if ( ! defaultTempPath . isEmpty ( ) & & resumed & & ! TorrentPersistentData : : isSeed ( hash ) ) { <nl> qDebug ( " addMagnetURI : Temp folder is enabled . " ) ; <nl> p . save_path = defaultTempPath . toLocal8Bit ( ) . constData ( ) ; <nl> QTorrentHandle Bittorrent : : addTorrent ( QString path , bool fromScanDir , QString fr <nl> } <nl> return h ; <nl> } <nl> + QString root_folder = misc : : truncateRootFolder ( t ) ; <nl> add_torrent_params p ; <nl> / / Getting fast resume data if existing <nl> std : : vector < char > buf ; <nl> QTorrentHandle Bittorrent : : addTorrent ( QString path , bool fromScanDir , QString fr <nl> / / Enforcing the save path defined before URL download ( from RSS for example ) <nl> savePath = savepath_fromurl . take ( QUrl : : fromEncoded ( from_url . toLocal8Bit ( ) ) ) ; <nl> } else { <nl> - savePath = getSavePath ( hash , fromScanDir , path ) ; <nl> + savePath = getSavePath ( hash , fromScanDir , path , root_folder ) ; <nl> } <nl> if ( ! defaultTempPath . isEmpty ( ) & & resumed & & ! TorrentPersistentData : : isSeed ( hash ) ) { <nl> qDebug ( " addTorrent : : Temp folder is enabled . " ) ; <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> QTorrentHandle h ( p - > handle ) ; <nl> if ( h . is_valid ( ) ) { <nl> qDebug ( " Received metadata for % s " , qPrintable ( h . hash ( ) ) ) ; <nl> - # ifdef LIBTORRENT_0_15 <nl> - / / Append . ! qB to incomplete files <nl> - if ( appendqBExtension ) <nl> - appendqBextensionToTorrent ( h , true ) ; <nl> - # endif <nl> - emit metadataReceived ( h ) ; <nl> / / Save metadata <nl> const QDir torrentBackup ( misc : : BTBackupLocation ( ) ) ; <nl> if ( ! QFile : : exists ( torrentBackup . path ( ) + QDir : : separator ( ) + h . hash ( ) + QString ( " . torrent " ) ) ) <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> } <nl> } <nl> } <nl> + # ifdef LIBTORRENT_0_15 <nl> + / / Append . ! qB to incomplete files <nl> + if ( appendqBExtension ) <nl> + appendqBextensionToTorrent ( h , true ) ; <nl> + # endif <nl> + / / Truncate root folder <nl> + misc : : truncateRootFolder ( p - > handle ) ; <nl> + emit metadataReceived ( h ) ; <nl> if ( h . is_paused ( ) ) { <nl> / / XXX : Unfortunately libtorrent - rasterbar does not send a torrent_paused_alert <nl> / / and the torrent can be paused when metadata is received <nl> emit pausedTorrent ( h ) ; <nl> } <nl> + <nl> } <nl> } <nl> else if ( file_error_alert * p = dynamic_cast < file_error_alert * > ( a . get ( ) ) ) { <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> return s - > status ( ) ; <nl> } <nl> <nl> - QString Bittorrent : : getSavePath ( QString hash , bool fromScanDir , QString filePath ) { <nl> + QString Bittorrent : : getSavePath ( QString hash , bool fromScanDir , QString filePath , QString root_folder ) { <nl> QString savePath ; <nl> if ( TorrentTempData : : hasTempData ( hash ) ) { <nl> savePath = TorrentTempData : : getSavePath ( hash ) ; <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> qDebug ( " getSavePath , got save_path from temp data : % s " , qPrintable ( savePath ) ) ; <nl> } else { <nl> savePath = TorrentPersistentData : : getSavePath ( hash ) ; <nl> + bool append_root_folder = false ; <nl> if ( savePath . isEmpty ( ) ) { <nl> if ( fromScanDir & & m_scanFolders - > downloadInTorrentFolder ( filePath ) ) <nl> savePath = QFileInfo ( filePath ) . dir ( ) . path ( ) ; <nl> - else <nl> + else { <nl> savePath = defaultSavePath ; <nl> + append_root_folder = true ; <nl> + } <nl> + } else { <nl> + QSettings settings ( " qBittorrent " , " qBittorrent " ) ; <nl> + if ( ! settings . value ( " ported_to_new_savepath_system " , false ) . toBool ( ) ) { <nl> + append_root_folder = true ; <nl> + } <nl> } <nl> if ( ! fromScanDir & & appendLabelToSavePath ) { <nl> const QString & label = TorrentPersistentData : : getLabel ( hash ) ; <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> } <nl> } <nl> } <nl> + if ( append_root_folder & & ! root_folder . isEmpty ( ) ) { <nl> + / / Append torrent root folder to the save path <nl> + if ( ! savePath . endsWith ( QDir : : separator ( ) ) ) <nl> + savePath + = QDir : : separator ( ) ; <nl> + savePath + = root_folder ; <nl> + TorrentPersistentData : : saveSavePath ( hash , savePath ) ; <nl> + } <nl> qDebug ( " getSavePath , got save_path from persistent data : % s " , qPrintable ( savePath ) ) ; <nl> } <nl> / / Clean path <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> filters < < " * . torrent " ; <nl> const QStringList & torrents_on_hd = torrentBackup . entryList ( filters , QDir : : Files , QDir : : Unsorted ) ; <nl> foreach ( QString hash , torrents_on_hd ) { <nl> + qDebug ( " found torrent with hash : % s on hard disk " , qPrintable ( hash ) ) ; <nl> hash . chop ( 8 ) ; / / remove trailing . torrent <nl> if ( ! known_torrents . contains ( hash ) ) { <nl> std : : cerr < < " ERROR Detected ! ! ! Adding back torrent " < < qPrintable ( hash ) < < " which got lost for some reason . " < < std : : endl ; <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> const int prio = TorrentPersistentData : : getPriority ( hash ) ; <nl> torrent_queue . push ( qMakePair ( prio , hash ) ) ; <nl> } <nl> + qDebug ( " Priority_queue size : % ld " , ( long ) torrent_queue . size ( ) ) ; <nl> / / Resume downloads <nl> while ( ! torrent_queue . empty ( ) ) { <nl> - const QString & hash = torrent_queue . top ( ) . second ; <nl> + const QString hash = torrent_queue . top ( ) . second ; <nl> torrent_queue . pop ( ) ; <nl> qDebug ( " Starting up torrent % s " , qPrintable ( hash ) ) ; <nl> if ( TorrentPersistentData : : isMagnet ( hash ) ) { <nl> void Bittorrent : : addConsoleMessage ( QString msg , QString ) { <nl> addTorrent ( torrentBackup . path ( ) + QDir : : separator ( ) + hash + " . torrent " , false , QString ( ) , true ) ; <nl> } <nl> } <nl> + QSettings settings ( " qBittorrent " , " qBittorrent " ) ; <nl> + settings . setValue ( " ported_to_new_savepath_system " , true ) ; <nl> qDebug ( " Unfinished torrents resumed " ) ; <nl> } <nl> mmm a / src / bittorrent . h <nl> ppp b / src / bittorrent . h <nl> public slots : <nl> void recursiveTorrentDownload ( const QTorrentHandle & h ) ; <nl> <nl> protected : <nl> - QString getSavePath ( QString hash , bool fromScanDir = false , QString filePath = QString ( ) ) ; <nl> + QString getSavePath ( QString hash , bool fromScanDir = false , QString filePath = QString : : null , QString root_folder = QString : : null ) ; <nl> bool initWebUi ( QString username , QString password , int port ) ; <nl> <nl> protected slots : <nl> mmm a / src / misc . cpp <nl> ppp b / src / misc . cpp <nl> long long misc : : freeDiskSpaceOnPath ( QString path ) { <nl> # endif <nl> } <nl> <nl> + QString misc : : truncateRootFolder ( boost : : intrusive_ptr < torrent_info > t ) { <nl> + QString root_folder ; <nl> + int i = 0 ; <nl> + for ( torrent_info : : file_iterator it = t - > begin_files ( ) ; it < t - > end_files ( ) ; it + + ) { <nl> + QString path = QString : : fromUtf8 ( it - > path . string ( ) . c_str ( ) ) ; <nl> + QStringList path_parts = path . split ( " / " , QString : : SkipEmptyParts ) ; <nl> + if ( path_parts . size ( ) > 1 ) { <nl> + root_folder = path_parts . takeFirst ( ) ; <nl> + t - > rename_file ( i , std : : string ( path_parts . join ( " / " ) . toUtf8 ( ) ) ) ; <nl> + } <nl> + + + i ; <nl> + } <nl> + return root_folder ; <nl> + } <nl> + <nl> + QString misc : : truncateRootFolder ( libtorrent : : torrent_handle h ) { <nl> + QString root_folder ; <nl> + int i = 0 ; <nl> + torrent_info t = h . get_torrent_info ( ) ; <nl> + for ( torrent_info : : file_iterator it = t . begin_files ( ) ; it < t . end_files ( ) ; it + + ) { <nl> + QString path = QString : : fromUtf8 ( it - > path . string ( ) . c_str ( ) ) ; <nl> + QStringList path_parts = path . split ( " / " , QString : : SkipEmptyParts ) ; <nl> + if ( path_parts . size ( ) > 1 ) { <nl> + root_folder = path_parts . takeFirst ( ) ; <nl> + h . rename_file ( i , std : : string ( path_parts . join ( " / " ) . toUtf8 ( ) ) ) ; <nl> + } <nl> + + + i ; <nl> + } <nl> + return root_folder ; <nl> + } <nl> + <nl> bool misc : : sameFiles ( QString path1 , QString path2 ) { <nl> QFile f1 ( path1 ) ; <nl> if ( ! f1 . exists ( ) ) return false ; <nl> mmm a / src / misc . h <nl> ppp b / src / misc . h <nl> <nl> # include < QPoint > <nl> <nl> # include < libtorrent / torrent_info . hpp > <nl> + # include < libtorrent / torrent_handle . hpp > <nl> + <nl> using namespace libtorrent ; <nl> <nl> / * Miscellaneaous functions that can be useful * / <nl> class misc : public QObject { <nl> return x ; <nl> } <nl> <nl> + static QString truncateRootFolder ( boost : : intrusive_ptr < torrent_info > t ) ; <nl> + static QString truncateRootFolder ( torrent_handle h ) ; <nl> + <nl> static bool sameFiles ( QString path1 , QString path2 ) ; <nl> static void copyDir ( QString src_path , QString dst_path ) ; <nl> / / Introduced in v2 . 1 . 0 for backward compatibility <nl> mmm a / src / torrentadditiondlg . h <nl> ppp b / src / torrentadditiondlg . h <nl> class torrentAdditionDialog : public QDialog , private Ui_addTorrentDialog { <nl> return ; <nl> } <nl> fileName = misc : : magnetUriToName ( magnet_uri ) ; <nl> - if ( fileName . isEmpty ( ) ) fileName = tr ( " Magnet Link " ) ; <nl> + if ( fileName . isEmpty ( ) ) { <nl> + fileName = tr ( " Magnet Link " ) ; <nl> + } else { <nl> + QString save_path = savePathTxt - > text ( ) ; <nl> + if ( ! save_path . endsWith ( QDir : : separator ( ) ) ) <nl> + save_path + = QDir : : separator ( ) ; <nl> + savePathTxt - > setText ( save_path + fileName ) ; <nl> + } <nl> fileNameLbl - > setText ( QString : : fromUtf8 ( " < center > < b > " ) + fileName + QString : : fromUtf8 ( " < / b > < / center > " ) ) ; <nl> / / Update display <nl> updateDiskSpaceLabels ( ) ; <nl> class torrentAdditionDialog : public QDialog , private Ui_addTorrentDialog { <nl> close ( ) ; <nl> return ; <nl> } <nl> + QString root_folder = misc : : truncateRootFolder ( t ) ; <nl> + if ( ! root_folder . isEmpty ( ) ) { <nl> + QString save_path = savePathTxt - > text ( ) ; <nl> + if ( ! save_path . endsWith ( QDir : : separator ( ) ) ) <nl> + save_path + = QDir : : separator ( ) ; <nl> + savePathTxt - > setText ( save_path + root_folder ) ; <nl> + } <nl> nbFiles = t - > num_files ( ) ; <nl> / / Setting file name <nl> fileName = misc : : toQString ( t - > name ( ) ) ; <nl> mmm a / src / torrentfilesmodel . h <nl> ppp b / src / torrentfilesmodel . h <nl> class TorrentFilesModel : public QAbstractItemModel { <nl> files_index = new TreeItem * [ t . num_files ( ) ] ; <nl> <nl> TreeItem * parent = this - > rootItem ; <nl> - if ( t . num_files ( ) = = 1 ) { <nl> + / * if ( t . num_files ( ) = = 1 ) { <nl> / / Create possible parent folder <nl> QStringList path_parts = misc : : toQString ( t . file_at ( 0 ) . path . string ( ) ) . split ( " / " ) ; <nl> path_parts . removeLast ( ) ; <nl> class TorrentFilesModel : public QAbstractItemModel { <nl> files_index [ 0 ] = f ; <nl> emit layoutChanged ( ) ; <nl> return ; <nl> - } <nl> + } * / <nl> / / Create parent folder <nl> - QString root_name = misc : : toQString ( t . file_at ( 0 ) . path . string ( ) ) . split ( " / " ) . first ( ) ; <nl> - TreeItem * current_parent = new TreeItem ( root_name , parent ) ; <nl> + / / QString root_name = misc : : toQString ( t . file_at ( 0 ) . path . string ( ) ) . split ( " / " ) . first ( ) ; <nl> + / / TreeItem * current_parent = new TreeItem ( root_name , parent ) ; <nl> / / parent - > appendChild ( current_parent ) ; <nl> - TreeItem * root_folder = current_parent ; <nl> + / / TreeItem * root_folder = current_parent ; <nl> + TreeItem * root_folder = parent ; <nl> + TreeItem * current_parent ; <nl> <nl> / / Iterate over files <nl> int i = 0 ; <nl> class TorrentFilesModel : public QAbstractItemModel { <nl> QString path = QDir : : cleanPath ( misc : : toQString ( fi - > path . string ( ) ) ) ; <nl> / / Iterate of parts of the path to create necessary folders <nl> QStringList pathFolders = path . split ( " / " ) ; <nl> - Q_ASSERT ( pathFolders . size ( ) > = 2 ) ; <nl> + / / Q_ASSERT ( pathFolders . size ( ) > = 2 ) ; <nl> QString fileName = pathFolders . takeLast ( ) ; <nl> - QString currentFolderName = pathFolders . takeFirst ( ) ; <nl> - Q_ASSERT ( currentFolderName = = current_parent - > getName ( ) ) ; <nl> + / / QString currentFolderName = pathFolders . takeFirst ( ) ; <nl> + / / Q_ASSERT ( currentFolderName = = current_parent - > getName ( ) ) ; <nl> foreach ( const QString & pathPart , pathFolders ) { <nl> TreeItem * new_parent = current_parent - > childWithName ( pathPart ) ; <nl> if ( ! new_parent ) { <nl>
FEATURE : Simplified torrent root folder renaming / truncating ( < v2 . 3 . 0 is no longer forward compatible )
qbittorrent/qBittorrent
772028106e17eb278f42487b16537d0d2eb19b2e
2010-04-06T09:17:33Z
mmm a / version . txt <nl> ppp b / version . txt <nl> @ @ - 1 + 1 @ @ <nl> - 3 . 1 . 0 - pre - <nl> + 3 . 1 . 0 <nl>
BUMP 3 . 1 . 0
mongodb/mongo
7d15cd965ccb3ad684d8ae4e4f09d5b1e9394552
2015-03-17T14:42:50Z
mmm a / modules / perception / production / conf / perception / perception_common . flag <nl> ppp b / modules / perception / production / conf / perception / perception_common . flag <nl> <nl> # default : 0 . 15 <nl> - - obs_max_local_pose_extrapolation_latency = 0 . 15 <nl> <nl> + - - config_manager_path = . / <nl>
Perception : make ConfigManager works with internal ( )
ApolloAuto/apollo
cb7643cd8f240720c0bb9deea4bb2e0056de91d9
2018-12-13T23:19:48Z
mmm a / docs / tutorial / electron - versioning . md <nl> ppp b / docs / tutorial / electron - versioning . md <nl> <nl> - < ! - - i18n - ignore - - > <nl> + # Electron Versioning <nl> <nl> - Moved to [ Versioning ] ( versioning . md ) <nl> + > A detailed look at our versioning policy and implementation . <nl> <nl> + As of version 2 . 0 . 0 , Electron follows [ semver ] ( # semver ) . The following command will install the most recent stable build of Electron : <nl> + <nl> + ` ` ` sh <nl> + npm install - - save - dev electron <nl> + ` ` ` <nl> + <nl> + To update an existing project to use the latest stable version : <nl> + <nl> + ` ` ` sh <nl> + npm install - - save - dev electron @ latest <nl> + ` ` ` <nl> + <nl> + # # Version 1 . x <nl> + <nl> + Electron versions * < 2 . 0 * did not conform to the [ semver ] ( http : / / semver . org ) spec . Major versions corresponded to end - user API changes . Minor versions corresponded to Chromium major releases . Patch versions corresponded to new features and bug fixes . While convenient for developers merging features , it creates problems for developers of client - facing applications . The QA testing cycles of major apps like Slack , Stride , Teams , Skype , VS Code , Atom , and Desktop can be lengthy and stability is a highly desired outcome . There is a high risk in adopting new features while trying to absorb bug fixes . <nl> + <nl> + Here is an example of the 1 . x strategy : <nl> + <nl> + ! [ ] ( . . / images / versioning - sketch - 0 . png ) <nl> + <nl> + An app developed with ` 1 . 8 . 1 ` cannot take the ` 1 . 8 . 3 ` bug fix without either absorbing the ` 1 . 8 . 2 ` feature , or by backporting the fix and maintaining a new release line . <nl> + <nl> + # # Version 2 . 0 and Beyond <nl> + <nl> + There are several major changes from our 1 . x strategy outlined below . Each change is intended to satisfy the needs and priorities of developers / maintainers and app developers . <nl> + <nl> + 1 . Strict use of semver <nl> + 2 . Introduction of semver - compliant ` - beta ` tags <nl> + 3 . Introduction of [ conventional commit messages ] ( https : / / conventionalcommits . org / ) <nl> + 4 . Clearly defined stabilization branches <nl> + 5 . The ` master ` branch is versionless ; only stability branches contain version information <nl> + <nl> + We will cover in detail how git branching works , how npm tagging works , what developers should expect to see , and how one can backport changes . <nl> + <nl> + # semver <nl> + <nl> + From 2 . 0 onward , Electron will follow semver . <nl> + <nl> + Below is a table explicitly mapping types of changes to their corresponding category of semver ( e . g . Major , Minor , Patch ) . <nl> + <nl> + * * * Major Version Increments * * <nl> + * Chromium version updates <nl> + * node . js major version updates <nl> + * Electron breaking API changes <nl> + * * * Minor Version Increments * * <nl> + * node . js minor version updates <nl> + * Electron non - breaking API changes <nl> + * * * Patch Version Increments * * <nl> + * node . js patch version updates <nl> + * fix - related chromium patches <nl> + * electron bug fixes <nl> + <nl> + Note that most chromium updates will be considered breaking . Fixes that can be backported will likely be cherry - picked as patches . <nl> + <nl> + # Stabilization Branches <nl> + <nl> + Stabilization branches are branches that run parallel to master , taking in only cherry - picked commits that are related to security or stability . These branches are never merged back to master . <nl> + <nl> + ! [ ] ( . . / images / versioning - sketch - 1 . png ) <nl> + <nl> + Stabilization branches are always either * * major * * or * * minor * * version lines , and named against the following template ` $ MAJOR - $ MINOR - x ` e . g . ` 2 - 0 - x ` . <nl> + <nl> + We allow for multiple stabilization branches to exist simultaneously , and intend to support at least two in parallel at all times , backporting security fixes as necessary . <nl> + ! [ ] ( . . / images / versioning - sketch - 2 . png ) <nl> + <nl> + Older lines will not be supported by GitHub , but other groups can take ownership and backport stability and security fixes on their own . We discourage this , but recognize that it makes life easier for many app developers . <nl> + <nl> + # Beta Releases and Bug Fixes <nl> + <nl> + Developers want to know which releases are _safe_ to use . Even seemingly innocent features can introduce regressions in complex applications . At the same time , locking to a fixed version is dangerous because you ’ re ignoring security patches and bug fixes that may have come out since your version . Our goal is to allow the following standard semver ranges in ` package . json ` : <nl> + <nl> + * Use ` ~ 2 . 0 . 0 ` to admit only stability or security related fixes to your ` 2 . 0 . 0 ` release . <nl> + * Use ` ^ 2 . 0 . 0 ` to admit non - breaking _reasonably stable_ feature work as well as security and bug fixes . <nl> + <nl> + What ’ s important about the second point is that apps using ` ^ ` should still be able to expect a reasonable level of stability . To accomplish this , semver allows for a _pre - release identifier_ to indicate a particular version is not yet _safe_ or _stable_ . <nl> + <nl> + Whatever you choose , you will periodically have to bump the version in your ` package . json ` as breaking changes are a fact of Chromium life . <nl> + <nl> + The process is as follows : <nl> + <nl> + 1 . All new major and minor releases lines begin with a ` - beta . N ` tag for ` N > = 1 ` . At that point , the feature set is * * locked * * . That release line admits no further features , and focuses only on security and stability . <nl> + e . g . ` 2 . 0 . 0 - beta . 1 ` . <nl> + 2 . Bug fixes , regression fixes , and security patches can be admitted . Upon doing so , a new beta is released incrementing ` N ` . <nl> + e . g . ` 2 . 0 . 0 - beta . 2 ` <nl> + 3 . If a particular beta release is _generally regarded_ as stable , it will be re - released as a stable build , changing only the version information . <nl> + e . g . ` 2 . 0 . 0 ` . <nl> + 4 . If future bug fixes or security patches need to be made once a release is stable , they are applied and the _patch_ version is incremented accordingly <nl> + e . g . ` 2 . 0 . 1 ` . <nl> + <nl> + For each major and minor bump , you should expect too see something like the following : <nl> + <nl> + ` ` ` text <nl> + 2 . 0 . 0 - beta . 1 <nl> + 2 . 0 . 0 - beta . 2 <nl> + 2 . 0 . 0 - beta . 3 <nl> + 2 . 0 . 0 <nl> + 2 . 0 . 1 <nl> + 2 . 0 . 2 <nl> + ` ` ` <nl> + <nl> + An example lifecycle in pictures : <nl> + <nl> + * A new release branch is created that includes the latest set of features . It is published as ` 2 . 0 . 0 - beta . 1 ` . <nl> + ! [ ] ( . . / images / versioning - sketch - 3 . png ) <nl> + * A bug fix comes into master that can be pack - ported to the release branch . The patch is applied , and a new beta is published as ` 2 . 0 . 0 - beta . 2 ` . <nl> + ! [ ] ( . . / images / versioning - sketch - 4 . png ) <nl> + * The beta is considered _generally stable_ and it is published again as a non - beta under ` 2 . 0 . 0 ` . <nl> + ! [ ] ( . . / images / versioning - sketch - 5 . png ) <nl> + * Later , a zero - day exploit is revealed and a fix is applied to master . We pack - port the fix to the ` 2 - 0 - x ` line and release ` 2 . 0 . 1 ` . <nl> + ! [ ] ( . . / images / versioning - sketch - 6 . png ) <nl> + <nl> + A few examples of how various semver ranges will pick up new releases : <nl> + <nl> + ! [ ] ( . . / images / versioning - sketch - 7 . png ) <nl> + <nl> + # Missing Features : Alphas , and Nightly <nl> + Our strategy has a few tradeoffs , which for now we feel are appropriate . Most importantly that new features in master may take a while before reaching a stable release line . If you want to try a new feature immediately , you will have to build Electron yourself . <nl> + <nl> + As a future consideration , we may introduce one or both of the following : <nl> + <nl> + * nightly builds off of master ; these would allow folks to test new features quickly and give feedback <nl> + * alpha releases that have looser stability constraints to betas ; for example it would be allowable to admit new features while a stability channel is in _alpha_ <nl> + <nl> + # Feature Flags <nl> + Feature flags are a common practice in Chromium , and are well - established in the web - development ecosystem . In the context of Electron , a feature flag or * * soft branch * * must have the following properties : <nl> + <nl> + * is is enabled / disabled either at runtime , or build - time ; we do not support the concept of a request - scoped feature flag <nl> + * it completely segments new and old code paths ; refactoring old code to support a new feature _violates_ the feature - flag contract <nl> + * feature flags are eventually removed after the soft - branch is merged <nl> + <nl> + We reconcile flagged code with our versioning strategy as follows : <nl> + <nl> + 1 . we do not consider iterating on feature - flagged code in a stability branch ; even judicious use of feature flags is not without risk <nl> + 2 . you may break API contracts in feature - flagged code without bumping the major version . Flagged code does not adhere to semver <nl> + <nl> + # Semantic Commits <nl> + <nl> + We seek to increase clarity at all levels of the update and releases process . Starting with ` 2 . 0 . 0 ` we will require pull requests adhere to the [ Conventional Commits ] ( https : / / conventionalcommits . org / ) spec , which can be summarized as follows : <nl> + <nl> + * Commits that would result in a semver * * major * * bump must start with ` BREAKING CHANGE : ` . <nl> + * Commits that would result in a semver * * minor * * bump must start with ` feat : ` . <nl> + * Commits that would result in a semver * * patch * * bump must start with ` fix : ` . <nl> + <nl> + * We allow squashing of commits , provided that the squashed message adheres the the above message format . <nl> + * It is acceptable for some commits in a pull request to not include a semantic prefix , as long as a later commit in the same pull request contains a meaningful encompassing semantic message . <nl> + <nl> + # Versionless ` master ` <nl> + <nl> + - The ` master ` branch will always contain ` 0 . 0 . 0 - dev ` in its ` package . json ` <nl> + - Release branches are never merged back to master <nl> + - Release branches _do_ contain the correct version in their ` package . json ` <nl> deleted file mode 100644 <nl> index fa4cc04fb22a . . 000000000000 <nl> mmm a / docs / tutorial / versioning . md <nl> ppp / dev / null <nl> <nl> - # Electron Versioning <nl> - <nl> - > A detailed look at our versioning policy and implementation . <nl> - <nl> - As of version 2 . 0 . 0 , Electron follows [ semver ] ( # semver ) . The following command will install the most recent stable build of Electron : <nl> - <nl> - ` ` ` sh <nl> - npm install - - save - dev electron <nl> - ` ` ` <nl> - <nl> - To update an existing project to use the latest stable version : <nl> - <nl> - ` ` ` sh <nl> - npm install - - save - dev electron @ latest <nl> - ` ` ` <nl> - <nl> - # # Version 1 . x <nl> - <nl> - Electron versions * < 2 . 0 * did not conform to the [ semver ] ( http : / / semver . org ) spec . Major versions corresponded to end - user API changes . Minor versions corresponded to Chromium major releases . Patch versions corresponded to new features and bug fixes . While convenient for developers merging features , it creates problems for developers of client - facing applications . The QA testing cycles of major apps like Slack , Stride , Teams , Skype , VS Code , Atom , and Desktop can be lengthy and stability is a highly desired outcome . There is a high risk in adopting new features while trying to absorb bug fixes . <nl> - <nl> - Here is an example of the 1 . x strategy : <nl> - <nl> - ! [ ] ( . . / images / versioning - sketch - 0 . png ) <nl> - <nl> - An app developed with ` 1 . 8 . 1 ` cannot take the ` 1 . 8 . 3 ` bug fix without either absorbing the ` 1 . 8 . 2 ` feature , or by backporting the fix and maintaining a new release line . <nl> - <nl> - # # Version 2 . 0 and Beyond <nl> - <nl> - There are several major changes from our 1 . x strategy outlined below . Each change is intended to satisfy the needs and priorities of developers / maintainers and app developers . <nl> - <nl> - 1 . Strict use of semver <nl> - 2 . Introduction of semver - compliant ` - beta ` tags <nl> - 3 . Introduction of [ conventional commit messages ] ( https : / / conventionalcommits . org / ) <nl> - 4 . Clearly defined stabilization branches <nl> - 5 . The ` master ` branch is versionless ; only stability branches contain version information <nl> - <nl> - We will cover in detail how git branching works , how npm tagging works , what developers should expect to see , and how one can backport changes . <nl> - <nl> - # semver <nl> - <nl> - From 2 . 0 onward , Electron will follow semver . <nl> - <nl> - Below is a table explicitly mapping types of changes to their corresponding category of semver ( e . g . Major , Minor , Patch ) . <nl> - <nl> - * * * Major Version Increments * * <nl> - * Chromium version updates <nl> - * node . js major version updates <nl> - * Electron breaking API changes <nl> - * * * Minor Version Increments * * <nl> - * node . js minor version updates <nl> - * Electron non - breaking API changes <nl> - * * * Patch Version Increments * * <nl> - * node . js patch version updates <nl> - * fix - related chromium patches <nl> - * electron bug fixes <nl> - <nl> - Note that most chromium updates will be considered breaking . Fixes that can be backported will likely be cherry - picked as patches . <nl> - <nl> - # Stabilization Branches <nl> - <nl> - Stabilization branches are branches that run parallel to master , taking in only cherry - picked commits that are related to security or stability . These branches are never merged back to master . <nl> - <nl> - ! [ ] ( . . / images / versioning - sketch - 1 . png ) <nl> - <nl> - Stabilization branches are always either * * major * * or * * minor * * version lines , and named against the following template ` $ MAJOR - $ MINOR - x ` e . g . ` 2 - 0 - x ` . <nl> - <nl> - We allow for multiple stabilization branches to exist simultaneously , and intend to support at least two in parallel at all times , backporting security fixes as necessary . <nl> - ! [ ] ( . . / images / versioning - sketch - 2 . png ) <nl> - <nl> - Older lines will not be supported by GitHub , but other groups can take ownership and backport stability and security fixes on their own . We discourage this , but recognize that it makes life easier for many app developers . <nl> - <nl> - # Beta Releases and Bug Fixes <nl> - <nl> - Developers want to know which releases are _safe_ to use . Even seemingly innocent features can introduce regressions in complex applications . At the same time , locking to a fixed version is dangerous because you ’ re ignoring security patches and bug fixes that may have come out since your version . Our goal is to allow the following standard semver ranges in ` package . json ` : <nl> - <nl> - * Use ` ~ 2 . 0 . 0 ` to admit only stability or security related fixes to your ` 2 . 0 . 0 ` release . <nl> - * Use ` ^ 2 . 0 . 0 ` to admit non - breaking _reasonably stable_ feature work as well as security and bug fixes . <nl> - <nl> - What ’ s important about the second point is that apps using ` ^ ` should still be able to expect a reasonable level of stability . To accomplish this , semver allows for a _pre - release identifier_ to indicate a particular version is not yet _safe_ or _stable_ . <nl> - <nl> - Whatever you choose , you will periodically have to bump the version in your ` package . json ` as breaking changes are a fact of Chromium life . <nl> - <nl> - The process is as follows : <nl> - <nl> - 1 . All new major and minor releases lines begin with a ` - beta . N ` tag for ` N > = 1 ` . At that point , the feature set is * * locked * * . That release line admits no further features , and focuses only on security and stability . <nl> - e . g . ` 2 . 0 . 0 - beta . 1 ` . <nl> - 2 . Bug fixes , regression fixes , and security patches can be admitted . Upon doing so , a new beta is released incrementing ` N ` . <nl> - e . g . ` 2 . 0 . 0 - beta . 2 ` <nl> - 3 . If a particular beta release is _generally regarded_ as stable , it will be re - released as a stable build , changing only the version information . <nl> - e . g . ` 2 . 0 . 0 ` . <nl> - 4 . If future bug fixes or security patches need to be made once a release is stable , they are applied and the _patch_ version is incremented accordingly <nl> - e . g . ` 2 . 0 . 1 ` . <nl> - <nl> - For each major and minor bump , you should expect too see something like the following : <nl> - <nl> - ` ` ` text <nl> - 2 . 0 . 0 - beta . 1 <nl> - 2 . 0 . 0 - beta . 2 <nl> - 2 . 0 . 0 - beta . 3 <nl> - 2 . 0 . 0 <nl> - 2 . 0 . 1 <nl> - 2 . 0 . 2 <nl> - ` ` ` <nl> - <nl> - An example lifecycle in pictures : <nl> - <nl> - * A new release branch is created that includes the latest set of features . It is published as ` 2 . 0 . 0 - beta . 1 ` . <nl> - ! [ ] ( . . / images / versioning - sketch - 3 . png ) <nl> - * A bug fix comes into master that can be pack - ported to the release branch . The patch is applied , and a new beta is published as ` 2 . 0 . 0 - beta . 2 ` . <nl> - ! [ ] ( . . / images / versioning - sketch - 4 . png ) <nl> - * The beta is considered _generally stable_ and it is published again as a non - beta under ` 2 . 0 . 0 ` . <nl> - ! [ ] ( . . / images / versioning - sketch - 5 . png ) <nl> - * Later , a zero - day exploit is revealed and a fix is applied to master . We pack - port the fix to the ` 2 - 0 - x ` line and release ` 2 . 0 . 1 ` . <nl> - ! [ ] ( . . / images / versioning - sketch - 6 . png ) <nl> - <nl> - A few examples of how various semver ranges will pick up new releases : <nl> - <nl> - ! [ ] ( . . / images / versioning - sketch - 7 . png ) <nl> - <nl> - # Missing Features : Alphas , and Nightly <nl> - Our strategy has a few tradeoffs , which for now we feel are appropriate . Most importantly that new features in master may take a while before reaching a stable release line . If you want to try a new feature immediately , you will have to build Electron yourself . <nl> - <nl> - As a future consideration , we may introduce one or both of the following : <nl> - <nl> - * nightly builds off of master ; these would allow folks to test new features quickly and give feedback <nl> - * alpha releases that have looser stability constraints to betas ; for example it would be allowable to admit new features while a stability channel is in _alpha_ <nl> - <nl> - # Feature Flags <nl> - Feature flags are a common practice in Chromium , and are well - established in the web - development ecosystem . In the context of Electron , a feature flag or * * soft branch * * must have the following properties : <nl> - <nl> - * is is enabled / disabled either at runtime , or build - time ; we do not support the concept of a request - scoped feature flag <nl> - * it completely segments new and old code paths ; refactoring old code to support a new feature _violates_ the feature - flag contract <nl> - * feature flags are eventually removed after the soft - branch is merged <nl> - <nl> - We reconcile flagged code with our versioning strategy as follows : <nl> - <nl> - 1 . we do not consider iterating on feature - flagged code in a stability branch ; even judicious use of feature flags is not without risk <nl> - 2 . you may break API contracts in feature - flagged code without bumping the major version . Flagged code does not adhere to semver <nl> - <nl> - # Semantic Commits <nl> - <nl> - We seek to increase clarity at all levels of the update and releases process . Starting with ` 2 . 0 . 0 ` we will require pull requests adhere to the [ Conventional Commits ] ( https : / / conventionalcommits . org / ) spec , which can be summarized as follows : <nl> - <nl> - * Commits that would result in a semver * * major * * bump must start with ` BREAKING CHANGE : ` . <nl> - * Commits that would result in a semver * * minor * * bump must start with ` feat : ` . <nl> - * Commits that would result in a semver * * patch * * bump must start with ` fix : ` . <nl> - <nl> - * We allow squashing of commits , provided that the squashed message adheres the the above message format . <nl> - * It is acceptable for some commits in a pull request to not include a semantic prefix , as long as a later commit in the same pull request contains a meaningful encompassing semantic message . <nl> - <nl> - # Versionless ` master ` <nl> - <nl> - - The ` master ` branch will always contain ` 0 . 0 . 0 - dev ` in its ` package . json ` <nl> - - Release branches are never merged back to master <nl> - - Release branches _do_ contain the correct version in their ` package . json ` <nl>
revert to old name of versioning doc
electron/electron
84c207750c8ca2720518b86217b02a3ad00b7537
2017-12-06T23:01:09Z
mmm a / cocos / editor - support / cocosbuilder / proj . win32 / libCocosBuilder . vcxproj <nl> ppp b / cocos / editor - support / cocosbuilder / proj . win32 / libCocosBuilder . vcxproj <nl> <nl> < / ItemGroup > <nl> < PropertyGroup Label = " Globals " > <nl> < ProjectGuid > { 811C0DAB - 7B96 - 4BD3 - A154 - B7572B58E4AB } < / ProjectGuid > <nl> - < RootNamespace > libCocosBuilder < / RootNamespace > <nl> + < RootNamespace > libcocosbuilder < / RootNamespace > <nl> < / PropertyGroup > <nl> < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . Default . props " / > <nl> < PropertyGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " Label = " Configuration " > <nl>
change cocosbuilder to lowercase
cocos2d/cocos2d-x
8f9ce2e282ea2b5c1357c85e6f8f7a496d09d96d
2014-07-28T13:09:43Z
mmm a / ci / filter_example_setup . sh <nl> ppp b / ci / filter_example_setup . sh <nl> <nl> set - e <nl> <nl> # This is the hash on https : / / github . com / envoyproxy / envoy - filter - example . git we pin to . <nl> - ENVOY_FILTER_EXAMPLE_GITSHA = " c6c986cca7ad676cc1c33f2df7515cbbd2e02502 " <nl> + ENVOY_FILTER_EXAMPLE_GITSHA = " bb2e91fde758446fbccc3f8fedffce1827a47bcb " <nl> ENVOY_FILTER_EXAMPLE_SRCDIR = " $ { BUILD_DIR } / envoy - filter - example " <nl> <nl> export ENVOY_FILTER_EXAMPLE_TESTS = " / / : echo2_integration_test / / http - filter - example : http_filter_integration_test / / : envoy_binary_test " <nl> mmm a / test / extensions / filters / network / direct_response / direct_response_integration_test . cc <nl> ppp b / test / extensions / filters / network / direct_response / direct_response_integration_test . cc <nl> INSTANTIATE_TEST_SUITE_P ( IpVersions , DirectResponseIntegrationTest , <nl> TestUtility : : ipTestParamsToString ) ; <nl> <nl> TEST_P ( DirectResponseIntegrationTest , Hello ) { <nl> - Buffer : : OwnedImpl buffer ( " hello " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " listener_0 " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " listener_0 " ) , " hello " , <nl> + [ & response ] ( Network : : ClientConnection & conn , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - connection . close ( ) ; <nl> - } , <nl> - version_ ) ; <nl> - <nl> - connection . run ( ) ; <nl> + conn . close ( Network : : ConnectionCloseType : : FlushWrite ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_EQ ( " hello , world ! \ n " , response ) ; <nl> EXPECT_THAT ( waitForAccessLog ( listener_access_log_name_ ) , <nl> testing : : HasSubstr ( StreamInfo : : ResponseCodeDetails : : get ( ) . DirectResponse ) ) ; <nl> mmm a / test / extensions / stats_sinks / hystrix / hystrix_integration_test . cc <nl> ppp b / test / extensions / stats_sinks / hystrix / hystrix_integration_test . cc <nl> TEST_P ( HystrixIntegrationTest , NoChunkEncoding ) { <nl> <nl> if ( downstreamProtocol ( ) = = Http : : CodecClient : : Type : : HTTP1 ) { <nl> / / For HTTP / 1 . 1 we use a raw client to make absolutely sure there is no chunk encoding . <nl> - Buffer : : OwnedImpl buffer ( " GET / hystrix_event_stream HTTP / 1 . 1 \ r \ nHost : admin \ r \ n \ r \ n " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " admin " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & client , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " admin " ) , " GET / hystrix_event_stream HTTP / 1 . 1 \ r \ nHost : admin \ r \ n \ r \ n " , <nl> + [ & response ] ( Network : : ClientConnection & conn , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - / / Wait until there is a flush . <nl> if ( response . find ( " rollingCountCollapsedRequests " ) ! = std : : string : : npos ) { <nl> - client . close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> + conn . close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> } <nl> - } , <nl> - version_ ) ; <nl> - connection . run ( ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_THAT ( response , StartsWith ( " HTTP / 1 . 1 200 OK \ r \ n " ) ) ; <nl> / / Make sure that the response is not actually chunk encoded , but it does have the hystrix flush <nl> / / trailer . <nl> EXPECT_THAT ( response , Not ( HasSubstr ( " chunked " ) ) ) ; <nl> EXPECT_THAT ( response , Not ( HasSubstr ( " 3 \ r \ n : \ n \ n " ) ) ) ; <nl> EXPECT_THAT ( response , HasSubstr ( " : \ n \ n " ) ) ; <nl> - connection . close ( ) ; <nl> + connection - > close ( ) ; <nl> } else { <nl> codec_client_ = makeHttpConnection ( lookupPort ( " admin " ) ) ; <nl> auto response = codec_client_ - > makeHeaderOnlyRequest ( <nl> mmm a / test / integration / echo_integration_test . cc <nl> ppp b / test / integration / echo_integration_test . cc <nl> INSTANTIATE_TEST_SUITE_P ( IpVersions , EchoIntegrationTest , <nl> TestUtility : : ipTestParamsToString ) ; <nl> <nl> TEST_P ( EchoIntegrationTest , Hello ) { <nl> - Buffer : : OwnedImpl buffer ( " hello " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " listener_0 " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " listener_0 " ) , " hello " , <nl> + [ & response ] ( Network : : ClientConnection & conn , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - connection . close ( ) ; <nl> - } , <nl> - version_ ) ; <nl> - <nl> - connection . run ( ) ; <nl> + conn . close ( Network : : ConnectionCloseType : : FlushWrite ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_EQ ( " hello " , response ) ; <nl> } <nl> <nl> name : new_listener <nl> - > ip ( ) <nl> - > port ( ) ; <nl> <nl> - Buffer : : OwnedImpl buffer ( " hello " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - new_listener_port , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " listener_0 " ) , " hello " , <nl> + [ & response ] ( Network : : ClientConnection & conn , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - connection . close ( ) ; <nl> - } , <nl> - version_ ) ; <nl> - connection . run ( ) ; <nl> + conn . close ( Network : : ConnectionCloseType : : FlushWrite ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_EQ ( " hello " , response ) ; <nl> <nl> / / Remove the listener . <nl> name : new_listener <nl> / / connect would unexpectedly succeed . <nl> bool connect_fail = false ; <nl> for ( int i = 0 ; i < 10 ; + + i ) { <nl> - RawConnectionDriver connection2 ( <nl> - new_listener_port , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & ) - > void { FAIL ( ) ; } , version_ ) ; <nl> - while ( connection2 . connecting ( ) ) { <nl> - / / Don ' t busy loop , but macOS often needs a moment to decide this connection isn ' t happening . <nl> - timeSystem ( ) . advanceTimeWait ( std : : chrono : : milliseconds ( 10 ) ) ; <nl> - <nl> - connection2 . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> - } <nl> - if ( connection2 . connection ( ) . state ( ) = = Network : : Connection : : State : : Closed ) { <nl> + auto connection2 = createConnectionDriver ( <nl> + new_listener_port , " hello " , <nl> + [ ] ( Network : : ClientConnection & , const Buffer : : Instance & ) - > void { FAIL ( ) ; } ) ; <nl> + connection2 - > waitForConnection ( ) ; <nl> + if ( connection2 - > connection ( ) . state ( ) = = Network : : Connection : : State : : Closed ) { <nl> connect_fail = true ; <nl> break ; <nl> } else { <nl> - connection2 . close ( ) ; <nl> + connection2 - > close ( ) ; <nl> } <nl> } <nl> ASSERT_TRUE ( connect_fail ) ; <nl> mmm a / test / integration / http2_integration_test . cc <nl> ppp b / test / integration / http2_integration_test . cc <nl> TEST_P ( Http2IntegrationTest , CodecErrorAfterStreamStart ) { <nl> <nl> TEST_P ( Http2IntegrationTest , BadMagic ) { <nl> initialize ( ) ; <nl> - Buffer : : OwnedImpl buffer ( " hello " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " hello " , <nl> + [ & response ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - } , <nl> - version_ ) ; <nl> - <nl> - connection . run ( ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_EQ ( " " , response ) ; <nl> } <nl> <nl> TEST_P ( Http2IntegrationTest , BadFrame ) { <nl> initialize ( ) ; <nl> - Buffer : : OwnedImpl buffer ( " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " , <nl> + [ & response ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - } , <nl> - version_ ) ; <nl> - <nl> - connection . run ( ) ; <nl> + } ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_TRUE ( response . find ( " SETTINGS expected " ) ! = std : : string : : npos ) ; <nl> } <nl> <nl> TEST_P ( Http2IntegrationTest , SimultaneousRequestWithBufferLimits ) { <nl> / / Test downstream connection delayed close processing . <nl> TEST_P ( Http2IntegrationTest , DelayedCloseAfterBadFrame ) { <nl> initialize ( ) ; <nl> - Buffer : : OwnedImpl buffer ( " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> + <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " , <nl> [ & ] ( Network : : ClientConnection & connection , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> connection . dispatcher ( ) . exit ( ) ; <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> <nl> - connection . run ( ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_THAT ( response , HasSubstr ( " SETTINGS expected " ) ) ; <nl> / / Due to the multiple dispatchers involved ( one for the RawConnectionDriver and another for the <nl> / / Envoy server ) , it ' s possible the delayed close timer could fire and close the server socket <nl> / / prior to the data callback above firing . Therefore , we may either still be connected , or have <nl> / / received a remote close . <nl> - if ( connection . lastConnectionEvent ( ) = = Network : : ConnectionEvent : : Connected ) { <nl> - connection . run ( ) ; <nl> + if ( connection - > lastConnectionEvent ( ) = = Network : : ConnectionEvent : : Connected ) { <nl> + connection - > run ( ) ; <nl> } <nl> - EXPECT_EQ ( connection . lastConnectionEvent ( ) , Network : : ConnectionEvent : : RemoteClose ) ; <nl> + EXPECT_EQ ( connection - > lastConnectionEvent ( ) , Network : : ConnectionEvent : : RemoteClose ) ; <nl> EXPECT_EQ ( test_server_ - > counter ( " http . config_test . downstream_cx_delayed_close_timeout " ) - > value ( ) , <nl> 1 ) ; <nl> } <nl> TEST_P ( Http2IntegrationTest , DelayedCloseDisabled ) { <nl> [ ] ( envoy : : extensions : : filters : : network : : http_connection_manager : : v3 : : HttpConnectionManager & <nl> hcm ) { hcm . mutable_delayed_close_timeout ( ) - > set_seconds ( 0 ) ; } ) ; <nl> initialize ( ) ; <nl> - Buffer : : OwnedImpl buffer ( " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " ) ; <nl> std : : string response ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " PRI * HTTP / 2 . 0 \ r \ n \ r \ nSM \ r \ n \ r \ nhelloworldcauseanerror " , <nl> [ & ] ( Network : : ClientConnection & connection , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> connection . dispatcher ( ) . exit ( ) ; <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> <nl> - connection . run ( ) ; <nl> + connection - > run ( ) ; <nl> EXPECT_THAT ( response , HasSubstr ( " SETTINGS expected " ) ) ; <nl> / / Due to the multiple dispatchers involved ( one for the RawConnectionDriver and another for the <nl> / / Envoy server ) , it ' s possible for the ' connection ' to receive the data and exit the dispatcher <nl> / / prior to the FIN being received from the server . <nl> - if ( connection . lastConnectionEvent ( ) = = Network : : ConnectionEvent : : Connected ) { <nl> - connection . run ( ) ; <nl> + if ( connection - > lastConnectionEvent ( ) = = Network : : ConnectionEvent : : Connected ) { <nl> + connection - > run ( ) ; <nl> } <nl> - EXPECT_EQ ( connection . lastConnectionEvent ( ) , Network : : ConnectionEvent : : RemoteClose ) ; <nl> + EXPECT_EQ ( connection - > lastConnectionEvent ( ) , Network : : ConnectionEvent : : RemoteClose ) ; <nl> EXPECT_EQ ( test_server_ - > counter ( " http . config_test . downstream_cx_delayed_close_timeout " ) - > value ( ) , <nl> 0 ) ; <nl> } <nl> mmm a / test / integration / integration . cc <nl> ppp b / test / integration / integration . cc <nl> void BaseIntegrationTest : : createTestServer ( const std : : string & json_path , <nl> void BaseIntegrationTest : : sendRawHttpAndWaitForResponse ( int port , const char * raw_http , <nl> std : : string * response , <nl> bool disconnect_after_headers_complete ) { <nl> - Buffer : : OwnedImpl buffer ( raw_http ) ; <nl> - RawConnectionDriver connection ( <nl> - port , buffer , <nl> - [ & ] ( Network : : ClientConnection & client , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + port , raw_http , <nl> + [ response , disconnect_after_headers_complete ] ( Network : : ClientConnection & client , <nl> + const Buffer : : Instance & data ) - > void { <nl> response - > append ( data . toString ( ) ) ; <nl> if ( disconnect_after_headers_complete & & response - > find ( " \ r \ n \ r \ n " ) ! = std : : string : : npos ) { <nl> client . close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> } <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> <nl> - connection . run ( ) ; <nl> + connection - > run ( ) ; <nl> } <nl> <nl> IntegrationTestServerPtr BaseIntegrationTest : : createIntegrationTestServer ( <nl> mmm a / test / integration / integration . h <nl> ppp b / test / integration / integration . h <nl> class BaseIntegrationTest : protected Logger : : Loggable < Logger : : Id : : testing > { <nl> void sendRawHttpAndWaitForResponse ( int port , const char * raw_http , std : : string * response , <nl> bool disconnect_after_headers_complete = false ) ; <nl> <nl> + / * * <nl> + * Helper to create ConnectionDriver . <nl> + * <nl> + * @ param port the port to connect to . <nl> + * @ param initial_data the data to send . <nl> + * @ param data_callback the callback on the received data . <nl> + * * / <nl> + std : : unique_ptr < RawConnectionDriver > createConnectionDriver ( <nl> + uint32_t port , const std : : string & initial_data , <nl> + std : : function < void ( Network : : ClientConnection & , const Buffer : : Instance & ) > & & data_callback ) { <nl> + Buffer : : OwnedImpl buffer ( initial_data ) ; <nl> + return std : : make_unique < RawConnectionDriver > ( port , buffer , data_callback , version_ , <nl> + * dispatcher_ ) ; <nl> + } <nl> + <nl> protected : <nl> / / Create the envoy server in another thread and start it . <nl> / / Will not return until that server is listening . <nl> mmm a / test / integration / integration_test . cc <nl> ppp b / test / integration / integration_test . cc <nl> TEST_P ( IntegrationTest , Pipeline ) { <nl> initialize ( ) ; <nl> std : : string response ; <nl> <nl> - Buffer : : OwnedImpl buffer ( " GET / HTTP / 1 . 1 \ r \ nHost : host \ r \ n \ r \ nGET / HTTP / 1 . 1 \ r \ n \ r \ n " ) ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " GET / HTTP / 1 . 1 \ r \ nHost : host \ r \ n \ r \ nGET / HTTP / 1 . 1 \ r \ n \ r \ n " , <nl> [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> / / First response should be success . <nl> while ( response . find ( " 200 " ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 200 OK \ r \ n " ) ) ; <nl> <nl> / / Second response should be 400 ( no host ) <nl> while ( response . find ( " 400 " ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 400 Bad Request \ r \ n " ) ) ; <nl> - connection . close ( ) ; <nl> + connection - > close ( ) ; <nl> } <nl> <nl> / / Checks to ensure that we reject the third request that is pipelined in the <nl> TEST_P ( IntegrationTest , PipelineWithTrailers ) { <nl> " trailer2 : t3 \ r \ n " <nl> " \ r \ n " ) ; <nl> <nl> - Buffer : : OwnedImpl buffer ( absl : : StrCat ( good_request , good_request , bad_request ) ) ; <nl> - <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , absl : : StrCat ( good_request , good_request , bad_request ) , <nl> + [ & response ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> <nl> / / First response should be success . <nl> size_t pos ; <nl> while ( ( pos = response . find ( " 200 " ) ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 200 OK \ r \ n " ) ) ; <nl> while ( response . find ( " 200 " , pos + 1 ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> while ( response . find ( " 400 " ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 400 Bad Request \ r \ n " ) ) ; <nl> - connection . close ( ) ; <nl> + connection - > close ( ) ; <nl> } <nl> <nl> / / Add a pipeline test where complete request headers in the first request merit <nl> TEST_P ( IntegrationTest , PipelineInline ) { <nl> initialize ( ) ; <nl> std : : string response ; <nl> <nl> - Buffer : : OwnedImpl buffer ( " GET / HTTP / 1 . 1 \ r \ n \ r \ nGET / HTTP / 1 . 0 \ r \ n \ r \ n " ) ; <nl> - RawConnectionDriver connection ( <nl> - lookupPort ( " http " ) , buffer , <nl> - [ & ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + auto connection = createConnectionDriver ( <nl> + lookupPort ( " http " ) , " GET / HTTP / 1 . 1 \ r \ n \ r \ nGET / HTTP / 1 . 0 \ r \ n \ r \ n " , <nl> + [ & response ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> response . append ( data . toString ( ) ) ; <nl> - } , <nl> - version_ ) ; <nl> + } ) ; <nl> <nl> while ( response . find ( " 400 " ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 400 Bad Request \ r \ n " ) ) ; <nl> <nl> while ( response . find ( " 426 " ) = = std : : string : : npos ) { <nl> - connection . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + connection - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> EXPECT_THAT ( response , HasSubstr ( " HTTP / 1 . 1 426 Upgrade Required \ r \ n " ) ) ; <nl> - connection . close ( ) ; <nl> + connection - > close ( ) ; <nl> } <nl> <nl> TEST_P ( IntegrationTest , NoHost ) { <nl> mmm a / test / integration / utility . cc <nl> ppp b / test / integration / utility . cc <nl> IntegrationUtil : : makeSingleRequest ( uint32_t port , const std : : string & method , con <nl> <nl> RawConnectionDriver : : RawConnectionDriver ( uint32_t port , Buffer : : Instance & initial_data , <nl> ReadCallback data_callback , <nl> - Network : : Address : : IpVersion version ) { <nl> + Network : : Address : : IpVersion version , <nl> + Event : : Dispatcher & dispatcher , <nl> + Network : : TransportSocketPtr transport_socket ) <nl> + : dispatcher_ ( dispatcher ) { <nl> api_ = Api : : createApiForTest ( stats_store_ ) ; <nl> Event : : GlobalTimeSystem time_system ; <nl> - dispatcher_ = api_ - > allocateDispatcher ( " test_thread " ) ; <nl> callbacks_ = std : : make_unique < ConnectionCallbacks > ( ) ; <nl> - client_ = dispatcher_ - > createClientConnection ( <nl> + <nl> + if ( transport_socket = = nullptr ) { <nl> + transport_socket = Network : : Test : : createRawBufferSocket ( ) ; <nl> + } <nl> + <nl> + client_ = dispatcher_ . createClientConnection ( <nl> Network : : Utility : : resolveUrl ( <nl> fmt : : format ( " tcp : / / { } : { } " , Network : : Test : : getLoopbackAddressUrlString ( version ) , port ) ) , <nl> - Network : : Address : : InstanceConstSharedPtr ( ) , Network : : Test : : createRawBufferSocket ( ) , nullptr ) ; <nl> + Network : : Address : : InstanceConstSharedPtr ( ) , std : : move ( transport_socket ) , nullptr ) ; <nl> client_ - > addConnectionCallbacks ( * callbacks_ ) ; <nl> client_ - > addReadFilter ( Network : : ReadFilterSharedPtr { new ForwardingFilter ( * this , data_callback ) } ) ; <nl> client_ - > write ( initial_data , false ) ; <nl> RawConnectionDriver : : RawConnectionDriver ( uint32_t port , Buffer : : Instance & initia <nl> <nl> RawConnectionDriver : : ~ RawConnectionDriver ( ) = default ; <nl> <nl> - void RawConnectionDriver : : run ( Event : : Dispatcher : : RunType run_type ) { dispatcher_ - > run ( run_type ) ; } <nl> + void RawConnectionDriver : : waitForConnection ( ) { <nl> + while ( ! callbacks_ - > connected ( ) & & ! callbacks_ - > closed ( ) ) { <nl> + Event : : GlobalTimeSystem ( ) . timeSystem ( ) . advanceTimeWait ( std : : chrono : : milliseconds ( 10 ) ) ; <nl> + dispatcher_ . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + } <nl> + } <nl> + <nl> + void RawConnectionDriver : : run ( Event : : Dispatcher : : RunType run_type ) { dispatcher_ . run ( run_type ) ; } <nl> <nl> void RawConnectionDriver : : close ( ) { client_ - > close ( Network : : ConnectionCloseType : : FlushWrite ) ; } <nl> <nl> mmm a / test / integration / utility . h <nl> ppp b / test / integration / utility . h <nl> class RawConnectionDriver { <nl> using ReadCallback = std : : function < void ( Network : : ClientConnection & , const Buffer : : Instance & ) > ; <nl> <nl> RawConnectionDriver ( uint32_t port , Buffer : : Instance & initial_data , ReadCallback data_callback , <nl> - Network : : Address : : IpVersion version ) ; <nl> + Network : : Address : : IpVersion version , Event : : Dispatcher & dispatcher , <nl> + Network : : TransportSocketPtr transport_socket = nullptr ) ; <nl> ~ RawConnectionDriver ( ) ; <nl> const Network : : Connection & connection ( ) { return * client_ ; } <nl> - bool connecting ( ) { return callbacks_ - > connecting_ ; } <nl> void run ( Event : : Dispatcher : : RunType run_type = Event : : Dispatcher : : RunType : : Block ) ; <nl> void close ( ) ; <nl> Network : : ConnectionEvent lastConnectionEvent ( ) const { <nl> return callbacks_ - > last_connection_event_ ; <nl> } <nl> + / / Wait until connected or closed ( ) . <nl> + void waitForConnection ( ) ; <nl> + <nl> + bool closed ( ) { return callbacks_ - > closed ( ) ; } <nl> <nl> private : <nl> struct ForwardingFilter : public Network : : ReadFilterBaseImpl { <nl> class RawConnectionDriver { <nl> } ; <nl> <nl> struct ConnectionCallbacks : public Network : : ConnectionCallbacks { <nl> + <nl> + bool connected ( ) const { return connected_ ; } <nl> + bool closed ( ) const { return closed_ ; } <nl> + <nl> + / / Network : : ConnectionCallbacks <nl> void onEvent ( Network : : ConnectionEvent event ) override { <nl> last_connection_event_ = event ; <nl> - connecting_ = false ; <nl> + closed_ | = ( event = = Network : : ConnectionEvent : : RemoteClose | | <nl> + event = = Network : : ConnectionEvent : : LocalClose ) ; <nl> + connected_ | = ( event = = Network : : ConnectionEvent : : Connected ) ; <nl> } <nl> void onAboveWriteBufferHighWatermark ( ) override { } <nl> void onBelowWriteBufferLowWatermark ( ) override { } <nl> <nl> - bool connecting_ { true } ; <nl> Network : : ConnectionEvent last_connection_event_ ; <nl> + <nl> + private : <nl> + bool connected_ { false } ; <nl> + bool closed_ { false } ; <nl> } ; <nl> <nl> Stats : : IsolatedStoreImpl stats_store_ ; <nl> Api : : ApiPtr api_ ; <nl> - Event : : DispatcherPtr dispatcher_ ; <nl> + Event : : Dispatcher & dispatcher_ ; <nl> std : : unique_ptr < ConnectionCallbacks > callbacks_ ; <nl> Network : : ClientConnectionPtr client_ ; <nl> } ; <nl> mmm a / test / integration / xds_integration_test . cc <nl> ppp b / test / integration / xds_integration_test . cc <nl> <nl> # include " envoy / config / bootstrap / v3 / bootstrap . pb . h " <nl> # include " envoy / extensions / filters / network / http_connection_manager / v3 / http_connection_manager . pb . h " <nl> <nl> + # include " common / buffer / buffer_impl . h " <nl> + <nl> # include " test / integration / http_integration . h " <nl> # include " test / integration / http_protocol_integration . h " <nl> # include " test / integration / ssl_utility . h " <nl> <nl> # include " test / test_common / utility . h " <nl> <nl> # include " gtest / gtest . h " <nl> + # include " utility . h " <nl> <nl> namespace Envoy { <nl> namespace { <nl> TEST_P ( XdsIntegrationTestTypedStruct , RouterRequestAndResponseWithBodyNoBuffer ) <nl> testRouterRequestAndResponseWithBody ( 1024 , 512 , false ) ; <nl> } <nl> <nl> - / / TODO ( lambdai ) : Extend RawConnectionDriver with SSL and delete this one . <nl> - class SslClient { <nl> - public : <nl> - SslClient ( Network : : ClientConnectionPtr ssl_conn , Event : : Dispatcher & dispatcher ) <nl> - : ssl_conn_ ( std : : move ( ssl_conn ) ) , <nl> - payload_reader_ ( std : : make_shared < WaitForPayloadReader > ( dispatcher ) ) { <nl> - ssl_conn_ - > addConnectionCallbacks ( connect_callbacks_ ) ; <nl> - ssl_conn_ - > addReadFilter ( payload_reader_ ) ; <nl> - ssl_conn_ - > connect ( ) ; <nl> - while ( ! connect_callbacks_ . connected ( ) ) { <nl> - dispatcher . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> - } <nl> - } <nl> - Network : : ClientConnectionPtr ssl_conn_ ; <nl> - MockWatermarkBuffer * client_write_buffer ; <nl> - std : : shared_ptr < WaitForPayloadReader > payload_reader_ ; <nl> - ConnectionStatusCallbacks connect_callbacks_ ; <nl> - } ; <nl> - <nl> class LdsInplaceUpdateTcpProxyIntegrationTest <nl> : public testing : : TestWithParam < Network : : Address : : IpVersion > , <nl> public BaseIntegrationTest { <nl> class LdsInplaceUpdateTcpProxyIntegrationTest <nl> context_ = Ssl : : createClientSslTransportSocketFactory ( { } , * context_manager_ , * api_ ) ; <nl> } <nl> <nl> - std : : unique_ptr < SslClient > connect ( const std : : string & alpn ) { <nl> - Network : : Address : : InstanceConstSharedPtr address = <nl> - Ssl : : getSslAddress ( version_ , lookupPort ( " tcp " ) ) ; <nl> - auto ssl_conn = dispatcher_ - > createClientConnection ( <nl> - address , Network : : Address : : InstanceConstSharedPtr ( ) , <nl> + std : : unique_ptr < RawConnectionDriver > createConnectionAndWrite ( const std : : string & alpn , <nl> + const std : : string & request , <nl> + std : : string & response ) { <nl> + Buffer : : OwnedImpl buffer ( request ) ; <nl> + return std : : make_unique < RawConnectionDriver > ( <nl> + lookupPort ( " tcp " ) , buffer , <nl> + [ & response ] ( Network : : ClientConnection & , const Buffer : : Instance & data ) - > void { <nl> + response . append ( data . toString ( ) ) ; <nl> + } , <nl> + version_ , * dispatcher_ , <nl> context_ - > createTransportSocket ( std : : make_shared < Network : : TransportSocketOptionsImpl > ( <nl> - absl : : string_view ( " " ) , std : : vector < std : : string > ( ) , std : : vector < std : : string > { alpn } ) ) , <nl> - nullptr ) ; <nl> - return std : : make_unique < SslClient > ( std : : move ( ssl_conn ) , * dispatcher_ ) ; <nl> + absl : : string_view ( " " ) , std : : vector < std : : string > ( ) , std : : vector < std : : string > { alpn } ) ) ) ; <nl> } <nl> + <nl> std : : unique_ptr < Ssl : : ContextManager > context_manager_ ; <nl> Network : : TransportSocketFactoryPtr context_ ; <nl> testing : : NiceMock < Secret : : MockSecretManager > secret_manager_ ; <nl> class LdsInplaceUpdateTcpProxyIntegrationTest <nl> TEST_P ( LdsInplaceUpdateTcpProxyIntegrationTest , ReloadConfigDeletingFilterChain ) { <nl> setUpstreamCount ( 2 ) ; <nl> initialize ( ) ; <nl> - <nl> - auto client_0 = connect ( " alpn0 " ) ; <nl> + std : : string response_0 ; <nl> + auto client_conn_0 = createConnectionAndWrite ( " alpn0 " , " hello " , response_0 ) ; <nl> + client_conn_0 - > waitForConnection ( ) ; <nl> FakeRawConnectionPtr fake_upstream_connection_0 ; <nl> ASSERT_TRUE ( fake_upstreams_ [ 0 ] - > waitForRawConnection ( fake_upstream_connection_0 ) ) ; <nl> <nl> - auto client_1 = connect ( " alpn1 " ) ; <nl> + std : : string response_1 ; <nl> + auto client_conn_1 = createConnectionAndWrite ( " alpn1 " , " dummy " , response_1 ) ; <nl> + client_conn_1 - > waitForConnection ( ) ; <nl> FakeRawConnectionPtr fake_upstream_connection_1 ; <nl> ASSERT_TRUE ( fake_upstreams_ [ 1 ] - > waitForRawConnection ( fake_upstream_connection_1 ) ) ; <nl> <nl> TEST_P ( LdsInplaceUpdateTcpProxyIntegrationTest , ReloadConfigDeletingFilterChain ) <nl> new_config_helper . setLds ( " 1 " ) ; <nl> test_server_ - > waitForCounterGe ( " listener_manager . listener_in_place_updated " , 1 ) ; <nl> <nl> - while ( ! client_1 - > connect_callbacks_ . closed ( ) ) { <nl> + while ( ! client_conn_1 - > closed ( ) ) { <nl> dispatcher_ - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> + ASSERT_EQ ( response_1 , " " ) ; <nl> <nl> - Buffer : : OwnedImpl buffer ( " hello " ) ; <nl> - client_0 - > ssl_conn_ - > write ( buffer , false ) ; <nl> - client_0 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> std : : string observed_data_0 ; <nl> ASSERT_TRUE ( fake_upstream_connection_0 - > waitForData ( 5 , & observed_data_0 ) ) ; <nl> EXPECT_EQ ( " hello " , observed_data_0 ) ; <nl> <nl> ASSERT_TRUE ( fake_upstream_connection_0 - > write ( " world " ) ) ; <nl> - client_0 - > payload_reader_ - > set_data_to_wait_for ( " world " ) ; <nl> - client_0 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : Block ) ; <nl> - client_0 - > ssl_conn_ - > close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> - <nl> - while ( ! client_0 - > connect_callbacks_ . closed ( ) ) { <nl> + while ( response_0 . find ( " world " ) = = std : : string : : npos ) { <nl> + client_conn_0 - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + } <nl> + client_conn_0 - > close ( ) ; <nl> + while ( ! client_conn_0 - > closed ( ) ) { <nl> dispatcher_ - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> } <nl> TEST_P ( LdsInplaceUpdateTcpProxyIntegrationTest , ReloadConfigAddingFilterChain ) { <nl> setUpstreamCount ( 2 ) ; <nl> initialize ( ) ; <nl> <nl> - auto client_0 = connect ( " alpn0 " ) ; <nl> + std : : string response_0 ; <nl> + auto client_conn_0 = createConnectionAndWrite ( " alpn0 " , " hello " , response_0 ) ; <nl> + client_conn_0 - > waitForConnection ( ) ; <nl> FakeRawConnectionPtr fake_upstream_connection_0 ; <nl> ASSERT_TRUE ( fake_upstreams_ [ 0 ] - > waitForRawConnection ( fake_upstream_connection_0 ) ) ; <nl> <nl> TEST_P ( LdsInplaceUpdateTcpProxyIntegrationTest , ReloadConfigAddingFilterChain ) { <nl> test_server_ - > waitForCounterGe ( " listener_manager . listener_in_place_updated " , 1 ) ; <nl> test_server_ - > waitForCounterGe ( " listener_manager . listener_create_success " , 2 ) ; <nl> <nl> - auto client_2 = connect ( " alpn2 " ) ; <nl> + std : : string response_2 ; <nl> + auto client_conn_2 = createConnectionAndWrite ( " alpn2 " , " hello2 " , response_2 ) ; <nl> + client_conn_2 - > waitForConnection ( ) ; <nl> FakeRawConnectionPtr fake_upstream_connection_2 ; <nl> ASSERT_TRUE ( fake_upstreams_ [ 1 ] - > waitForRawConnection ( fake_upstream_connection_2 ) ) ; <nl> - <nl> - Buffer : : OwnedImpl buffer_2 ( " hello " ) ; <nl> - client_2 - > ssl_conn_ - > write ( buffer_2 , false ) ; <nl> - client_2 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> std : : string observed_data_2 ; <nl> - ASSERT_TRUE ( fake_upstream_connection_2 - > waitForData ( 5 , & observed_data_2 ) ) ; <nl> - EXPECT_EQ ( " hello " , observed_data_2 ) ; <nl> + ASSERT_TRUE ( fake_upstream_connection_2 - > waitForData ( 6 , & observed_data_2 ) ) ; <nl> + EXPECT_EQ ( " hello2 " , observed_data_2 ) ; <nl> <nl> - ASSERT_TRUE ( fake_upstream_connection_2 - > write ( " world " ) ) ; <nl> - client_2 - > payload_reader_ - > set_data_to_wait_for ( " world " ) ; <nl> - client_2 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : Block ) ; <nl> - client_2 - > ssl_conn_ - > close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> - <nl> - while ( ! client_2 - > connect_callbacks_ . closed ( ) ) { <nl> + ASSERT_TRUE ( fake_upstream_connection_2 - > write ( " world2 " ) ) ; <nl> + while ( response_2 . find ( " world2 " ) = = std : : string : : npos ) { <nl> + client_conn_2 - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + } <nl> + client_conn_2 - > close ( ) ; <nl> + while ( ! client_conn_2 - > closed ( ) ) { <nl> dispatcher_ - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> <nl> - Buffer : : OwnedImpl buffer_0 ( " hello " ) ; <nl> - client_0 - > ssl_conn_ - > write ( buffer_0 , false ) ; <nl> - client_0 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> std : : string observed_data_0 ; <nl> ASSERT_TRUE ( fake_upstream_connection_0 - > waitForData ( 5 , & observed_data_0 ) ) ; <nl> EXPECT_EQ ( " hello " , observed_data_0 ) ; <nl> <nl> ASSERT_TRUE ( fake_upstream_connection_0 - > write ( " world " ) ) ; <nl> - client_0 - > payload_reader_ - > set_data_to_wait_for ( " world " ) ; <nl> - client_0 - > ssl_conn_ - > dispatcher ( ) . run ( Event : : Dispatcher : : RunType : : Block ) ; <nl> - client_0 - > ssl_conn_ - > close ( Network : : ConnectionCloseType : : NoFlush ) ; <nl> - <nl> - while ( ! client_0 - > connect_callbacks_ . closed ( ) ) { <nl> + while ( response_0 . find ( " world " ) = = std : : string : : npos ) { <nl> + client_conn_0 - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> + } <nl> + client_conn_0 - > close ( ) ; <nl> + while ( ! client_conn_0 - > closed ( ) ) { <nl> dispatcher_ - > run ( Event : : Dispatcher : : RunType : : NonBlock ) ; <nl> } <nl> } <nl>
test : extend raw connection driver ( )
envoyproxy/envoy
690660eddd2643477bab98c010322ddce34b164c
2020-05-05T02:30:37Z
mmm a / tools / travis - scripts / run - script . sh <nl> ppp b / tools / travis - scripts / run - script . sh <nl> function generate_pull_request_for_binding_codes_and_cocosfiles ( ) <nl> # Set git user for cocos2d - lua repo <nl> git config user . email $ { GH_EMAIL } <nl> git config user . name $ { GH_USER } # Set remotes <nl> - git remote add upstream " $ COCOS_ROBOT_REMOTE " 2 > / dev / null > / dev / null <nl> + # git remote add upstream " $ COCOS_ROBOT_REMOTE " 2 > / dev / null > / dev / null <nl> + git remote add upstream " $ COCOS_ROBOT_REMOTE " <nl> <nl> # Run status to record the output in the log <nl> git status <nl>
print more message ( )
cocos2d/cocos2d-x
34631bf02ceba1f0b95ea5f20291669fb8fea700
2019-03-11T01:34:15Z
mmm a / src / heap / array - buffer - tracker . cc <nl> ppp b / src / heap / array - buffer - tracker . cc <nl> void LocalArrayBufferTracker : : Process ( Callback callback ) { <nl> <nl> void ArrayBufferTracker : : FreeDeadInNewSpace ( Heap * heap ) { <nl> DCHECK_EQ ( heap - > gc_state ( ) , Heap : : HeapState : : SCAVENGE ) ; <nl> - for ( Page * page : NewSpacePageRange ( heap - > new_space ( ) - > FromSpaceStart ( ) , <nl> - heap - > new_space ( ) - > FromSpaceEnd ( ) ) ) { <nl> + for ( Page * page : PageRange ( heap - > new_space ( ) - > FromSpaceStart ( ) , <nl> + heap - > new_space ( ) - > FromSpaceEnd ( ) ) ) { <nl> bool empty = ProcessBuffers ( page , kUpdateForwardedRemoveOthers ) ; <nl> CHECK ( empty ) ; <nl> } <nl> mmm a / src / heap / heap . cc <nl> ppp b / src / heap / heap . cc <nl> void Heap : : Verify ( ) { <nl> <nl> void Heap : : ZapFromSpace ( ) { <nl> if ( ! new_space_ - > IsFromSpaceCommitted ( ) ) return ; <nl> - for ( Page * page : NewSpacePageRange ( new_space_ - > FromSpaceStart ( ) , <nl> - new_space_ - > FromSpaceEnd ( ) ) ) { <nl> + for ( Page * page : <nl> + PageRange ( new_space_ - > FromSpaceStart ( ) , new_space_ - > FromSpaceEnd ( ) ) ) { <nl> for ( Address cursor = page - > area_start ( ) , limit = page - > area_end ( ) ; <nl> cursor < limit ; cursor + = kPointerSize ) { <nl> Memory : : Address_at ( cursor ) = kFromSpaceZapValue ; <nl> mmm a / src / heap / mark - compact . cc <nl> ppp b / src / heap / mark - compact . cc <nl> static void VerifyMarking ( NewSpace * space ) { <nl> / / page - > area_start ( ) as start of range on all pages . <nl> CHECK_EQ ( space - > bottom ( ) , Page : : FromAddress ( space - > bottom ( ) ) - > area_start ( ) ) ; <nl> <nl> - NewSpacePageRange range ( space - > bottom ( ) , end ) ; <nl> + PageRange range ( space - > bottom ( ) , end ) ; <nl> for ( auto it = range . begin ( ) ; it ! = range . end ( ) ; ) { <nl> Page * page = * ( it + + ) ; <nl> Address limit = it ! = range . end ( ) ? page - > area_end ( ) : end ; <nl> static void VerifyEvacuation ( Page * page ) { <nl> <nl> static void VerifyEvacuation ( NewSpace * space ) { <nl> VerifyEvacuationVisitor visitor ; <nl> - NewSpacePageRange range ( space - > bottom ( ) , space - > top ( ) ) ; <nl> + PageRange range ( space - > bottom ( ) , space - > top ( ) ) ; <nl> for ( auto it = range . begin ( ) ; it ! = range . end ( ) ; ) { <nl> Page * page = * ( it + + ) ; <nl> Address current = page - > area_start ( ) ; <nl> void MarkCompactCollector : : VerifyMarkbitsAreClean ( PagedSpace * space ) { <nl> <nl> <nl> void MarkCompactCollector : : VerifyMarkbitsAreClean ( NewSpace * space ) { <nl> - for ( Page * p : NewSpacePageRange ( space - > bottom ( ) , space - > top ( ) ) ) { <nl> + for ( Page * p : PageRange ( space - > bottom ( ) , space - > top ( ) ) ) { <nl> CHECK ( p - > markbits ( ) - > IsClean ( ) ) ; <nl> CHECK_EQ ( 0 , p - > LiveBytes ( ) ) ; <nl> } <nl> void MarkCompactCollector : : DiscoverGreyObjectsInSpace ( PagedSpace * space ) { <nl> <nl> void MarkCompactCollector : : DiscoverGreyObjectsInNewSpace ( ) { <nl> NewSpace * space = heap ( ) - > new_space ( ) ; <nl> - for ( Page * page : NewSpacePageRange ( space - > bottom ( ) , space - > top ( ) ) ) { <nl> + for ( Page * page : PageRange ( space - > bottom ( ) , space - > top ( ) ) ) { <nl> DiscoverGreyObjectsOnPage ( page ) ; <nl> if ( marking_deque ( ) - > IsFull ( ) ) return ; <nl> } <nl> static String * UpdateReferenceInExternalStringTableEntry ( Heap * heap , <nl> void MarkCompactCollector : : EvacuateNewSpacePrologue ( ) { <nl> NewSpace * new_space = heap ( ) - > new_space ( ) ; <nl> / / Append the list of new space pages to be processed . <nl> - for ( Page * p : NewSpacePageRange ( new_space - > bottom ( ) , new_space - > top ( ) ) ) { <nl> + for ( Page * p : PageRange ( new_space - > bottom ( ) , new_space - > top ( ) ) ) { <nl> newspace_evacuation_candidates_ . Add ( p ) ; <nl> } <nl> new_space - > Flip ( ) ; <nl> void UpdateToSpacePointersInParallel ( Heap * heap , base : : Semaphore * semaphore ) { <nl> heap , heap - > isolate ( ) - > cancelable_task_manager ( ) , semaphore ) ; <nl> Address space_start = heap - > new_space ( ) - > bottom ( ) ; <nl> Address space_end = heap - > new_space ( ) - > top ( ) ; <nl> - for ( Page * page : NewSpacePageRange ( space_start , space_end ) ) { <nl> + for ( Page * page : PageRange ( space_start , space_end ) ) { <nl> Address start = <nl> page - > Contains ( space_start ) ? space_start : page - > area_start ( ) ; <nl> Address end = page - > Contains ( space_end ) ? space_end : page - > area_end ( ) ; <nl> mmm a / src / heap / spaces - inl . h <nl> ppp b / src / heap / spaces - inl . h <nl> PageIteratorImpl < PAGE_TYPE > PageIteratorImpl < PAGE_TYPE > : : operator + + ( int ) { <nl> return tmp ; <nl> } <nl> <nl> - NewSpacePageRange : : NewSpacePageRange ( Address start , Address limit ) <nl> - : range_ ( Page : : FromAddress ( start ) , <nl> - Page : : FromAllocationAreaAddress ( limit ) - > next_page ( ) ) { <nl> - SemiSpace : : AssertValidRange ( start , limit ) ; <nl> + PageRange : : PageRange ( Address start , Address limit ) <nl> + : begin_ ( Page : : FromAddress ( start ) ) , <nl> + end_ ( Page : : FromAllocationAreaAddress ( limit ) - > next_page ( ) ) { <nl> + # ifdef DEBUG <nl> + if ( begin_ - > InNewSpace ( ) ) { <nl> + SemiSpace : : AssertValidRange ( start , limit ) ; <nl> + } <nl> + # endif / / DEBUG <nl> } <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> mmm a / src / heap / spaces . cc <nl> ppp b / src / heap / spaces . cc <nl> void SemiSpace : : set_age_mark ( Address mark ) { <nl> DCHECK_EQ ( Page : : FromAllocationAreaAddress ( mark ) - > owner ( ) , this ) ; <nl> age_mark_ = mark ; <nl> / / Mark all pages up to the one containing mark . <nl> - for ( Page * p : NewSpacePageRange ( space_start ( ) , mark ) ) { <nl> + for ( Page * p : PageRange ( space_start ( ) , mark ) ) { <nl> p - > SetFlag ( MemoryChunk : : NEW_SPACE_BELOW_AGE_MARK ) ; <nl> } <nl> } <nl> mmm a / src / heap / spaces . h <nl> ppp b / src / heap / spaces . h <nl> class PageRange { <nl> typedef PageIterator iterator ; <nl> PageRange ( Page * begin , Page * end ) : begin_ ( begin ) , end_ ( end ) { } <nl> explicit PageRange ( Page * page ) : PageRange ( page , page - > next_page ( ) ) { } <nl> + inline PageRange ( Address start , Address limit ) ; <nl> + <nl> iterator begin ( ) { return iterator ( begin_ ) ; } <nl> iterator end ( ) { return iterator ( end_ ) ; } <nl> <nl> class LocalAllocationBuffer { <nl> AllocationInfo allocation_info_ ; <nl> } ; <nl> <nl> - class NewSpacePageRange { <nl> - public : <nl> - typedef PageRange : : iterator iterator ; <nl> - inline NewSpacePageRange ( Address start , Address limit ) ; <nl> - iterator begin ( ) { return range_ . begin ( ) ; } <nl> - iterator end ( ) { return range_ . end ( ) ; } <nl> - <nl> - private : <nl> - PageRange range_ ; <nl> - } ; <nl> - <nl> class PagedSpace : public Space { <nl> public : <nl> typedef PageIterator iterator ; <nl>
[ heap ] Replace NewSpacePageRange with PageRange
v8/v8
0e74286133fe5d2bfc05f3c2b901b3d849db9d12
2016-11-25T15:44:32Z
mmm a / code / cryptography / src / baconian_cipher / baconian_cipher . c <nl> ppp b / code / cryptography / src / baconian_cipher / baconian_cipher . c <nl> char * codes [ ] = { <nl> " BABAA " , " BABAB " , " BABBA " , " BABBB " , " BBAAA " , <nl> " BBAAB " , " BBBAA " <nl> } ; <nl> - <nl> - char * get_code ( const char c ) { <nl> + <nl> + / * Function that takes a char and returns its code * / <nl> + char <nl> + * get_code ( const char c ) <nl> + { <nl> if ( c > = 97 & & c < = 122 ) return codes [ c - 97 ] ; <nl> - return codes [ 26 ] ; <nl> + return ( codes [ 26 ] ) ; <nl> } <nl> - <nl> - char get_char ( const char * code ) { <nl> + <nl> + / * Function that takes a code and returns the corresponding char * / <nl> + char <nl> + get_char ( const char * code ) <nl> + { <nl> int i ; <nl> if ( ! strcmp ( codes [ 26 ] , code ) ) return ' ' ; <nl> for ( i = 0 ; i < 26 ; + + i ) { <nl> char get_char ( const char * code ) { <nl> exit ( 1 ) ; <nl> } <nl> <nl> - void str_tolower ( char s [ ] ) { <nl> + void <nl> + str_tolower ( char s [ ] ) <nl> + { <nl> int i ; <nl> for ( i = 0 ; i < strlen ( s ) ; + + i ) s [ i ] = tolower ( s [ i ] ) ; <nl> } <nl> <nl> - char * bacon_encode ( char plain_text [ ] , char message [ ] ) { <nl> + char <nl> + * bacon_encode ( char plain_text [ ] , char message [ ] ) <nl> + { <nl> int i , count ; <nl> int plen = strlen ( plain_text ) , mlen = strlen ( message ) ; <nl> int elen = 5 * plen ; <nl> char * bacon_encode ( char plain_text [ ] , char message [ ] ) { <nl> else mt [ i ] = c ; <nl> } <nl> free ( et ) ; <nl> - return mt ; <nl> + return ( mt ) ; <nl> } <nl> <nl> - char * bacon_decode ( char cipher_text [ ] ) { <nl> + char <nl> + * bacon_decode ( char cipher_text [ ] ) <nl> + { <nl> int i , count , clen = strlen ( cipher_text ) ; <nl> int plen ; <nl> char * p , * ct , * pt ; <nl> char * bacon_decode ( char cipher_text [ ] ) { <nl> } <nl> pt [ plen ] = ' \ 0 ' ; <nl> free ( ct ) ; <nl> - return pt ; <nl> + return ( pt ) ; <nl> } <nl> <nl> - int main ( ) { <nl> + int <nl> + main ( ) <nl> + { <nl> char plain_text [ ] = " this is plain text " ; <nl> - char message [ ] = " this is a message " <nl> - " such as the space . " ; <nl> + char message [ ] = " this is a message " ; <nl> char * cipher_text , * hidden_text ; <nl> cipher_text = bacon_encode ( plain_text , message ) ; <nl> printf ( " Cipher text is \ n \ n % s \ n " , cipher_text ) ; <nl> int main ( ) { <nl> printf ( " \ nHidden text is \ n \ n % s \ n " , hidden_text ) ; <nl> free ( cipher_text ) ; <nl> free ( hidden_text ) ; <nl> - return 0 ; <nl> + return ( 0 ) ; <nl> } <nl>
Updated baconian_cipher . c with the recommended coding style
OpenGenus/cosmos
3ce7b18db65158154e7fcc33032b1ddbd034eb00
2018-04-27T14:07:53Z
new file mode 100644 <nl> index 000000000000 . . 452b22204076 <nl> mmm / dev / null <nl> ppp b / include / swift / AST / AST . h <nl> <nl> + / / = = = mmm AST . h - Umbrella Header for AST Library mmmmmmmmmmmmmmm - * - C + + - * - = = = / / <nl> + / / <nl> + / / This source file is part of the Swift . org open source project <nl> + / / <nl> + / / Copyright ( c ) 2014 - 2015 Apple Inc . and the Swift project authors <nl> + / / Licensed under Apache License v2 . 0 with Runtime Library Exception <nl> + / / <nl> + / / See http : / / swift . org / LICENSE . txt for license information <nl> + / / See http : / / swift . org / CONTRIBUTORS . txt for the list of Swift project authors <nl> + / / <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / <nl> + / / This file includes the AST data structure headers . <nl> + / / <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + <nl> + # ifndef SWIFT_AST_H <nl> + # define SWIFT_AST_H <nl> + <nl> + # include " ASTContext . h " <nl> + # include " Decl . h " <nl> + # include " Expr . h " <nl> + # include " Stmt . h " <nl> + # include " Types . h " <nl> + <nl> + # endif <nl> mmm a / lib / AST / ASTContext . cpp <nl> ppp b / lib / AST / ASTContext . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / Decl . h " <nl> # include " swift / AST / Identifier . h " <nl> # include " swift / AST / Types . h " <nl> # include " llvm / Support / Allocator . h " <nl> mmm a / lib / Parse / ParseDecl . cpp <nl> ppp b / lib / Parse / ParseDecl . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " Parser . h " <nl> - # include " ParseResult . h " <nl> - # include " Scope . h " <nl> - # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Stmt . h " <nl> - # include " swift / AST / Types . h " <nl> # include " llvm / ADT / PointerUnion . h " <nl> # include " llvm / ADT / Twine . h " <nl> using namespace swift ; <nl> mmm a / lib / Parse / ParseExpr . cpp <nl> ppp b / lib / Parse / ParseExpr . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " Parser . h " <nl> - # include " ParseResult . h " <nl> - # include " Scope . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Types . h " <nl> - # include " swift / AST / ASTContext . h " <nl> # include " llvm / ADT / Twine . h " <nl> using namespace swift ; <nl> <nl> mmm a / lib / Parse / ParseStmt . cpp <nl> ppp b / lib / Parse / ParseStmt . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " Parser . h " <nl> - # include " ParseResult . h " <nl> - # include " Scope . h " <nl> - # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Stmt . h " <nl> # include " llvm / ADT / PointerUnion . h " <nl> # include " llvm / ADT / Twine . h " <nl> using namespace swift ; <nl> mmm a / lib / Parse / ParseType . cpp <nl> ppp b / lib / Parse / ParseType . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " Parser . h " <nl> - # include " ParseResult . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Types . h " <nl> - # include " swift / AST / ASTContext . h " <nl> # include " llvm / ADT / SmallPtrSet . h " <nl> # include " llvm / ADT / Twine . h " <nl> using namespace swift ; <nl> mmm a / lib / Parse / Parser . cpp <nl> ppp b / lib / Parse / Parser . cpp <nl> <nl> # include " swift / Subsystems . h " <nl> # include " Parser . h " <nl> # include " Lexer . h " <nl> - # include " ParseResult . h " <nl> - # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Stmt . h " <nl> - # include " swift / AST / Types . h " <nl> # include " llvm / Support / SourceMgr . h " <nl> # include " llvm / ADT / PointerUnion . h " <nl> # include " llvm / ADT / Twine . h " <nl> mmm a / lib / Parse / Parser . h <nl> ppp b / lib / Parse / Parser . h <nl> <nl> # ifndef SWIFT_PARSER_H <nl> # define SWIFT_PARSER_H <nl> <nl> + # include " ParseResult . h " <nl> # include " Scope . h " <nl> # include " Token . h " <nl> - # include " swift / AST / Type . h " <nl> + # include " swift / AST / AST . h " <nl> <nl> namespace llvm { <nl> class SourceMgr ; <nl> namespace llvm { <nl> <nl> namespace swift { <nl> class Lexer ; <nl> - class Expr ; <nl> - class FuncExpr ; <nl> - class Stmt ; <nl> - class BraceStmt ; <nl> - class Type ; <nl> - class Decl ; <nl> - class DeclAttributes ; <nl> - class TranslationUnitDecl ; <nl> - class TypeAliasDecl ; <nl> - class FuncDecl ; <nl> - class VarDecl ; <nl> - class NamedDecl ; <nl> - class OneOfType ; <nl> - class ASTContext ; <nl> - class DeclVarName ; <nl> - class TupleTypeElt ; <nl> class ScopeInfo ; <nl> - template < typename T > class ParseResult ; <nl> <nl> struct OneOfElementInfo ; <nl> <nl> mmm a / lib / Parse / Scope . cpp <nl> ppp b / lib / Parse / Scope . cpp <nl> <nl> <nl> # include " Scope . h " <nl> # include " Parser . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Types . h " <nl> # include " llvm / ADT / Twine . h " <nl> using namespace swift ; <nl> <nl> mmm a / lib / Sema / NameBinding . cpp <nl> ppp b / lib / Sema / NameBinding . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " swift / Subsystems . h " <nl> - # include " swift / AST / ASTContext . h " <nl> - # include " swift / AST / Decl . h " <nl> - # include " swift / AST / Expr . h " <nl> - # include " swift / AST / Stmt . h " <nl> - # include " swift / AST / Types . h " <nl> + # include " swift / AST / AST . h " <nl> # include " llvm / ADT / DenseMap . h " <nl> # include " llvm / ADT / OwningPtr . h " <nl> # include " llvm / ADT / TinyPtrVector . h " <nl> mmm a / lib / Sema / TypeChecking . cpp <nl> ppp b / lib / Sema / TypeChecking . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " swift / Subsystems . h " <nl> - # include " swift / AST / ASTContext . h " <nl> + # include " swift / AST / AST . h " <nl> # include " swift / AST / ASTVisitor . h " <nl> - # include " swift / AST / Types . h " <nl> # include " llvm / ADT / PointerUnion . h " <nl> # include " llvm / ADT / Twine . h " <nl> # include " llvm / Support / SourceMgr . h " <nl>
introduce a enw AST / AST . h umbrella header and use it to
apple/swift
b04c19e647b856363ab054ccdd80e87ad2f0bd31
2011-08-22T21:02:44Z
mmm a / Marlin / src / HAL / HAL_AVR / servo_AVR . cpp <nl> ppp b / Marlin / src / HAL / HAL_AVR / servo_AVR . cpp <nl> <nl> # include " . . / servo . h " <nl> # include " . . / servo_private . h " <nl> <nl> - static volatile int8_t Channel [ _Nbr_16timers ] ; / / counter for the servo being pulsed for each timer ( or - 1 if refresh interval ) <nl> + static volatile int8_t Channel [ _Nbr_16timers ] ; / / counter for the servo being pulsed for each timer ( or - 1 if refresh interval ) <nl> <nl> <nl> / * * * * * * * * * * * * static functions common to all instances * * * * * * * * * * * * * * * * * * * * * * * / <nl> mmm a / Marlin / src / HAL / HAL_DUE / Servo_Due . cpp <nl> ppp b / Marlin / src / HAL / HAL_DUE / Servo_Due . cpp <nl> <nl> # include " . . / servo . h " <nl> # include " . . / servo_private . h " <nl> <nl> - static volatile int8_t Channel [ _Nbr_16timers ] ; / / counter for the servo being pulsed for each timer ( or - 1 if refresh interval ) <nl> + static volatile int8_t Channel [ _Nbr_16timers ] ; / / counter for the servo being pulsed for each timer ( or - 1 if refresh interval ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / / Interrupt handler for the TC0 channel 1 . <nl>
[ 2 . 0 . x ] removed spaces
MarlinFirmware/Marlin
9e93b7ccbdf06a32fb96e75d5a1add0cc6c85050
2017-11-05T19:42:48Z
mmm a / MachineLearning / ParseConfig / ConfigRuntime . cpp <nl> ppp b / MachineLearning / ParseConfig / ConfigRuntime . cpp <nl> <nl> # include " ConfigRuntime . h " <nl> # include < deque > <nl> # include < functional > <nl> + # include < cmath > <nl> <nl> # ifndef let <nl> # define let const auto <nl> namespace Microsoft { namespace MSR { namespace CNTK { <nl> virtual ~ AnotherAction ( ) { } <nl> } ; <nl> <nl> - / / error handling <nl> - <nl> - class EvaluationError : public ConfigError <nl> - { <nl> - public : <nl> - EvaluationError ( const wstring & msg , TextLocation where ) : ConfigError ( utf8 ( msg ) , where ) { } <nl> - / * implement * / const char * kind ( ) const { return " evaluating " ; } <nl> - } ; <nl> - <nl> - static void Fail ( const wstring & msg , TextLocation where ) { throw EvaluationError ( msg , where ) ; } <nl> - <nl> - static void TypeExpected ( const wstring & what , ExpressionPtr e ) { Fail ( L " expected expression of type " + what , e - > location ) ; } <nl> - static void UnknownIdentifier ( const wstring & id , TextLocation where ) { Fail ( L " unknown member name " + id , where ) ; } <nl> - <nl> - / / config value types <nl> - <nl> template < typename T > class ConfigValueWithLateInit : public ConfigValue < T > , public HasLateInit <nl> { <nl> public : <nl> namespace Microsoft { namespace MSR { namespace CNTK { <nl> } <nl> } ; <nl> <nl> - template < class T > ConfigValue < shared_ptr < T > > MakeConfigValuePtr ( const ConfigRecord & config ) <nl> + class Evaluator <nl> { <nl> - return new ConfigValue < shared_ptr < T > > ( make_shared ( config ) ) ; <nl> - } <nl> + / / error handling <nl> <nl> - / / helper for configurableRuntimeTypes initializer below <nl> - / / This returns a lambda that is a constructor for a given runtime type . <nl> - template < class C > <nl> - function < ConfigValuePtr ( const ConfigRecord & ) > MakeRuntimeTypeConstructor ( ) <nl> - { <nl> - bool hasLateInit = is_base_of < HasLateInit , C > : : value ; / / ( cannot test directly - - C4127 : conditional expression is constant ) <nl> - if ( hasLateInit ) <nl> - return [ ] ( const ConfigRecord & config ) { return make_shared < ConfigValueWithLateInit < shared_ptr < C > > > ( make_shared < C > ( config ) ) ; } ; <nl> - else <nl> - return [ ] ( const ConfigRecord & config ) { return make_shared < ConfigValue < shared_ptr < C > > > ( make_shared < C > ( config ) ) ; } ; <nl> - } <nl> + class EvaluationError : public ConfigError <nl> + { <nl> + public : <nl> + EvaluationError ( const wstring & msg , TextLocation where ) : ConfigError ( utf8 ( msg ) , where ) { } <nl> + / * implement * / const char * kind ( ) const { return " evaluating " ; } <nl> + } ; <nl> <nl> - / / this table lists all C + + types that can be instantiated from " new " expressions <nl> - map < wstring , function < ConfigValuePtr ( const ConfigRecord & ) > > configurableRuntimeTypes = <nl> - { <nl> - { L " PrintAction " , MakeRuntimeTypeConstructor < PrintAction > ( ) } , <nl> - { L " AnotherAction " , MakeRuntimeTypeConstructor < AnotherAction > ( ) } <nl> - } ; <nl> + void Fail ( const wstring & msg , TextLocation where ) { throw EvaluationError ( msg , where ) ; } <nl> <nl> - / / " new ! " expressions get queued for execution after all other nodes of tree have been executed <nl> - class LateInitItem <nl> - { <nl> - ConfigValuePtr object ; <nl> - ExpressionPtr dictExpr ; / / the dictionary expression that now can be fully evaluated <nl> - public : <nl> - LateInitItem ( ConfigValuePtr object , ExpressionPtr dictExpr ) : object ( object ) , dictExpr ( dictExpr ) { } <nl> - void Init ( deque < LateInitItem > & deferredInitList ) ; <nl> - } ; <nl> + void TypeExpected ( const wstring & what , ExpressionPtr e ) { Fail ( L " expected expression of type " + what , e - > location ) ; } <nl> + void UnknownIdentifier ( const wstring & id , TextLocation where ) { Fail ( L " unknown member name " + id , where ) ; } <nl> <nl> - static ConfigValuePtr Evaluate ( ExpressionPtr e , deque < LateInitItem > & deferredInitList ) ; <nl> + / / config value types <nl> <nl> - / / evaluate all elements in a dictionary and turn that into a ConfigRecord <nl> - / / BUGBUG : This must be memorized . That ' s what variables are for ! <nl> - ConfigRecord ConfigRecordFromNamedArgs ( ExpressionPtr e , deque < LateInitItem > & deferredInitList ) <nl> - { <nl> - if ( e - > op ! = L " [ ] " ) <nl> - TypeExpected ( L " record " , e ) ; <nl> - ConfigRecord config ; <nl> - for ( let & namedArg : e - > namedArgs ) <nl> + template < typename T > ConfigValuePtr MakeConfigValue ( const T & val ) { return make_shared < ConfigValue < T > > ( val ) ; } <nl> + <nl> + / / helper for configurableRuntimeTypes initializer below <nl> + / / This returns a lambda that is a constructor for a given runtime type . <nl> + template < class C > <nl> + function < ConfigValuePtr ( const ConfigRecord & ) > MakeRuntimeTypeConstructor ( ) <nl> { <nl> - let value = Evaluate ( namedArg . second , deferredInitList ) ; <nl> - config . Add ( namedArg . first , value ) ; <nl> + bool hasLateInit = is_base_of < HasLateInit , C > : : value ; / / ( cannot test directly - - C4127 : conditional expression is constant ) <nl> + if ( hasLateInit ) <nl> + return [ this ] ( const ConfigRecord & config ) { return make_shared < ConfigValueWithLateInit < shared_ptr < C > > > ( make_shared < C > ( config ) ) ; } ; <nl> + else <nl> + return [ this ] ( const ConfigRecord & config ) { return MakeConfigValue ( make_shared < C > ( config ) ) ; } ; <nl> } <nl> - return config ; <nl> - } <nl> - <nl> - / / perform late initialization <nl> - / / This assumes that the ConfigValuePtr points to a ConfigValueWithLateInit . If not , it will fail with a nullptr exception . <nl> - void LateInitItem : : Init ( deque < LateInitItem > & deferredInitList ) <nl> - { <nl> - ConfigRecord config = ConfigRecordFromNamedArgs ( dictExpr , deferredInitList ) ; <nl> - dynamic_cast < HasLateInit * > ( object . get ( ) ) - > Init ( config ) ; / / call ConfigValueWithLateInit : : Init ( ) which in turn will call HasLateInite : : Init ( ) on the actual object <nl> - } <nl> <nl> - static bool ToBoolean ( ConfigValuePtr value , ExpressionPtr e ) <nl> - { <nl> - let val = dynamic_cast < ConfigValue < bool > * > ( value . get ( ) ) ; <nl> - if ( ! val ) <nl> - TypeExpected ( L " boolean " , e ) ; <nl> - return val - > value ; <nl> - } <nl> + / / " new ! " expressions get queued for execution after all other nodes of tree have been executed <nl> + struct LateInitItem <nl> + { <nl> + ConfigValuePtr object ; <nl> + ExpressionPtr dictExpr ; / / the dictionary expression that now can be fully evaluated <nl> + LateInitItem ( ConfigValuePtr object , ExpressionPtr dictExpr ) : object ( object ) , dictExpr ( dictExpr ) { } <nl> + } ; <nl> <nl> - static ConfigValuePtr Evaluate ( ExpressionPtr e , deque < LateInitItem > & deferredInitList ) <nl> - { <nl> - / / this evaluates any evaluation node <nl> - if ( e - > op = = L " d " ) return make_shared < ConfigValue < double > > ( e - > d ) ; <nl> - else if ( e - > op = = L " s " ) return make_shared < ConfigValue < wstring > > ( e - > s ) ; <nl> - else if ( e - > op = = L " b " ) return make_shared < ConfigValue < bool > > ( e - > b ) ; <nl> - else if ( e - > op = = L " new " | | e - > op = = L " new ! " ) <nl> - { <nl> - / / find the constructor lambda <nl> - let newIter = configurableRuntimeTypes . find ( e - > id ) ; <nl> - if ( newIter = = configurableRuntimeTypes . end ( ) ) <nl> - Fail ( L " unknown runtime type " + e - > id , e - > location ) ; <nl> - / / form the config record <nl> - let dictExpr = e - > args [ 0 ] ; <nl> - if ( e - > op = = L " new " ) / / evaluate the parameter dictionary into a config record <nl> - return newIter - > second ( ConfigRecordFromNamedArgs ( dictExpr , deferredInitList ) ) ; / / this constructs it <nl> - else / / . . . unless it ' s late init . Then we defer initialization . <nl> + / / evaluate all elements in a dictionary and turn that into a ConfigRecord <nl> + / / BUGBUG : This must be memorized . That ' s what variables are for ! <nl> + ConfigRecord ConfigRecordFromNamedArgs ( ExpressionPtr e ) <nl> + { <nl> + if ( e - > op ! = L " [ ] " ) <nl> + TypeExpected ( L " record " , e ) ; <nl> + ConfigRecord config ; <nl> + for ( let & namedArg : e - > namedArgs ) <nl> { <nl> - / / TODO : need a check here whether the class allows late init , before we actually try , so that we can give a concise error message <nl> - let value = newIter - > second ( ConfigRecord ( ) ) ; <nl> - deferredInitList . push_back ( LateInitItem ( value , dictExpr ) ) ; / / construct empty and remember to Init ( ) later <nl> - return value ; / / we return the created but not initialized object as the value , so others can reference it <nl> + let value = Evaluate ( namedArg . second ) ; <nl> + config . Add ( namedArg . first , value ) ; <nl> } <nl> + return config ; <nl> } <nl> - else if ( e - > op = = L " if " ) <nl> + <nl> + / / perform late initialization <nl> + / / This assumes that the ConfigValuePtr points to a ConfigValueWithLateInit . If not , it will fail with a nullptr exception . <nl> + void LateInit ( LateInitItem & lateInitItem ) <nl> + { <nl> + ConfigRecord config = ConfigRecordFromNamedArgs ( lateInitItem . dictExpr ) ; <nl> + dynamic_cast < HasLateInit * > ( lateInitItem . object . get ( ) ) - > Init ( config ) ; / / call ConfigValueWithLateInit : : Init ( ) which in turn will call HasLateInite : : Init ( ) on the actual object <nl> + } <nl> + <nl> + double ToDouble ( ConfigValuePtr value , ExpressionPtr e ) <nl> { <nl> - let condition = ToBoolean ( Evaluate ( e - > args [ 0 ] , deferredInitList ) , e - > args [ 0 ] ) ; <nl> - if ( condition ) <nl> - return Evaluate ( e - > args [ 1 ] , deferredInitList ) ; <nl> + let val = dynamic_cast < ConfigValue < double > * > ( value . get ( ) ) ; <nl> + if ( ! val ) <nl> + TypeExpected ( L " number " , e ) ; <nl> + return val - > value ; <nl> + } <nl> + <nl> + / / get number and return it as an integer ( fail if it is fractional ) <nl> + long long ToInt ( ConfigValuePtr value , ExpressionPtr e ) <nl> + { <nl> + let val = ToDouble ( value , e ) ; <nl> + let res = ( long long ) ( val ) ; <nl> + if ( val ! = res ) <nl> + TypeExpected ( L " integer number " , e ) ; <nl> + return res ; <nl> + } <nl> + <nl> + wstring ToString ( ConfigValuePtr value , ExpressionPtr e ) <nl> + { <nl> + let val = dynamic_cast < ConfigValue < wstring > * > ( value . get ( ) ) ; <nl> + if ( ! val ) <nl> + TypeExpected ( L " number " , e ) ; <nl> + return val - > value ; <nl> + } <nl> + <nl> + bool ToBoolean ( ConfigValuePtr value , ExpressionPtr e ) <nl> + { <nl> + let val = dynamic_cast < ConfigValue < bool > * > ( value . get ( ) ) ; / / TODO : factor out this expression <nl> + if ( ! val ) <nl> + TypeExpected ( L " boolean " , e ) ; <nl> + return val - > value ; <nl> + } <nl> + <nl> + / / check if ConfigValuePtr is of a certain type <nl> + template < typename T > <nl> + bool Is ( const ConfigValuePtr & value ) <nl> + { <nl> + return dynamic_cast < ConfigValue < T > * > ( value . get ( ) ) ! = nullptr ; <nl> + } <nl> + <nl> + / / check if ConfigValuePtr is of a certain type <nl> + template < typename T > <nl> + const T & As ( const ConfigValuePtr & value ) <nl> + { <nl> + return dynamic_cast < ConfigValue < T > * > ( value . get ( ) ) - > value ; <nl> + } <nl> + <nl> + typedef function < ConfigValuePtr ( ExpressionPtr e , ConfigValuePtr leftVal , ConfigValuePtr rightVal ) > InfixFunction ; <nl> + struct InfixFunctions <nl> + { <nl> + InfixFunction NumbersOp ; / / number OP number - > number <nl> + InfixFunction StringsOp ; / / string OP string - > string <nl> + InfixFunction BoolOp ; / / bool OP bool - > bool <nl> + InfixFunction ComputeNodeOp ; / / ComputeNode OP ComputeNode - > ComputeNode <nl> + InfixFunction NumberComputeNodeOp ; / / number OP ComputeNode - > ComputeNode , e . g . 3 * M <nl> + InfixFunction ComputeNodeNumberOp ; / / ComputeNode OP Number - > ComputeNode , e . g . M * 3 <nl> + InfixFunction CompOp ; / / ANY OP ANY - > bool <nl> + InfixFunction DictOp ; / / dict OP dict <nl> + InfixFunctions ( InfixFunction NumbersOp , InfixFunction StringsOp , InfixFunction BoolOp , InfixFunction ComputeNodeOp , InfixFunction NumberComputeNodeOp , InfixFunction ComputeNodeNumberOp , InfixFunction CompOp , InfixFunction DictOp ) <nl> + : NumbersOp ( NumbersOp ) , StringsOp ( StringsOp ) , BoolOp ( BoolOp ) , ComputeNodeOp ( ComputeNodeOp ) , NumberComputeNodeOp ( NumberComputeNodeOp ) , ComputeNodeNumberOp ( ComputeNodeNumberOp ) , CompOp ( CompOp ) , DictOp ( DictOp ) { } <nl> + } ; <nl> + <nl> + void FailBinaryOpTypes ( ExpressionPtr e ) <nl> + { <nl> + Fail ( L " operator " + e - > op + L " cannot be applied to these operands " , e - > location ) ; <nl> + } <nl> + <nl> + / / all infix operators with lambdas for evaluating them <nl> + map < wstring , InfixFunctions > infixOps ; <nl> + <nl> + / / this table lists all C + + types that can be instantiated from " new " expressions <nl> + map < wstring , function < ConfigValuePtr ( const ConfigRecord & ) > > configurableRuntimeTypes ; <nl> + <nl> + ConfigValuePtr Evaluate ( ExpressionPtr e ) <nl> + { <nl> + / / this evaluates any evaluation node <nl> + if ( e - > op = = L " d " ) return MakeConfigValue ( e - > d ) ; <nl> + else if ( e - > op = = L " s " ) return MakeConfigValue ( e - > s ) ; <nl> + else if ( e - > op = = L " b " ) return MakeConfigValue ( e - > b ) ; <nl> + else if ( e - > op = = L " new " | | e - > op = = L " new ! " ) <nl> + { <nl> + / / find the constructor lambda <nl> + let newIter = configurableRuntimeTypes . find ( e - > id ) ; <nl> + if ( newIter = = configurableRuntimeTypes . end ( ) ) <nl> + Fail ( L " unknown runtime type " + e - > id , e - > location ) ; <nl> + / / form the config record <nl> + let dictExpr = e - > args [ 0 ] ; <nl> + if ( e - > op = = L " new " ) / / evaluate the parameter dictionary into a config record <nl> + return newIter - > second ( ConfigRecordFromNamedArgs ( dictExpr ) ) ; / / this constructs it <nl> + else / / . . . unless it ' s late init . Then we defer initialization . <nl> + { <nl> + / / TODO : need a check here whether the class allows late init , before we actually try , so that we can give a concise error message <nl> + let value = newIter - > second ( ConfigRecord ( ) ) ; <nl> + deferredInitList . push_back ( LateInitItem ( value , dictExpr ) ) ; / / construct empty and remember to Init ( ) later <nl> + return value ; / / we return the created but not initialized object as the value , so others can reference it <nl> + } <nl> + } <nl> + else if ( e - > op = = L " if " ) <nl> + { <nl> + let condition = ToBoolean ( Evaluate ( e - > args [ 0 ] ) , e - > args [ 0 ] ) ; <nl> + if ( condition ) <nl> + return Evaluate ( e - > args [ 1 ] ) ; <nl> + else <nl> + return Evaluate ( e - > args [ 2 ] ) ; <nl> + } <nl> else <nl> - Evaluate ( e - > args [ 2 ] , deferredInitList ) ; <nl> + { <nl> + let opIter = infixOps . find ( e - > op ) ; <nl> + if ( opIter = = infixOps . end ( ) ) <nl> + LogicError ( " e - > op " + utf8 ( e - > op ) + " not implemented " ) ; <nl> + let & functions = opIter - > second ; <nl> + let leftArg = e - > args [ 0 ] ; <nl> + let rightArg = e - > args [ 1 ] ; <nl> + let leftValPtr = Evaluate ( leftArg ) ; <nl> + let rightValPtr = Evaluate ( rightArg ) ; <nl> + if ( Is < double > ( leftValPtr ) & & Is < double > ( rightValPtr ) ) <nl> + return functions . NumbersOp ( e , leftValPtr , rightValPtr ) ; <nl> + else if ( Is < wstring > ( leftValPtr ) & & Is < wstring > ( rightValPtr ) ) <nl> + return functions . StringsOp ( e , leftValPtr , rightValPtr ) ; <nl> + else if ( Is < bool > ( leftValPtr ) & & Is < bool > ( rightValPtr ) ) <nl> + return functions . BoolOp ( e , leftValPtr , rightValPtr ) ; <nl> + / / TODO : switch on the types <nl> + else <nl> + FailBinaryOpTypes ( e ) ; <nl> + } <nl> + LogicError ( " should not get here " ) ; <nl> + } <nl> + <nl> + / / look up a member by id in a dictionary expression <nl> + / / If it is not found , it tries all lexically enclosing scopes inside out . <nl> + ExpressionPtr LookupDictMember ( ExpressionPtr dict , TextLocation idLocation , const wstring & id ) <nl> + { <nl> + if ( ! dict ) / / we recursively go up ; only when we reach the top do we fail <nl> + UnknownIdentifier ( id , idLocation ) ; <nl> + let idIter = dict - > namedArgs . find ( id ) ; <nl> + if ( idIter = = dict - > namedArgs . end ( ) ) <nl> + return LookupDictMember ( dict - > parent , idLocation , id ) ; / / not found : try parent <nl> + return idIter - > second ; / / found it <nl> + } <nl> + <nl> + / / helper lambdas for evaluating infix operators <nl> + InfixFunction BadOp ( ) { return [ this ] ( ExpressionPtr e , ConfigValuePtr leftVal , ConfigValuePtr rightVal ) - > ConfigValuePtr { FailBinaryOpTypes ( e ) ; return nullptr ; } ; } ; <nl> + InfixFunction NumOp ( ) <nl> + { <nl> + return [ this ] ( ExpressionPtr e , ConfigValuePtr leftVal , ConfigValuePtr rightVal ) - > ConfigValuePtr <nl> + { <nl> + let left = As < double > ( leftVal ) ; <nl> + let right = As < double > ( rightVal ) ; <nl> + if ( e - > op = = L " + " ) return MakeConfigValue ( left + right ) ; <nl> + else if ( e - > op = = L " - " ) return MakeConfigValue ( left - right ) ; <nl> + else if ( e - > op = = L " * " ) return MakeConfigValue ( left * right ) ; <nl> + else if ( e - > op = = L " / " ) return MakeConfigValue ( left / right ) ; <nl> + else if ( e - > op = = L " % " ) return MakeConfigValue ( fmod ( left , right ) ) ; <nl> + else if ( e - > op = = L " * * " ) return MakeConfigValue ( pow ( left , right ) ) ; <nl> + else LogicError ( " " ) ; <nl> + } ; <nl> + } <nl> + InfixFunction StrOp ( ) { <nl> + return [ this ] ( ExpressionPtr e , ConfigValuePtr leftVal , ConfigValuePtr rightVal ) - > ConfigValuePtr <nl> + { <nl> + let left = As < wstring > ( leftVal ) ; <nl> + let right = As < wstring > ( rightVal ) ; <nl> + if ( e - > op = = L " + " ) return MakeConfigValue ( left + right ) ; <nl> + else LogicError ( " " ) ; <nl> + } ; <nl> + } <nl> + InfixFunction BoolOp ( ) <nl> + { <nl> + return [ this ] ( ExpressionPtr e , ConfigValuePtr leftVal , ConfigValuePtr rightVal ) - > ConfigValuePtr <nl> + { <nl> + let left = As < bool > ( leftVal ) ; <nl> + let right = As < bool > ( rightVal ) ; <nl> + if ( e - > op = = L " | | " ) return MakeConfigValue ( left | | right ) ; <nl> + else if ( e - > op = = L " & & " ) return MakeConfigValue ( left & & right ) ; <nl> + else if ( e - > op = = L " ^ " ) return MakeConfigValue ( left ^ right ) ; <nl> + else LogicError ( " " ) ; <nl> + } ; <nl> } <nl> - LogicError ( " unknown e - > op " ) ; <nl> - } <nl> <nl> - / / Traverse through the expression ( parse ) tree to evaluate a value . <nl> - ConfigValuePtr Evaluate ( ExpressionPtr e ) <nl> - { <nl> + / / Traverse through the expression ( parse ) tree to evaluate a value . <nl> deque < LateInitItem > deferredInitList ; <nl> - auto result = Evaluate ( e , deferredInitList ) ; <nl> - / / The deferredInitList contains unresolved Expressions due to " new ! " . This is specifically needed to support ComputeNodes <nl> - / / ( or similar classes ) that need circular references , while allowing to be initialized late ( construct them empty first ) . <nl> - while ( ! deferredInitList . empty ( ) ) <nl> + public : <nl> + Evaluator ( ) <nl> + { <nl> + / / lookup table for " new " expression <nl> + configurableRuntimeTypes = decltype ( configurableRuntimeTypes ) <nl> + { <nl> + { L " PrintAction " , MakeRuntimeTypeConstructor < PrintAction > ( ) } , <nl> + { L " AnotherAction " , MakeRuntimeTypeConstructor < AnotherAction > ( ) } <nl> + } ; <nl> + / / lookup table for infix operators <nl> + infixOps = decltype ( infixOps ) <nl> + { <nl> + / / NumbersOp StringsOp BoolOp ComputeNodeOp NumberComputeNodeOp ComputeNodeNumberOp CompOp DictOp <nl> + / / CompOp does not work , fix this . Use a different mechanism . <nl> + { L " * " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " / " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " . * " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " * * " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " % " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " + " , InfixFunctions ( NumOp ( ) , StrOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " - " , InfixFunctions ( NumOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " = = " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " ! = " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " < " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " > " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " < = " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " > = " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " & & " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BoolOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " | | " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BoolOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } , <nl> + { L " ^ " , InfixFunctions ( BadOp ( ) , BadOp ( ) , BoolOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) , BadOp ( ) ) } <nl> + } ; <nl> + } <nl> + <nl> + ConfigValuePtr EvaluateParse ( ExpressionPtr e ) <nl> { <nl> - deferredInitList . front ( ) . Init ( deferredInitList ) ; <nl> - deferredInitList . pop_front ( ) ; <nl> + auto result = Evaluate ( e ) ; <nl> + / / The deferredInitList contains unresolved Expressions due to " new ! " . This is specifically needed to support ComputeNodes <nl> + / / ( or similar classes ) that need circular references , while allowing to be initialized late ( construct them empty first ) . <nl> + while ( ! deferredInitList . empty ( ) ) <nl> + { <nl> + LateInit ( deferredInitList . front ( ) ) ; <nl> + deferredInitList . pop_front ( ) ; <nl> + } <nl> + return result ; <nl> } <nl> - return result ; <nl> - } <nl> <nl> - / / look up a member by id in a dictionary expression <nl> - / / If it is not found , it tries all lexically enclosing scopes inside out . <nl> - ExpressionPtr LookupDictMember ( ExpressionPtr dict , TextLocation idLocation , const wstring & id ) <nl> - { <nl> - if ( ! dict ) / / we recursively go up ; only when we reach the top do we fail <nl> - UnknownIdentifier ( id , idLocation ) ; <nl> - let idIter = dict - > namedArgs . find ( id ) ; <nl> - if ( idIter = = dict - > namedArgs . end ( ) ) <nl> - return LookupDictMember ( dict - > parent , idLocation , id ) ; / / not found : try parent <nl> - return idIter - > second ; / / found it <nl> - } <nl> + void Do ( ExpressionPtr e ) <nl> + { <nl> + let doValueExpr = LookupDictMember ( e , e - > location , L " do " ) ; / / expr to compute ' do ' member <nl> + EvaluateParse ( doValueExpr ) ; <nl> + } <nl> + } ; <nl> + <nl> + ConfigValuePtr Evaluate ( ExpressionPtr e ) <nl> + { <nl> + return Evaluator ( ) . EvaluateParse ( e ) ; <nl> + } <nl> <nl> / / top - level entry <nl> / / A config sequence X = A ; Y = B ; do = ( A , B ) is really parsed as [ X = A ; Y = B ] . do . That ' s the tree we get . I . e . we try to compute the ' do ' member . <nl> / / TODO : This is not good - - constructors should always be fast to run . Do ( ) should run after late initializations . <nl> void Do ( ExpressionPtr e ) <nl> { <nl> - let doValueExpr = LookupDictMember ( e , e - > location , L " do " ) ; / / expr to compute ' do ' member <nl> - Evaluate ( doValueExpr ) ; <nl> - } <nl> + Evaluator ( ) . Do ( e ) ; <nl> + } <nl> <nl> } } } / / namespaces <nl> <nl> int wmain ( int / * argc * / , wchar_t * / * argv * / [ ] ) <nl> try <nl> { <nl> / / let parserTest = L " a = 1 \ na1_ = 13 ; b = 2 / / cmt \ ndo = new PrintAction [ message = ' hello ' ] ; do1 = ( print \ n : train : eval ) ; x = array [ 1 . . 13 ] ( i = > 1 + i * print . message = = 13 * 42 ) ; print = new PrintAction [ message = ' Hello World ' ] " ; <nl> - let parserTest = L " do = new ! PrintAction [ message = ' Hello World ' ] " ; <nl> + let parserTest = L " do = new PrintAction [ message = if true | | false then ' Hello World ' + \ " ! \ " else ' Oops ? ' ] " ; <nl> let expr = ParseConfigString ( parserTest ) ; <nl> expr - > Dump ( ) ; <nl> Do ( expr ) ; <nl>
evaluation functions moved into a class Evaluator ;
microsoft/CNTK
fed72728396160e2294a90c9b863e508f8b74d8b
2015-08-07T08:41:25Z
mmm a / src / net_processing . cpp <nl> ppp b / src / net_processing . cpp <nl> void static ProcessGetData ( CNode * pfrom , const CChainParams & chainparams , CConnm <nl> } / / release cs_main <nl> <nl> if ( it ! = pfrom - > vRecvGetData . end ( ) & & ! pfrom - > fPauseSend ) { <nl> - const CInv & inv = * it ; <nl> + const CInv & inv = * it + + ; <nl> if ( inv . type = = MSG_BLOCK | | inv . type = = MSG_FILTERED_BLOCK | | inv . type = = MSG_CMPCT_BLOCK | | inv . type = = MSG_WITNESS_BLOCK ) { <nl> - it + + ; <nl> ProcessGetBlockData ( pfrom , chainparams , inv , connman ) ; <nl> } <nl> + / / else : If the first item on the queue is an unknown type , we erase it <nl> + / / and continue processing the queue on the next call . <nl> } <nl> <nl> - / / Unknown types in the GetData stay in vRecvGetData and block any future <nl> - / / message from this peer , see vRecvGetData check in ProcessMessages ( ) . <nl> - / / Depending on future p2p changes , we might either drop unknown getdata on <nl> - / / the floor or disconnect the peer . <nl> - <nl> pfrom - > vRecvGetData . erase ( pfrom - > vRecvGetData . begin ( ) , it ) ; <nl> <nl> if ( ! vNotFound . empty ( ) ) { <nl>
[ net processing ] ignore unknown INV types in GETDATA messages
bitcoin/bitcoin
e257cf71c851e25e1a533bf1d4296f6b55c81332
2020-04-29T14:54:55Z
mmm a / arangod / Agency / TransactionBuilder . h <nl> ppp b / arangod / Agency / TransactionBuilder . h <nl> <nl> namespace arangodb { <nl> namespace agency { <nl> <nl> - template < typename B > <nl> - struct envelope ; <nl> - <nl> - template < typename T > <nl> - struct buffer_mapper ; <nl> - <nl> - template < typename B , typename T , typename . . . Vs > <nl> - struct read_trx { <nl> - using buffer = buffer_mapper < B > ; <nl> - <nl> - template < typename K > <nl> - read_trx key ( K & & k ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - return read_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> - <nl> - T done ( ) & & { <nl> - _buffer . closeArray ( ) ; <nl> - return T ( std : : move ( _buffer ) ) ; <nl> - } <nl> - private : <nl> - friend T ; <nl> - explicit read_trx ( buffer & & b ) : _buffer ( std : : move ( b ) ) { } <nl> - buffer _buffer ; <nl> - } ; <nl> - <nl> - template < typename B , typename T > <nl> - struct write_trx ; <nl> - <nl> - template < typename B , typename T > <nl> - struct precs_trx { <nl> - using buffer = buffer_mapper < B > ; <nl> - <nl> - template < typename K , typename V > <nl> - precs_trx isEqual ( K & & k , V & & v ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - _buffer . setKey ( " old " , std : : forward < V > ( v ) ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return precs_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> - <nl> - template < typename K > <nl> - precs_trx isEmpty ( K & & k ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - _buffer . setKey ( " oldEmpty " , true ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return precs_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> - <nl> - T done ( ) & & { <nl> - _buffer . closeObject ( ) ; <nl> - _buffer . setValue ( VPackValue ( AgencyWriteTransaction : : randomClientId ( ) ) ) ; <nl> - _buffer . closeArray ( ) ; <nl> - return T ( std : : move ( _buffer ) ) ; <nl> - } <nl> - <nl> - private : <nl> - friend write_trx < B , T > ; <nl> - friend T ; <nl> - <nl> - precs_trx ( buffer & & b ) : _buffer ( std : : move ( b ) ) { } <nl> - buffer _buffer ; <nl> + namespace detail { <nl> + struct no_op_deleter { <nl> + void operator ( ) ( void * ) const { } ; <nl> } ; <nl> <nl> - template < typename B , typename T > <nl> - struct write_trx { <nl> - using buffer = buffer_mapper < B > ; <nl> - <nl> - template < typename K , typename V > <nl> - write_trx set ( K & & k , V & & v ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - _buffer . setKey ( " op " , " set " ) ; <nl> - _buffer . setKey ( " new " , std : : forward < V > ( v ) ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return write_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> + template < typename T > <nl> + using moving_ptr = std : : unique_ptr < T , no_op_deleter > ; <nl> <nl> - template < typename K , typename F > <nl> - write_trx emplace ( K & & k , F f ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - f ( _buffer . userObject ( ) ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return write_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> + template < typename V > <nl> + void add_to_builder ( VPackBuilder & b , V const & v ) { <nl> + b . add ( VPackValue ( v ) ) ; <nl> + } <nl> <nl> - template < typename K > <nl> - write_trx remove ( K & & k ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - _buffer . setKey ( " op " , " delete " ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return write_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> + template < > <nl> + inline void add_to_builder ( VPackBuilder & b , VPackSlice const & v ) { <nl> + b . add ( v ) ; <nl> + } <nl> <nl> - template < typename K > <nl> - write_trx inc ( K & & k , uint64_t delta = 1 ) & & { <nl> - _buffer . setValue ( std : : forward < K > ( k ) ) ; <nl> - _buffer . openObject ( ) ; <nl> - _buffer . setKey ( " op " , " increment " ) ; <nl> - _buffer . setKey ( " delta " , delta ) ; <nl> - _buffer . closeObject ( ) ; <nl> - return write_trx ( std : : move ( _buffer ) ) ; <nl> - } <nl> + template < typename K , typename V > <nl> + void add_to_builder ( VPackBuilder & b , K const & key , V const & v ) { <nl> + b . add ( key , VPackValue ( v ) ) ; <nl> + } <nl> <nl> - T done ( ) & & { _buffer . closeObject ( ) ; <nl> - _buffer . setValue ( VPackSlice : : emptyObjectSlice ( ) ) ; <nl> - _buffer . setValue ( VPackValue ( AgencyWriteTransaction : : randomClientId ( ) ) ) ; <nl> - _buffer . closeArray ( ) ; <nl> - return T ( std : : move ( _buffer ) ) ; <nl> - } <nl> + template < typename K > <nl> + inline void add_to_builder ( VPackBuilder & b , K const & key , VPackSlice const & v ) { <nl> + b . add ( key , v ) ; <nl> + } <nl> + } / / namespace detail <nl> <nl> - precs_trx < B , T > precs ( ) & & { <nl> - _buffer . closeObject ( ) ; <nl> - _buffer . openObject ( ) ; <nl> - return std : : move ( _buffer ) ; <nl> - } <nl> - write_trx & operator = ( write_trx & & ) = default ; <nl> + struct envelope { <nl> + using builder_ptr = detail : : moving_ptr < VPackBuilder > ; <nl> + <nl> + struct read_trx { <nl> + envelope end ( ) { <nl> + _builder - > close ( ) ; <nl> + return envelope ( _builder . release ( ) ) ; <nl> + } <nl> + template < typename K > <nl> + read_trx & key ( K & & k ) { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + return * this ; <nl> + } <nl> + read_trx ( read_trx & & ) = default ; <nl> + read_trx & operator = ( read_trx & & ) = default ; <nl> + <nl> + # ifdef ARANGODB_ENABLE_MAINTAINER_MODE <nl> + / / if this assertion triggers you forgot to call ` end ( ) ` <nl> + ~ read_trx ( ) { TRI_ASSERT ( _builder = = nullptr ) ; } <nl> + # endif <nl> <nl> - private : <nl> - friend T ; <nl> + private : <nl> + friend envelope ; <nl> + read_trx ( builder_ptr b ) : _builder ( std : : move ( b ) ) { _builder - > openArray ( ) ; } <nl> + builder_ptr _builder ; <nl> + } ; <nl> + <nl> + struct write_trx ; <nl> + struct precs_trx { <nl> + template < typename K , typename V > <nl> + precs_trx & & isEqual ( K & & k , V & & v ) & & { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + detail : : add_to_builder ( * _builder . get ( ) , " old " ) ; <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < V > ( v ) ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + template < typename K > <nl> + precs_trx & & isEmpty ( K & & k ) & & { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + _builder - > add ( " oldEmpty " , VPackValue ( true ) ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + envelope end ( ) { <nl> + _builder - > close ( ) ; <nl> + _builder - > add ( VPackValue ( AgencyWriteTransaction : : randomClientId ( ) ) ) ; <nl> + _builder - > close ( ) ; <nl> + return envelope ( _builder . release ( ) ) ; <nl> + } <nl> + precs_trx ( precs_trx & & ) = default ; <nl> + precs_trx & operator = ( precs_trx & & ) = default ; <nl> + <nl> + # ifdef ARANGODB_ENABLE_MAINTAINER_MODE <nl> + / / if this assertion triggers you forgot to call ` end ( ) ` <nl> + ~ precs_trx ( ) { TRI_ASSERT ( _builder = = nullptr ) ; } <nl> + # endif <nl> <nl> - explicit write_trx ( buffer & & b ) : _buffer ( std : : move ( b ) ) { } <nl> - buffer _buffer ; <nl> - } ; <nl> + private : <nl> + friend write_trx ; <nl> + precs_trx ( builder_ptr b ) : _builder ( std : : move ( b ) ) { <nl> + _builder - > openObject ( ) ; <nl> + } <nl> + builder_ptr _builder ; <nl> + } ; <nl> + <nl> + struct write_trx { <nl> + envelope end ( ) { <nl> + _builder - > close ( ) ; <nl> + _builder - > add ( VPackSlice : : emptyObjectSlice ( ) ) ; <nl> + _builder - > add ( VPackValue ( AgencyWriteTransaction : : randomClientId ( ) ) ) ; <nl> + _builder - > close ( ) ; <nl> + return envelope ( _builder . release ( ) ) ; <nl> + } <nl> + template < typename K , typename V > <nl> + write_trx & & key ( K & & k , V & & v ) { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < V > ( v ) ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + template < typename K , typename F > <nl> + write_trx & & emplace ( K & & k , F & & f ) { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + std : : forward < F > ( f ) ( * _builder ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + template < typename K , typename V > <nl> + write_trx & & set ( K & & k , V & & v ) { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + _builder - > add ( " op " , VPackValue ( " set " ) ) ; <nl> + detail : : add_to_builder ( * _builder . get ( ) , " new " , std : : forward < V > ( v ) ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + template < typename K > <nl> + write_trx & & remove ( K & & k ) { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + _builder - > add ( " op " , VPackValue ( " delete " ) ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + template < typename K > <nl> + write_trx & & inc ( K & & k , uint64_t delta = 1 ) & & { <nl> + detail : : add_to_builder ( * _builder . get ( ) , std : : forward < K > ( k ) ) ; <nl> + _builder - > openObject ( ) ; <nl> + this - > key ( " op " , " increment " ) ; <nl> + this - > key ( " delta " , delta ) ; <nl> + _builder - > close ( ) ; <nl> + return std : : move ( * this ) ; <nl> + } <nl> + <nl> + write_trx ( write_trx & & ) = default ; <nl> + write_trx & operator = ( write_trx & & ) = default ; <nl> + <nl> + # ifdef ARANGODB_ENABLE_MAINTAINER_MODE <nl> + / / if this assertion triggers you forgot to call ` end ( ) ` <nl> + ~ write_trx ( ) { TRI_ASSERT ( _builder = = nullptr ) ; } <nl> + # endif <nl> <nl> + precs_trx precs ( ) { return precs_trx ( std : : move ( _builder ) ) ; } <nl> <nl> - template < typename B > <nl> - struct envelope { <nl> - using buffer = buffer_mapper < B > ; <nl> + private : <nl> + friend envelope ; <nl> + write_trx ( builder_ptr b ) : _builder ( std : : move ( b ) ) { <nl> + _builder - > openArray ( ) ; <nl> + _builder - > openObject ( ) ; <nl> + } <nl> + builder_ptr _builder ; <nl> + } ; <nl> <nl> - read_trx < B , envelope > read ( ) & & { <nl> - _buffer . openArray ( ) ; <nl> - return read_trx < B , envelope > ( std : : move ( _buffer ) ) ; <nl> - } <nl> + read_trx read ( ) { return read_trx ( std : : move ( _builder ) ) ; } <nl> + write_trx write ( ) { return write_trx ( std : : move ( _builder ) ) ; } <nl> <nl> - write_trx < B , envelope > write ( ) & & { <nl> - _buffer . openArray ( ) ; <nl> - _buffer . openObject ( ) ; <nl> - return write_trx < B , envelope > ( std : : move ( _buffer ) ) ; <nl> + void done ( ) { <nl> + _builder - > close ( ) ; <nl> + _builder . release ( ) ; <nl> } <nl> <nl> - void done ( ) & & { <nl> - _buffer . closeArray ( ) ; <nl> - } <nl> + envelope ( envelope & & ) = default ; <nl> + envelope & operator = ( envelope & & ) = default ; <nl> <nl> - static envelope create ( VPackBuilder & b ) { <nl> - buffer buff ( b ) ; <nl> - envelope env ( buffer { b } ) ; <nl> - env . _buffer . openArray ( ) ; <nl> - return env ; <nl> + static envelope into_builder ( VPackBuilder & b ) { <nl> + b . openArray ( ) ; <nl> + return envelope ( & b ) ; <nl> } <nl> - <nl> + # ifdef ARANGODB_ENABLE_MAINTAINER_MODE <nl> + / / if this assertion triggers you forgot to call ` done ( ) ` <nl> + ~ envelope ( ) { TRI_ASSERT ( _builder = = nullptr ) ; } <nl> + # endif <nl> private : <nl> - friend write_trx < B , envelope > ; <nl> - friend read_trx < B , envelope > ; <nl> - friend precs_trx < B , envelope > ; <nl> - explicit envelope ( buffer & & b ) : _buffer ( std : : move ( b ) ) { } <nl> - envelope ( ) = default ; <nl> - buffer _buffer ; <nl> - } ; <nl> - <nl> - namespace detail { <nl> - <nl> - template < typename V > <nl> - void add_to_builder ( VPackBuilder * b , V const & v ) { <nl> - b - > add ( VPackValue ( v ) ) ; <nl> - } <nl> - <nl> - template < > <nl> - inline void add_to_builder ( VPackBuilder * b , VPackSlice const & v ) { <nl> - b - > add ( v ) ; <nl> - } <nl> - <nl> - } <nl> - <nl> - <nl> - template < > <nl> - struct buffer_mapper < VPackBuilder > { <nl> - <nl> - explicit buffer_mapper ( VPackBuilder & builder ) : _builder ( & builder ) { } ; <nl> - <nl> - template < typename K , typename V > <nl> - void setKey ( K & & k , V & & v ) { <nl> - setValue ( std : : forward < K > ( k ) ) ; <nl> - setValue ( std : : forward < V > ( v ) ) ; <nl> - } <nl> - <nl> - template < typename K > <nl> - void setValue ( K const & k ) { detail : : add_to_builder ( _builder , k ) ; } <nl> - <nl> - void openArray ( ) { _builder - > openArray ( ) ; } <nl> - void closeArray ( ) { _builder - > close ( ) ; } <nl> - void openObject ( ) { _builder - > openObject ( ) ; } <nl> - void closeObject ( ) { _builder - > close ( ) ; } <nl> - <nl> - VPackBuilder & userObject ( ) { return * _builder ; } <nl> - <nl> - VPackBuilder * _builder ; <nl> + envelope ( VPackBuilder * b ) : _builder ( b ) { } <nl> + builder_ptr _builder ; <nl> } ; <nl> <nl> - } <nl> - } <nl> + } / / namespace agency <nl> + } / / namespace arangodb <nl> # endif <nl> mmm a / arangod / Cluster / ClusterInfo . cpp <nl> ppp b / arangod / Cluster / ClusterInfo . cpp <nl> futures : : Future < ResultT < T > > fetchNumberFromAgency ( std : : shared_ptr < cluster : : paths <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . read ( ) <nl> . key ( path - > str ( ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> mmm a / arangod / RestHandler / RestAdminClusterHandler . cpp <nl> ppp b / arangod / RestHandler / RestAdminClusterHandler . cpp <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : tryDeleteServer ( <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . read ( ) <nl> . key ( rootPath - > supervision ( ) - > health ( ) - > str ( ) ) <nl> . key ( rootPath - > plan ( ) - > str ( ) ) <nl> . key ( rootPath - > current ( ) - > str ( ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : tryDeleteServer ( <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> <nl> . write ( ) <nl> . remove ( rootPath - > plan ( ) - > coordinators ( ) - > server ( ctx - > server ) - > str ( ) ) <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : tryDeleteServer ( <nl> . isEmpty ( <nl> rootPath - > supervision ( ) - > dbServers ( ) - > server ( ctx - > server ) - > str ( ) ) <nl> . isEqual ( planVersionPath - > str ( ) , agency . get ( planVersionPath - > vec ( ) ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : createMoveShard ( <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . write ( ) <nl> . emplace ( jobToDoPath - > str ( ) , <nl> [ & ] ( VPackBuilder & builder ) { <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : createMoveShard ( <nl> builder . add ( " timeCreated " , VPackValue ( timepointToString ( <nl> std : : chrono : : system_clock : : now ( ) ) ) ) ; <nl> } ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> RestStatus RestAdminClusterHandler : : handlePostMoveShard ( std : : unique_ptr < MoveShar <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . read ( ) <nl> . key ( planPath - > dBServers ( ) - > str ( ) ) <nl> . key ( planPath - > collections ( ) <nl> - > database ( ctx - > database ) <nl> - > collection ( ctx - > collectionID ) <nl> - > str ( ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> RestStatus RestAdminClusterHandler : : handleGetNumberOfServers ( ) { <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . read ( ) <nl> . key ( targetPath - > numberOfDBServers ( ) - > str ( ) ) <nl> . key ( targetPath - > numberOfCoordinators ( ) - > str ( ) ) <nl> . key ( targetPath - > cleanedServers ( ) - > str ( ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> <nl> RestStatus RestAdminClusterHandler : : handlePutNumberOfServers ( ) { <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - auto write = arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) . write ( ) ; <nl> + auto write = arangodb : : agency : : envelope : : into_builder ( builder ) . write ( ) ; <nl> <nl> VPackSlice numberOfCoordinators = body . get ( " numberOfCoordinators " ) ; <nl> if ( numberOfCoordinators . isNumber ( ) | | numberOfCoordinators . isNull ( ) ) { <nl> RestStatus RestAdminClusterHandler : : handlePutNumberOfServers ( ) { <nl> return RestStatus : : DONE ; <nl> } <nl> <nl> - std : : move ( write ) . done ( ) . done ( ) ; <nl> + std : : move ( write ) . end ( ) . done ( ) ; <nl> } <nl> <nl> if ( ! hasThingsToDo ) { <nl> RestStatus RestAdminClusterHandler : : handleNumberOfServers ( ) { <nl> " only allowed on coordinators " ) ; <nl> return RestStatus : : DONE ; <nl> } <nl> - <nl> + <nl> / / GET requests are allowed for everyone , unless - - server . harden is used . <nl> / / in this case admin privileges are required . <nl> / / PUT requests always require admin privileges <nl> ServerSecurityFeature & security = server ( ) . getFeature < ServerSecurityFeature > ( ) ; <nl> - bool const needsAdminPrivileges = <nl> + bool const needsAdminPrivileges = <nl> ( request ( ) - > requestType ( ) ! = rest : : RequestType : : GET | | security . isRestApiHardened ( ) ) ; <nl> <nl> if ( needsAdminPrivileges & & <nl> RestStatus RestAdminClusterHandler : : handleHealth ( ) { <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) <nl> + arangodb : : agency : : envelope : : into_builder ( builder ) <nl> . read ( ) <nl> . key ( rootPath - > cluster ( ) - > str ( ) ) <nl> . key ( rootPath - > supervision ( ) - > health ( ) - > str ( ) ) <nl> . key ( rootPath - > plan ( ) - > str ( ) ) <nl> . key ( rootPath - > current ( ) - > str ( ) ) <nl> - . done ( ) <nl> + . end ( ) <nl> . done ( ) ; <nl> } <nl> auto fStore = AsyncAgencyComm ( ) . sendReadTransaction ( 60 . 0s , std : : move ( trx ) ) ; <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : handlePostRebalance <nl> VPackBuffer < uint8_t > trx ; <nl> { <nl> VPackBuilder builder ( trx ) ; <nl> - auto write = arangodb : : agency : : envelope < VPackBuilder > : : create ( builder ) . write ( ) ; <nl> + auto write = arangodb : : agency : : envelope : : into_builder ( builder ) . write ( ) ; <nl> <nl> auto & ci = server ( ) . getFeature < ClusterFeature > ( ) . clusterInfo ( ) ; <nl> std : : string timestamp = timepointToString ( std : : chrono : : system_clock : : now ( ) ) ; <nl> RestAdminClusterHandler : : FutureVoid RestAdminClusterHandler : : handlePostRebalance <nl> builder . add ( " timeCreated " , VPackValue ( timestamp ) ) ; <nl> } ) ; <nl> } <nl> - std : : move ( write ) . done ( ) . done ( ) ; <nl> + std : : move ( write ) . end ( ) . done ( ) ; <nl> } <nl> <nl> return AsyncAgencyComm ( ) . sendWriteTransaction ( 20s , std : : move ( trx ) ) . thenValue ( [ this ] ( AsyncAgencyCommResult & & result ) { <nl>
More efficient agency trx builder . ( )
arangodb/arangodb
f90cf864aaaf61a5821a224c0e9d79dcad78daa6
2020-12-11T13:50:40Z
mmm a / hphp / doc / debugger . refs <nl> ppp b / hphp / doc / debugger . refs <nl> For examples , <nl> b foo ( ) <nl> b MyClass : : foo ( ) <nl> <nl> + mmmmmmmmmmmmmmmmmmmmmmmm Special Breakpoints mmmmmmmmmmmmmmmmmmmmmmmm <nl> + <nl> + There are special breakpoints what can only be set by names : <nl> + <nl> + start <nl> + end <nl> + psp <nl> + <nl> + They represent different time points of a web request . ' start ' is at the <nl> + beginning of a web request , when no PHP file is invoked yet , but query <nl> + string and server variables are already prepared . ' end ' is at the end of <nl> + a web request , but BEFORE post - send processing ( psp ) . ' psp ' is at END of <nl> + psp , not beginning . To set a breakpoint at the beginning of psp , use <nl> + ' end ' , because end of a request is the same as beginning of psp . <nl> + <nl> mmmmmmmmmmmm - - Conditional Breakpoints and Watchpoints mmmmmmmmmmmm - - <nl> <nl> - Every breakpoint can specify a condition , which is an arbitrary PHP expression <nl> - that will be evaluated to TRUE or FALSE . When TRUE , it will break . When FALSE , <nl> + Every breakpoint can specify a condition , which is an arbitrary PHP expression <nl> + that will be evaluated to TRUE or FALSE . When TRUE , it will break . When FALSE , <nl> it will continue without break . " & & " is similar to " if " , except it will always <nl> break , regardless what the expression returns . This is useful to watch <nl> variables at breakpoints . For example , <nl> mmm a / hphp / runtime / eval / debugger / cmd / cmd_break . cpp <nl> ppp b / hphp / runtime / eval / debugger / cmd / cmd_break . cpp <nl> bool CmdBreak : : help ( DebuggerClient * client ) { <nl> " " , " " , <nl> " [ b ] reak [ o ] nce { above } " , " breaks just once then disables it " , <nl> " " , " " , <nl> + " [ b ] reak [ s ] tart { url } " , " breaks at start of web request " , <nl> + " [ b ] reak [ e ] nd { url } " , " breaks at end of web request " , <nl> + " [ b ] reak [ p ] sp { url } " , " breaks at end of psp " , <nl> + " " , " " , <nl> " [ b ] reak { above } if { php } " , " breaks if condition meets " , <nl> " [ b ] reak { above } & & { php } " , " breaks and evaluates an expression " , <nl> " " , " " , <nl> bool CmdBreak : : help ( DebuggerClient * client ) { <nl> " \ tb MyClass : : foo ( ) \ n " <nl> ) ; <nl> <nl> + client - > helpTitle ( " Special Breakpoints " ) ; <nl> + client - > helpSection ( <nl> + " There are special breakpoints what can only be set by names : \ n " <nl> + " \ n " <nl> + " \ tstart \ n " <nl> + " \ tend \ n " <nl> + " \ tpsp \ n " <nl> + " \ n " <nl> + " They represent different time points of a web request . ' start ' is at the " <nl> + " beginning of a web request , when no PHP file is invoked yet , but query " <nl> + " string and server variables are already prepared . ' end ' is at the end of " <nl> + " a web request , but BEFORE post - send processing ( psp ) . ' psp ' is at END of " <nl> + " psp , not beginning . To set a breakpoint at the beginning of psp , use " <nl> + " ' end ' , because end of a request is the same as beginning of psp . " <nl> + ) ; <nl> + <nl> client - > helpTitle ( " Conditional Breakpoints and Watchpoints " ) ; <nl> client - > helpSection ( <nl> " Every breakpoint can specify a condition , which is an arbitrary PHP " <nl> mmm a / hphp / runtime / eval / debugger / debugger . cpp <nl> ppp b / hphp / runtime / eval / debugger / debugger . cpp <nl> void Debugger : : InterruptSessionEnded ( const char * file ) { <nl> Interrupt ( SessionEnded , file ) ; <nl> } <nl> <nl> + void Debugger : : InterruptWithUrl ( int type , const char * url ) { <nl> + / / Build a site to represent the URL . Note it won ' t have any source info <nl> + / / in it , because this event is raised with no PHP on the stack . <nl> + InterruptSite site ( false , null_variant ) ; <nl> + site . url ( ) = url ? url : " " ; <nl> + Interrupt ( type , url , & site ) ; <nl> + } <nl> + <nl> void Debugger : : InterruptRequestStarted ( const char * url ) { <nl> TRACE ( 2 , " Debugger : : InterruptRequestStarted \ n " ) ; <nl> if ( ThreadInfo : : s_threadInfo - > m_reqInjectionData . getDebugger ( ) ) { <nl> - Interrupt ( RequestStarted , url ) ; <nl> + InterruptWithUrl ( RequestStarted , url ) ; <nl> } <nl> } <nl> <nl> void Debugger : : InterruptRequestEnded ( const char * url ) { <nl> TRACE ( 2 , " Debugger : : InterruptRequestEnded : url = % s \ n " , url ) ; <nl> if ( ThreadInfo : : s_threadInfo - > m_reqInjectionData . getDebugger ( ) ) { <nl> - Interrupt ( RequestEnded , url ) ; <nl> + InterruptWithUrl ( RequestEnded , url ) ; <nl> } <nl> CStrRef sandboxId = g_context - > getSandboxId ( ) ; <nl> s_debugger . unregisterSandbox ( sandboxId . get ( ) ) ; <nl> void Debugger : : InterruptRequestEnded ( const char * url ) { <nl> void Debugger : : InterruptPSPEnded ( const char * url ) { <nl> TRACE ( 2 , " Debugger : : InterruptPSPEnded \ n " ) ; <nl> if ( ThreadInfo : : s_threadInfo - > m_reqInjectionData . getDebugger ( ) ) { <nl> - Interrupt ( PSPEnded , url ) ; <nl> + InterruptWithUrl ( PSPEnded , url ) ; <nl> } <nl> } <nl> <nl> mmm a / hphp / runtime / eval / debugger / debugger . h <nl> ppp b / hphp / runtime / eval / debugger / debugger . h <nl> class Debugger { <nl> <nl> static void Interrupt ( int type , const char * program , <nl> InterruptSite * site = nullptr , const char * error = nullptr ) ; <nl> + static void InterruptWithUrl ( int type , const char * url ) ; <nl> <nl> typedef tbb : : concurrent_hash_map < const StringData * , DebuggerProxyPtr , <nl> StringDataHashCompare > ProxyMap ; <nl> mmm a / hphp / runtime / eval / debugger / debugger_proxy . cpp <nl> ppp b / hphp / runtime / eval / debugger / debugger_proxy . cpp <nl> bool DebuggerProxy : : blockUntilOwn ( CmdInterrupt & cmd , bool check ) { <nl> } <nl> <nl> / / Checks whether the cmd has any breakpoints that match the current Site . <nl> - / / Also returns true for cmds that have should always break . <nl> + / / Also returns true for cmds that should always break , like SessionStarted , <nl> + / / and returns true when we have special modes setup for , say , breaking on <nl> + / / RequestEnded , PSPEnded , etc . <nl> bool DebuggerProxy : : checkBreakPoints ( CmdInterrupt & cmd ) { <nl> TRACE ( 2 , " DebuggerProxy : : checkBreakPoints \ n " ) ; <nl> ReadLock lock ( m_breakMutex ) ; <nl> bool DebuggerProxy : : checkFlowBreak ( CmdInterrupt & cmd ) { <nl> } <nl> } <nl> <nl> + / / NB : this also checks whether we should be stopping at special interrupt <nl> + / / sites , like SessionStarted , RequestEnded , ExceptionThrown , etc . <nl> bpShouldBreak = checkBreakPoints ( cmd ) ; <nl> <nl> / / This is done before KindOfContinue testing . <nl>
Fix breaking on request start / end / psp
facebook/hhvm
18f717296527925e5d054dd5caacdcce021e734f
2013-05-15T20:05:07Z
mmm a / documentation / sphinx / source / downloads . rst <nl> ppp b / documentation / sphinx / source / downloads . rst <nl> macOS <nl> <nl> The macOS installation package is supported on macOS 10 . 7 + . It includes the client and ( optionally ) the server . <nl> <nl> - * ` FoundationDB - 6 . 0 . 4 . pkg < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / macOS / installers / FoundationDB - 6 . 0 . 4 . pkg > ` _ <nl> + * ` FoundationDB - 6 . 0 . 5 . pkg < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / macOS / installers / FoundationDB - 6 . 0 . 5 . pkg > ` _ <nl> <nl> Ubuntu <nl> mmmmmm <nl> <nl> The Ubuntu packages are supported on 64 - bit Ubuntu 12 . 04 + , but beware of the Linux kernel bug in Ubuntu 12 . x . <nl> <nl> - * ` foundationdb - clients - 6 . 0 . 4 - 1_amd64 . deb < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / ubuntu / installers / foundationdb - clients_6 . 0 . 4 - 1_amd64 . deb > ` _ <nl> - * ` foundationdb - server - 6 . 0 . 4 - 1_amd64 . deb < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / ubuntu / installers / foundationdb - server_6 . 0 . 4 - 1_amd64 . deb > ` _ ( depends on the clients package ) <nl> + * ` foundationdb - clients - 6 . 0 . 5 - 1_amd64 . deb < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / ubuntu / installers / foundationdb - clients_6 . 0 . 5 - 1_amd64 . deb > ` _ <nl> + * ` foundationdb - server - 6 . 0 . 5 - 1_amd64 . deb < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / ubuntu / installers / foundationdb - server_6 . 0 . 5 - 1_amd64 . deb > ` _ ( depends on the clients package ) <nl> <nl> RHEL / CentOS EL6 <nl> mmmmmmmmmmmmmmm <nl> <nl> The RHEL / CentOS EL6 packages are supported on 64 - bit RHEL / CentOS 6 . x . <nl> <nl> - * ` foundationdb - clients - 6 . 0 . 4 - 1 . el6 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / rhel6 / installers / foundationdb - clients - 6 . 0 . 4 - 1 . el6 . x86_64 . rpm > ` _ <nl> - * ` foundationdb - server - 6 . 0 . 4 - 1 . el6 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / rhel6 / installers / foundationdb - server - 6 . 0 . 4 - 1 . el6 . x86_64 . rpm > ` _ ( depends on the clients package ) <nl> + * ` foundationdb - clients - 6 . 0 . 5 - 1 . el6 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / rhel6 / installers / foundationdb - clients - 6 . 0 . 5 - 1 . el6 . x86_64 . rpm > ` _ <nl> + * ` foundationdb - server - 6 . 0 . 5 - 1 . el6 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / rhel6 / installers / foundationdb - server - 6 . 0 . 5 - 1 . el6 . x86_64 . rpm > ` _ ( depends on the clients package ) <nl> <nl> RHEL / CentOS EL7 <nl> mmmmmmmmmmmmmmm <nl> <nl> The RHEL / CentOS EL7 packages are supported on 64 - bit RHEL / CentOS 7 . x . <nl> <nl> - * ` foundationdb - clients - 6 . 0 . 4 - 1 . el7 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / rhel7 / installers / foundationdb - clients - 6 . 0 . 4 - 1 . el7 . x86_64 . rpm > ` _ <nl> - * ` foundationdb - server - 6 . 0 . 4 - 1 . el7 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / rhel7 / installers / foundationdb - server - 6 . 0 . 4 - 1 . el7 . x86_64 . rpm > ` _ ( depends on the clients package ) <nl> + * ` foundationdb - clients - 6 . 0 . 5 - 1 . el7 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / rhel7 / installers / foundationdb - clients - 6 . 0 . 5 - 1 . el7 . x86_64 . rpm > ` _ <nl> + * ` foundationdb - server - 6 . 0 . 5 - 1 . el7 . x86_64 . rpm < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / rhel7 / installers / foundationdb - server - 6 . 0 . 5 - 1 . el7 . x86_64 . rpm > ` _ ( depends on the clients package ) <nl> <nl> Windows <nl> mmmmmm - <nl> <nl> The Windows installer is supported on 64 - bit Windows XP and later . It includes the client and ( optionally ) the server . <nl> <nl> - * ` foundationdb - 6 . 0 . 4 - x64 . msi < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / windows / installers / foundationdb - 6 . 0 . 4 - x64 . msi > ` _ <nl> + * ` foundationdb - 6 . 0 . 5 - x64 . msi < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / windows / installers / foundationdb - 6 . 0 . 5 - x64 . msi > ` _ <nl> <nl> API Language Bindings <nl> = = = = = = = = = = = = = = = = = = = = = <nl> On macOS and Windows , the FoundationDB Python API bindings are installed as part <nl> <nl> If you need to use the FoundationDB Python API from other Python installations or paths , download the Python package : <nl> <nl> - * ` foundationdb - 6 . 0 . 4 . tar . gz < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / bindings / python / foundationdb - 6 . 0 . 4 . tar . gz > ` _ <nl> + * ` foundationdb - 6 . 0 . 5 . tar . gz < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / bindings / python / foundationdb - 6 . 0 . 5 . tar . gz > ` _ <nl> <nl> Ruby 1 . 9 . 3 / 2 . 0 . 0 + <nl> mmmmmmmmmmmmmmm - - <nl> <nl> - * ` fdb - 6 . 0 . 4 . gem < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / bindings / ruby / fdb - 6 . 0 . 4 . gem > ` _ <nl> + * ` fdb - 6 . 0 . 5 . gem < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / bindings / ruby / fdb - 6 . 0 . 5 . gem > ` _ <nl> <nl> Java 8 + <nl> mmmmmm - <nl> <nl> - * ` fdb - java - 6 . 0 . 4 . jar < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / bindings / java / fdb - java - 6 . 0 . 4 . jar > ` _ <nl> - * ` fdb - java - 6 . 0 . 4 - javadoc . jar < https : / / www . foundationdb . org / downloads / 6 . 0 . 4 / bindings / java / fdb - java - 6 . 0 . 4 - javadoc . jar > ` _ <nl> + * ` fdb - java - 6 . 0 . 5 . jar < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / bindings / java / fdb - java - 6 . 0 . 5 . jar > ` _ <nl> + * ` fdb - java - 6 . 0 . 5 - javadoc . jar < https : / / www . foundationdb . org / downloads / 6 . 0 . 5 / bindings / java / fdb - java - 6 . 0 . 5 - javadoc . jar > ` _ <nl> <nl> Go 1 . 1 + <nl> mmmmmm - <nl> mmm a / packaging / msi / FDBInstaller . wxs <nl> ppp b / packaging / msi / FDBInstaller . wxs <nl> <nl> <nl> < Wix xmlns = ' http : / / schemas . microsoft . com / wix / 2006 / wi ' > <nl> < Product Name = ' $ ( var . Title ) ' <nl> - Id = ' { B6805A9A - CACA - 4C08 - 9BE2 - 1EFAB91C9117 } ' <nl> + Id = ' { 632477E3 - EE9A - 4A10 - A794 - DFEE2FD43E5D } ' <nl> UpgradeCode = ' { A95EA002 - 686E - 4164 - 8356 - C715B7F8B1C8 } ' <nl> Version = ' $ ( var . Version ) ' <nl> Manufacturer = ' $ ( var . Manufacturer ) ' <nl>
Prepare for 6 . 0 . 5 release
apple/foundationdb
6bc8dd3a2b19d20633ccb79461b4af68ad60219b
2018-08-10T19:12:17Z
mmm a / README . ubuntu <nl> ppp b / README . ubuntu <nl> In this case you will have to manually compile the latest version . <nl> # tar zxvf libmms - 0 . 5 . tar . gz <nl> # cd libmms - 0 . 5 <nl> # . / configure - - prefix = / usr <nl> - # edit mmsh . h and mmsx . h and change * this to * instance <nl> # make <nl> # sudo make install <nl> <nl>
revert hacks to install of libmms , handled now in xbmc source code , see r27171 .
xbmc/xbmc
6fa63fa90a860bc223fb602b4cd7de5ee499b4db
2010-01-25T21:26:14Z
mmm a / lib / DllAvCodec . h <nl> ppp b / lib / DllAvCodec . h <nl> class DllAvCodec : public DllDynamic , DllAvCodecInterface <nl> class DllAvCodec : public DllDynamic , DllAvCodecInterface <nl> { <nl> DECLARE_DLL_WRAPPER ( DllAvCodec , DLL_PATH_LIBAVCODEC ) <nl> - # ifndef _LINUX <nl> DEFINE_FUNC_ALIGNED1 ( void , __cdecl , avcodec_flush_buffers , AVCodecContext * ) <nl> DEFINE_FUNC_ALIGNED2 ( int , __cdecl , avcodec_open_dont_call , AVCodecContext * , AVCodec * ) <nl> DEFINE_FUNC_ALIGNED4 ( int , __cdecl , avcodec_decode_video2 , AVCodecContext * , AVFrame * , int * , AVPacket * ) <nl> class DllAvCodec : public DllDynamic , DllAvCodecInterface <nl> DEFINE_FUNC_ALIGNED0 ( AVCodecContext * , __cdecl , avcodec_alloc_context ) <nl> DEFINE_FUNC_ALIGNED1 ( AVCodecParserContext * , __cdecl , av_parser_init , int ) <nl> DEFINE_FUNC_ALIGNED9 ( int , __cdecl , av_parser_parse2 , AVCodecParserContext * , AVCodecContext * , uint8_t * * , int * , const uint8_t * , int , int64_t , int64_t , int64_t ) <nl> - # else <nl> - DEFINE_METHOD1 ( void , avcodec_flush_buffers , ( AVCodecContext * p1 ) ) <nl> - DEFINE_METHOD2 ( int , avcodec_open_dont_call , ( AVCodecContext * p1 , AVCodec * p2 ) ) <nl> - DEFINE_METHOD4 ( int , avcodec_decode_video2 , ( AVCodecContext * p1 , AVFrame * p2 , int * p3 , AVPacket * p4 ) ) <nl> - DEFINE_METHOD4 ( int , avcodec_decode_audio3 , ( AVCodecContext * p1 , int16_t * p2 , int * p3 , AVPacket * p4 ) ) <nl> - DEFINE_METHOD4 ( int , avcodec_decode_subtitle2 , ( AVCodecContext * p1 , AVSubtitle * p2 , int * p3 , AVPacket * p4 ) ) <nl> - DEFINE_METHOD4 ( int , avcodec_encode_audio , ( AVCodecContext * p1 , uint8_t * p2 , int p3 , const short * p4 ) ) <nl> - DEFINE_METHOD0 ( AVCodecContext * , avcodec_alloc_context ) <nl> - DEFINE_METHOD1 ( AVCodecParserContext * , av_parser_init , ( int p1 ) ) <nl> - DEFINE_METHOD9 ( int , av_parser_parse2 , ( AVCodecParserContext * p1 , AVCodecContext * p2 , uint8_t * * p3 , int * p4 , const uint8_t * p5 , int p6 , int64_t p7 , int64_t p8 , int64_t p9 ) ) <nl> - # endif <nl> DEFINE_METHOD1 ( int , av_dup_packet , ( AVPacket * p1 ) ) <nl> DEFINE_METHOD1 ( void , av_init_packet , ( AVPacket * p1 ) ) <nl> DEFINE_METHOD3 ( int64_t , avcodec_guess_channel_layout , ( int p1 , enum CodecID p2 , const char * p3 ) ) <nl> mmm a / lib / DllAvFilter . h <nl> ppp b / lib / DllAvFilter . h <nl> class DllAvFilter : public DllDynamic , DllAvFilterInterface <nl> # else <nl> DEFINE_METHOD2 ( int , avfilter_graph_config_dont_call , ( AVFilterGraph * p1 , AVClass * p2 ) ) <nl> # endif <nl> - # ifdef _LINUX <nl> - DEFINE_METHOD1 ( int , avfilter_poll_frame , ( AVFilterLink * p1 ) ) <nl> - DEFINE_METHOD1 ( int , avfilter_request_frame , ( AVFilterLink * p1 ) ) <nl> - # else <nl> DEFINE_FUNC_ALIGNED1 ( int , __cdecl , avfilter_poll_frame , AVFilterLink * ) <nl> DEFINE_FUNC_ALIGNED1 ( int , __cdecl , avfilter_request_frame , AVFilterLink * ) <nl> - # endif <nl> # if LIBAVFILTER_VERSION_INT > = AV_VERSION_INT ( 2 , 13 , 0 ) <nl> DEFINE_METHOD3 ( int , av_vsrc_buffer_add_frame , ( AVFilterContext * p1 , AVFrame * p2 , int p3 ) ) <nl> # elif LIBAVFILTER_VERSION_INT > = AV_VERSION_INT ( 2 , 7 , 0 ) <nl> mmm a / lib / DllAvFormat . h <nl> ppp b / lib / DllAvFormat . h <nl> class DllAvFormat : public DllDynamic , DllAvFormatInterface <nl> DEFINE_METHOD1 ( int , av_read_play , ( AVFormatContext * p1 ) ) <nl> DEFINE_METHOD1 ( int , av_read_pause , ( AVFormatContext * p1 ) ) <nl> DEFINE_METHOD1 ( void , av_read_frame_flush , ( AVFormatContext * p1 ) ) <nl> - # ifndef _LINUX <nl> DEFINE_FUNC_ALIGNED2 ( int , __cdecl , av_read_frame , AVFormatContext * , AVPacket * ) <nl> DEFINE_FUNC_ALIGNED4 ( int , __cdecl , av_seek_frame , AVFormatContext * , int , int64_t , int ) <nl> DEFINE_FUNC_ALIGNED1 ( int , __cdecl , av_find_stream_info_dont_call , AVFormatContext * ) <nl> class DllAvFormat : public DllDynamic , DllAvFormatInterface <nl> DEFINE_FUNC_ALIGNED2 ( void , __cdecl , put_be24 , ByteIOContext * , unsigned int ) <nl> DEFINE_FUNC_ALIGNED2 ( void , __cdecl , put_be32 , ByteIOContext * , unsigned int ) <nl> DEFINE_FUNC_ALIGNED2 ( void , __cdecl , put_be16 , ByteIOContext * , unsigned int ) <nl> - # else <nl> - DEFINE_METHOD2 ( int , av_read_frame , ( AVFormatContext * p1 , AVPacket * p2 ) ) <nl> - DEFINE_METHOD4 ( int , av_seek_frame , ( AVFormatContext * p1 , int p2 , int64_t p3 , int p4 ) ) <nl> - DEFINE_METHOD1 ( int , av_find_stream_info_dont_call , ( AVFormatContext * p1 ) ) <nl> - DEFINE_METHOD5 ( int , av_open_input_file , ( AVFormatContext * * p1 , const char * p2 , AVInputFormat * p3 , int p4 , AVFormatParameters * p5 ) ) <nl> - DEFINE_METHOD5 ( int , av_open_input_stream , ( AVFormatContext * * p1 , ByteIOContext * p2 , const char * p3 , AVInputFormat * p4 , AVFormatParameters * p5 ) ) <nl> - DEFINE_METHOD2 ( AVInputFormat * , av_probe_input_format , ( AVProbeData * p1 , int p2 ) ) <nl> - DEFINE_METHOD3 ( AVInputFormat * , av_probe_input_format2 , ( AVProbeData * p1 , int p2 , int * p3 ) ) <nl> - DEFINE_METHOD6 ( int , av_probe_input_buffer , ( ByteIOContext * p1 , AVInputFormat * * p2 , const char * p3 , void * p4 , unsigned int p5 , unsigned int p6 ) ) <nl> - DEFINE_METHOD3 ( int , get_buffer , ( ByteIOContext * p1 , unsigned char * p2 , int p3 ) ) <nl> - DEFINE_METHOD3 ( int , get_partial_buffer , ( ByteIOContext * p1 , unsigned char * p2 , int p3 ) ) <nl> - DEFINE_METHOD2 ( void , put_byte , ( ByteIOContext * p1 , int p2 ) ) <nl> - DEFINE_METHOD3 ( void , put_buffer , ( ByteIOContext * p1 , const unsigned char * p2 , int p3 ) ) <nl> - DEFINE_METHOD2 ( void , put_be24 , ( ByteIOContext * p1 , unsigned int p2 ) ) <nl> - DEFINE_METHOD2 ( void , put_be32 , ( ByteIOContext * p1 , unsigned int p2 ) ) <nl> - DEFINE_METHOD2 ( void , put_be16 , ( ByteIOContext * p1 , unsigned int p2 ) ) <nl> - # endif <nl> DEFINE_METHOD1 ( void , url_set_interrupt_cb , ( URLInterruptCB * p1 ) ) <nl> DEFINE_METHOD8 ( int , init_put_byte , ( ByteIOContext * p1 , unsigned char * p2 , int p3 , int p4 , void * p5 , <nl> int ( * p6 ) ( void * opaque , uint8_t * buf , int buf_size ) , <nl>
drop ifdefs for aligned function call now that they map to normal
xbmc/xbmc
156465b79402ee390c96d5a7c9e0ddfdb487ba92
2011-09-11T13:58:23Z
mmm a / . gitignore <nl> ppp b / . gitignore <nl> cmake_install . cmake <nl> dmlc - core <nl> ps - lite <nl> nnvm <nl> + ! src / nnvm <nl> lib <nl> <nl> # Visual Studio Code <nl>
Revise . gitignore ( )
apache/incubator-mxnet
6e285ef118b509d0a1d1e4f5e5895db6d16811f0
2017-01-03T18:04:32Z
mmm a / tensorflow / BUILD <nl> ppp b / tensorflow / BUILD <nl> config_setting ( <nl> visibility = [ " / / visibility : public " ] , <nl> ) <nl> <nl> + config_setting ( <nl> + name = " linux_aarch64 " , <nl> + values = { " cpu " : " aarch64 " } , <nl> + visibility = [ " / / visibility : public " ] , <nl> + ) <nl> + <nl> config_setting ( <nl> name = " linux_x86_64 " , <nl> values = { " cpu " : " k8 " } , <nl> mmm a / third_party / aws / BUILD . bazel <nl> ppp b / third_party / aws / BUILD . bazel <nl> load ( " @ org_tensorflow / / third_party : common . bzl " , " template_rule " ) <nl> cc_library ( <nl> name = " aws " , <nl> srcs = select ( { <nl> + " @ org_tensorflow / / tensorflow : linux_aarch64 " : glob ( [ <nl> + " aws - cpp - sdk - core / source / platform / linux - shared / * . cpp " , <nl> + ] ) , <nl> " @ org_tensorflow / / tensorflow : linux_x86_64 " : glob ( [ <nl> " aws - cpp - sdk - core / source / platform / linux - shared / * . cpp " , <nl> ] ) , <nl>
Merge pull request from freedomtan : aws_sdk_for_aarch64
tensorflow/tensorflow
ced36f6006918e5e9f9a913991b4ff943b4a8915
2019-05-02T18:23:21Z
mmm a / modules / dreamview / backend / common / dreamview_gflags . cc <nl> ppp b / modules / dreamview / backend / common / dreamview_gflags . cc <nl> DEFINE_string ( ssl_certificate , " " , <nl> " be in PEM format , and it must have both , private key and " <nl> " certificate " ) ; <nl> <nl> - DEFINE_double ( map_radius , 200 . 0 , <nl> + DEFINE_double ( map_radius , 300 . 0 , <nl> " The radius within which Dreamview will find all the map " <nl> " elements around the car . " ) ; <nl>
Dreamview : bump default map radius to 300
ApolloAuto/apollo
203a4d2c5596b5090f359ee152fb2340fa5ec2a7
2017-11-02T21:51:54Z
mmm a / src / closure - externs . js <nl> ppp b / src / closure - externs . js <nl> var _glutPostRedisplay = function ( ) { } ; <nl> var emscripten_source_map ; <nl> <nl> / * * <nl> - * @ typy { Worker } <nl> + * @ type { Worker } <nl> * / <nl> var worker ; <nl> / * * <nl> var __setLetterbox = function ( element , topBottom , leftRight ) { } ; <nl> * / <nl> var onmessage = function ( message ) { } ; <nl> <nl> + / / Fetch . js / Fetch Worker <nl> + <nl> + / * * <nl> + * @ suppress { undefinedVars } <nl> + * / <nl> + var ENVIRONMENT_IS_FETCH_WORKER ; <nl>
Fix typo and teach Closure about ENVIRONMENT_IS_FETCH_WORKER
emscripten-core/emscripten
7b28a14d906c46b4df6c59dd94a7273cdb5b221a
2018-10-10T12:20:33Z
mmm a / Telegram / SourceFiles / info / media / info_media_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / info / media / info_media_list_widget . cpp <nl> void ListWidget : : markLayoutsStale ( ) { <nl> <nl> void ListWidget : : saveState ( not_null < Memento * > memento ) { <nl> if ( _universalAroundId ! = kDefaultAroundId ) { <nl> - memento - > setAroundId ( computeFullId ( _universalAroundId ) ) ; <nl> - memento - > setIdsLimit ( _idsLimit ) ; <nl> auto state = countScrollState ( ) ; <nl> - memento - > setScrollTopItem ( computeFullId ( state . item ) ) ; <nl> - memento - > setScrollTopShift ( state . shift ) ; <nl> + if ( state . item ) { <nl> + memento - > setAroundId ( computeFullId ( _universalAroundId ) ) ; <nl> + memento - > setIdsLimit ( _idsLimit ) ; <nl> + memento - > setScrollTopItem ( computeFullId ( state . item ) ) ; <nl> + memento - > setScrollTopShift ( state . shift ) ; <nl> + } <nl> } <nl> } <nl> <nl>
Fix crash in shared media save state .
telegramdesktop/tdesktop
5b7059dccdb59de3916e9d7a7a96a31f4f26f247
2017-11-30T08:15:21Z
new file mode 100644 <nl> index 00000000000 . . 36b7cd93cdf <nl> mmm / dev / null <nl> ppp b / 3rdParty / boost / 1 . 58 . 0 / LICENSE_1_0 . txt <nl> <nl> + Boost Software License - Version 1 . 0 - August 17th , 2003 <nl> + <nl> + Permission is hereby granted , free of charge , to any person or organization <nl> + obtaining a copy of the software and accompanying documentation covered by <nl> + this license ( the " Software " ) to use , reproduce , display , distribute , <nl> + execute , and transmit the Software , and to prepare derivative works of the <nl> + Software , and to permit third - parties to whom the Software is furnished to <nl> + do so , all subject to the following : <nl> + <nl> + The copyright notices in the Software and this entire statement , including <nl> + the above license grant , this restriction and the following disclaimer , <nl> + must be included in all copies of the Software , in whole or in part , and <nl> + all derivative works of the Software , unless such copies or derivative <nl> + works are solely in the form of machine - executable object code generated by <nl> + a source language processor . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE , TITLE AND NON - INFRINGEMENT . IN NO EVENT <nl> + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE <nl> + FOR ANY DAMAGES OR OTHER LIABILITY , WHETHER IN CONTRACT , TORT OR OTHERWISE , <nl> + ARISING FROM , OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER <nl> + DEALINGS IN THE SOFTWARE . <nl> mmm a / LICENSES - OTHER - COMPONENTS . md <nl> ppp b / LICENSES - OTHER - COMPONENTS . md <nl> <nl> * http : / / software . schmorp . de / pkg / libev . html <nl> * [ free as - is license ] ( http : / / cvs . schmorp . de / libev / LICENSE ? revision = 1 . 11 & view = markup ) <nl> <nl> - # # # mruby <nl> - <nl> - * only used for the shell <nl> - * https : / / github . com / mruby / mruby <nl> - * [ MIT License ] ( https : / / github . com / mruby / mruby / blob / master / LEGAL ) <nl> - <nl> # # # zlib <nl> <nl> * free as - is license <nl> <nl> - # # # readlib <nl> + # # # boost <nl> + <nl> + * http : / / www . boost . org / <nl> + * [ boost software license ] ( http : / / www . boost . org / LICENSE_1_0 . txt ) <nl> + <nl> + # # # readline <nl> <nl> * http : / / cnswww . cns . cwru . edu / php / chet / readline / rltop . html <nl> * GNU GPL <nl>
added license , updates licenses overview
arangodb/arangodb
5a00792931e2764e24175d77e95736bc5f5d9092
2015-08-26T18:23:43Z
mmm a / lib / Sema / CSSimplify . cpp <nl> ppp b / lib / Sema / CSSimplify . cpp <nl> getCalleeDeclAndArgs ( ConstraintSystem & cs , <nl> <nl> / / Match the argument of a call to the parameter . <nl> static ConstraintSystem : : SolutionKind <nl> - matchCallArguments ( ConstraintSystem & cs , TypeMatchKind kind , <nl> + matchCallArguments ( ConstraintSystem & cs , ConstraintKind kind , <nl> Type argType , Type paramType , <nl> ConstraintLocatorBuilder locator ) { <nl> / / Extract the parameters . <nl> matchCallArguments ( ConstraintSystem & cs , TypeMatchKind kind , <nl> / / Check the argument types for each of the parameters . <nl> ConstraintSystem : : TypeMatchOptions subflags = <nl> ConstraintSystem : : TMF_GenerateConstraints ; <nl> - TypeMatchKind subKind ; <nl> + ConstraintKind subKind ; <nl> switch ( kind ) { <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - subKind = TypeMatchKind : : ArgumentConversion ; <nl> + case ConstraintKind : : ArgumentTupleConversion : <nl> + subKind = ConstraintKind : : ArgumentConversion ; <nl> break ; <nl> <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - subKind = TypeMatchKind : : OperatorArgumentConversion ; <nl> + case ConstraintKind : : OperatorArgumentTupleConversion : <nl> + subKind = ConstraintKind : : OperatorArgumentConversion ; <nl> break ; <nl> <nl> - case TypeMatchKind : : Conversion : <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindParamType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - case TypeMatchKind : : SameType : <nl> - case TypeMatchKind : : Subtype : <nl> + case ConstraintKind : : Conversion : <nl> + case ConstraintKind : : ExplicitConversion : <nl> + case ConstraintKind : : OperatorArgumentConversion : <nl> + case ConstraintKind : : ArgumentConversion : <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : <nl> + case ConstraintKind : : Subtype : <nl> + case ConstraintKind : : ApplicableFunction : <nl> + case ConstraintKind : : BindOverload : <nl> + case ConstraintKind : : CheckedCast : <nl> + case ConstraintKind : : ConformsTo : <nl> + case ConstraintKind : : Defaultable : <nl> + case ConstraintKind : : Disjunction : <nl> + case ConstraintKind : : DynamicTypeOf : <nl> + case ConstraintKind : : LiteralConformsTo : <nl> + case ConstraintKind : : OptionalObject : <nl> + case ConstraintKind : : SelfObjectOfProtocol : <nl> + case ConstraintKind : : TypeMember : <nl> + case ConstraintKind : : UnresolvedValueMember : <nl> + case ConstraintKind : : ValueMember : <nl> llvm_unreachable ( " Not a call argument constraint " ) ; <nl> } <nl> <nl> auto haveOneNonUserConversion = <nl> - ( subKind ! = TypeMatchKind : : OperatorArgumentConversion ) ; <nl> + ( subKind ! = ConstraintKind : : OperatorArgumentConversion ) ; <nl> <nl> <nl> for ( unsigned paramIdx = 0 , numParams = parameterBindings . size ( ) ; <nl> matchCallArguments ( ConstraintSystem & cs , TypeMatchKind kind , <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : matchTupleTypes ( TupleType * tuple1 , TupleType * tuple2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> TypeMatchOptions subflags = getDefaultDecompositionOptions ( flags ) ; <nl> <nl> / / Equality and subtyping have fairly strict requirements on tuple matching , <nl> / / requiring element names to either match up or be disjoint . <nl> - if ( kind < TypeMatchKind : : Conversion ) { <nl> + if ( kind < ConstraintKind : : Conversion ) { <nl> if ( tuple1 - > getNumElements ( ) ! = tuple2 - > getNumElements ( ) ) <nl> return SolutionKind : : Error ; <nl> <nl> ConstraintSystem : : matchTupleTypes ( TupleType * tuple1 , TupleType * tuple2 , <nl> / / If the names don ' t match , we may have a conflict . <nl> if ( elt1 . getName ( ) ! = elt2 . getName ( ) ) { <nl> / / Same - type requirements require exact name matches . <nl> - if ( kind < = TypeMatchKind : : SameType ) <nl> + if ( kind < = ConstraintKind : : Equal ) <nl> return SolutionKind : : Error ; <nl> <nl> / / For subtyping constraints , just make sure that this name isn ' t <nl> ConstraintSystem : : matchTupleTypes ( TupleType * tuple1 , TupleType * tuple2 , <nl> return SolutionKind : : Solved ; <nl> } <nl> <nl> - assert ( kind > = TypeMatchKind : : Conversion ) ; <nl> - TypeMatchKind subKind ; <nl> + assert ( kind > = ConstraintKind : : Conversion ) ; <nl> + ConstraintKind subKind ; <nl> switch ( kind ) { <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - subKind = TypeMatchKind : : ArgumentConversion ; <nl> + case ConstraintKind : : ArgumentTupleConversion : <nl> + subKind = ConstraintKind : : ArgumentConversion ; <nl> break ; <nl> <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - subKind = TypeMatchKind : : OperatorArgumentConversion ; <nl> + case ConstraintKind : : OperatorArgumentTupleConversion : <nl> + subKind = ConstraintKind : : OperatorArgumentConversion ; <nl> break ; <nl> <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - case TypeMatchKind : : Conversion : <nl> - subKind = TypeMatchKind : : Conversion ; <nl> + case ConstraintKind : : OperatorArgumentConversion : <nl> + case ConstraintKind : : ArgumentConversion : <nl> + case ConstraintKind : : ExplicitConversion : <nl> + case ConstraintKind : : Conversion : <nl> + subKind = ConstraintKind : : Conversion ; <nl> break ; <nl> <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindParamType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - case TypeMatchKind : : SameType : <nl> - case TypeMatchKind : : Subtype : <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : <nl> + case ConstraintKind : : Subtype : <nl> + case ConstraintKind : : ApplicableFunction : <nl> + case ConstraintKind : : BindOverload : <nl> + case ConstraintKind : : CheckedCast : <nl> + case ConstraintKind : : ConformsTo : <nl> + case ConstraintKind : : Defaultable : <nl> + case ConstraintKind : : Disjunction : <nl> + case ConstraintKind : : DynamicTypeOf : <nl> + case ConstraintKind : : LiteralConformsTo : <nl> + case ConstraintKind : : OptionalObject : <nl> + case ConstraintKind : : SelfObjectOfProtocol : <nl> + case ConstraintKind : : TypeMember : <nl> + case ConstraintKind : : UnresolvedValueMember : <nl> + case ConstraintKind : : ValueMember : <nl> llvm_unreachable ( " Not a conversion " ) ; <nl> } <nl> <nl> ConstraintSystem : : matchTupleTypes ( TupleType * tuple1 , TupleType * tuple2 , <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : matchScalarToTupleTypes ( Type type1 , TupleType * tuple2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> int scalarFieldIdx = tuple2 - > getElementForScalarInit ( ) ; <nl> assert ( scalarFieldIdx > = 0 & & " Invalid tuple for scalar - to - tuple " ) ; <nl> ConstraintSystem : : matchScalarToTupleTypes ( Type type1 , TupleType * tuple2 , <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : matchTupleToScalarTypes ( TupleType * tuple1 , Type type2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> assert ( tuple1 - > getNumElements ( ) = = 1 & & " Wrong number of elements " ) ; <nl> assert ( ! tuple1 - > getElement ( 0 ) . isVararg ( ) & & " Should not be variadic " ) ; <nl> ConstraintSystem : : matchTupleToScalarTypes ( TupleType * tuple1 , Type type2 , <nl> / / corresponding function type representations and the given match kind . <nl> static bool matchFunctionRepresentations ( FunctionTypeRepresentation rep1 , <nl> FunctionTypeRepresentation rep2 , <nl> - TypeMatchKind kind ) { <nl> + ConstraintKind kind ) { <nl> switch ( kind ) { <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindParamType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - case TypeMatchKind : : SameType : <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : <nl> return rep1 ! = rep2 ; <nl> <nl> - case TypeMatchKind : : Subtype : <nl> - case TypeMatchKind : : Conversion : <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> + case ConstraintKind : : Subtype : <nl> + case ConstraintKind : : Conversion : <nl> + case ConstraintKind : : ExplicitConversion : <nl> + case ConstraintKind : : ArgumentConversion : <nl> + case ConstraintKind : : ArgumentTupleConversion : <nl> + case ConstraintKind : : OperatorArgumentTupleConversion : <nl> + case ConstraintKind : : OperatorArgumentConversion : <nl> + case ConstraintKind : : ApplicableFunction : <nl> + case ConstraintKind : : BindOverload : <nl> + case ConstraintKind : : CheckedCast : <nl> + case ConstraintKind : : ConformsTo : <nl> + case ConstraintKind : : Defaultable : <nl> + case ConstraintKind : : Disjunction : <nl> + case ConstraintKind : : DynamicTypeOf : <nl> + case ConstraintKind : : LiteralConformsTo : <nl> + case ConstraintKind : : OptionalObject : <nl> + case ConstraintKind : : SelfObjectOfProtocol : <nl> + case ConstraintKind : : TypeMember : <nl> + case ConstraintKind : : UnresolvedValueMember : <nl> + case ConstraintKind : : ValueMember : <nl> return false ; <nl> } <nl> } <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : matchFunctionTypes ( FunctionType * func1 , FunctionType * func2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> / / An @ autoclosure function type can be a subtype of a <nl> / / non - @ autoclosure function type . <nl> if ( func1 - > isAutoClosure ( ) ! = func2 - > isAutoClosure ( ) & & <nl> - kind < TypeMatchKind : : Subtype ) <nl> + kind < ConstraintKind : : Subtype ) <nl> return SolutionKind : : Error ; <nl> <nl> / / A non - throwing function can be a subtype of a throwing function . <nl> if ( func1 - > throws ( ) ! = func2 - > throws ( ) ) { <nl> / / Cannot drop ' throws ' . <nl> - if ( func1 - > throws ( ) | | ( func2 - > throws ( ) & & kind < TypeMatchKind : : Subtype ) ) <nl> + if ( func1 - > throws ( ) | | ( func2 - > throws ( ) & & kind < ConstraintKind : : Subtype ) ) <nl> return SolutionKind : : Error ; <nl> } <nl> <nl> / / A non - @ noescape function type can be a subtype of a @ noescape function <nl> / / type . <nl> if ( func1 - > isNoEscape ( ) ! = func2 - > isNoEscape ( ) & & <nl> - ( func1 - > isNoEscape ( ) | | kind < TypeMatchKind : : Subtype ) ) <nl> + ( func1 - > isNoEscape ( ) | | kind < ConstraintKind : : Subtype ) ) <nl> return SolutionKind : : Error ; <nl> <nl> if ( matchFunctionRepresentations ( func1 - > getExtInfo ( ) . getRepresentation ( ) , <nl> ConstraintSystem : : matchFunctionTypes ( FunctionType * func1 , FunctionType * func2 , <nl> } <nl> <nl> / / Determine how we match up the input / result types . <nl> - TypeMatchKind subKind ; <nl> + ConstraintKind subKind ; <nl> switch ( kind ) { <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindParamType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - case TypeMatchKind : : SameType : <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : <nl> subKind = kind ; <nl> break ; <nl> <nl> - case TypeMatchKind : : Subtype : <nl> - case TypeMatchKind : : Conversion : <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> - subKind = TypeMatchKind : : Subtype ; <nl> + case ConstraintKind : : Subtype : <nl> + case ConstraintKind : : Conversion : <nl> + case ConstraintKind : : ExplicitConversion : <nl> + case ConstraintKind : : ArgumentConversion : <nl> + case ConstraintKind : : ArgumentTupleConversion : <nl> + case ConstraintKind : : OperatorArgumentTupleConversion : <nl> + case ConstraintKind : : OperatorArgumentConversion : <nl> + subKind = ConstraintKind : : Subtype ; <nl> break ; <nl> + <nl> + case ConstraintKind : : ApplicableFunction : <nl> + case ConstraintKind : : BindOverload : <nl> + case ConstraintKind : : CheckedCast : <nl> + case ConstraintKind : : ConformsTo : <nl> + case ConstraintKind : : Defaultable : <nl> + case ConstraintKind : : Disjunction : <nl> + case ConstraintKind : : DynamicTypeOf : <nl> + case ConstraintKind : : LiteralConformsTo : <nl> + case ConstraintKind : : OptionalObject : <nl> + case ConstraintKind : : SelfObjectOfProtocol : <nl> + case ConstraintKind : : TypeMember : <nl> + case ConstraintKind : : UnresolvedValueMember : <nl> + case ConstraintKind : : ValueMember : <nl> + llvm_unreachable ( " Not a relational constraint " ) ; <nl> } <nl> <nl> TypeMatchOptions subflags = getDefaultDecompositionOptions ( flags ) ; <nl> ConstraintSystem : : matchFunctionTypes ( FunctionType * func1 , FunctionType * func2 , <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : matchSuperclassTypes ( Type type1 , Type type2 , <nl> - TypeMatchKind kind , <nl> + ConstraintKind kind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> TypeMatchOptions subflags = getDefaultDecompositionOptions ( flags ) ; <nl> ConstraintSystem : : matchSuperclassTypes ( Type type1 , Type type2 , <nl> if ( super1 - > getClassOrBoundGenericClass ( ) ! = classDecl2 ) <nl> continue ; <nl> <nl> - return matchTypes ( super1 , type2 , TypeMatchKind : : SameType , <nl> + return matchTypes ( super1 , type2 , ConstraintKind : : Equal , <nl> subflags , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : matchDeepEqualityTypes ( Type type1 , Type type2 , <nl> <nl> / / Match up the parents , exactly . <nl> return matchTypes ( nominal1 - > getParent ( ) , nominal2 - > getParent ( ) , <nl> - TypeMatchKind : : SameType , subflags , <nl> + ConstraintKind : : Equal , subflags , <nl> locator . withPathElement ( ConstraintLocator : : ParentType ) ) ; <nl> } <nl> <nl> ConstraintSystem : : matchDeepEqualityTypes ( Type type1 , Type type2 , <nl> " Mismatched parents of bound generics " ) ; <nl> if ( bound1 - > getParent ( ) ) { <nl> switch ( matchTypes ( bound1 - > getParent ( ) , bound2 - > getParent ( ) , <nl> - TypeMatchKind : : SameType , subflags , <nl> + ConstraintKind : : Equal , subflags , <nl> locator . withPathElement ( ConstraintLocator : : ParentType ) ) ) { <nl> case SolutionKind : : Error : <nl> return SolutionKind : : Error ; <nl> ConstraintSystem : : matchDeepEqualityTypes ( Type type1 , Type type2 , <nl> return SolutionKind : : Error ; <nl> } <nl> for ( unsigned i = 0 , n = args1 . size ( ) ; i ! = n ; + + i ) { <nl> - switch ( matchTypes ( args1 [ i ] , args2 [ i ] , TypeMatchKind : : SameType , <nl> + switch ( matchTypes ( args1 [ i ] , args2 [ i ] , ConstraintKind : : Equal , <nl> subflags , <nl> locator . withPathElement ( <nl> LocatorPathElt : : getGenericArgument ( i ) ) ) ) { <nl> ConstraintSystem : : matchExistentialTypes ( Type type1 , Type type2 , <nl> return SolutionKind : : Solved ; <nl> } <nl> <nl> - / / / \ brief Map a type - matching kind to a constraint kind . <nl> - static ConstraintKind getConstraintKind ( TypeMatchKind kind ) { <nl> - switch ( kind ) { <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - return ConstraintKind : : Bind ; <nl> - <nl> - case TypeMatchKind : : BindParamType : <nl> - return ConstraintKind : : BindParam ; <nl> - <nl> - case TypeMatchKind : : SameType : <nl> - return ConstraintKind : : Equal ; <nl> - <nl> - case TypeMatchKind : : Subtype : <nl> - return ConstraintKind : : Subtype ; <nl> - <nl> - case TypeMatchKind : : Conversion : <nl> - return ConstraintKind : : Conversion ; <nl> - <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - return ConstraintKind : : ExplicitConversion ; <nl> - <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - return ConstraintKind : : ArgumentConversion ; <nl> - <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - return ConstraintKind : : ArgumentTupleConversion ; <nl> - <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - return ConstraintKind : : OperatorArgumentTupleConversion ; <nl> - <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> - return ConstraintKind : : OperatorArgumentConversion ; <nl> - } <nl> - <nl> - llvm_unreachable ( " unhandled type matching kind " ) ; <nl> - } <nl> - <nl> static bool isStringCompatiblePointerBaseType ( TypeChecker & TC , <nl> DeclContext * DC , <nl> Type baseType ) { <nl> static bool allowsBridgingFromObjC ( TypeChecker & tc , DeclContext * dc , <nl> } <nl> <nl> ConstraintSystem : : SolutionKind <nl> - ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> + ConstraintSystem : : matchTypes ( Type type1 , Type type2 , ConstraintKind kind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> / / If we have type variables that have been bound to fixed types , look through <nl> / / to the fixed type . <nl> bool isArgumentTupleConversion <nl> - = kind = = TypeMatchKind : : ArgumentTupleConversion | | <nl> - kind = = TypeMatchKind : : OperatorArgumentTupleConversion ; <nl> - type1 = getFixedTypeRecursive ( type1 , kind = = TypeMatchKind : : SameType , <nl> + = kind = = ConstraintKind : : ArgumentTupleConversion | | <nl> + kind = = ConstraintKind : : OperatorArgumentTupleConversion ; <nl> + type1 = getFixedTypeRecursive ( type1 , kind = = ConstraintKind : : Equal , <nl> isArgumentTupleConversion ) ; <nl> auto desugar1 = type1 - > getDesugaredType ( ) ; <nl> TypeVariableType * typeVar1 = desugar1 - > getAs < TypeVariableType > ( ) ; <nl> <nl> - type2 = getFixedTypeRecursive ( type2 , kind = = TypeMatchKind : : SameType , <nl> + type2 = getFixedTypeRecursive ( type2 , kind = = ConstraintKind : : Equal , <nl> isArgumentTupleConversion ) ; <nl> auto desugar2 = type2 - > getDesugaredType ( ) ; <nl> TypeVariableType * typeVar2 = desugar2 - > getAs < TypeVariableType > ( ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / this new constraint will be solved at a later point . <nl> / / Obviously , this must not happen at the top level , or the <nl> / / algorithm would not terminate . <nl> - addUnsolvedConstraint ( Constraint : : create ( * this , <nl> - getConstraintKind ( kind ) , <nl> - type1 , type2 , DeclName ( ) , <nl> + addUnsolvedConstraint ( Constraint : : create ( * this , kind , type1 , type2 , <nl> + DeclName ( ) , <nl> FunctionRefKind : : Compound , <nl> getConstraintLocator ( locator ) ) ) ; <nl> return SolutionKind : : Solved ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / If either ( or both ) types are type variables , unify the type variables . <nl> if ( typeVar1 | | typeVar2 ) { <nl> switch ( kind ) { <nl> - case TypeMatchKind : : BindType : <nl> - case TypeMatchKind : : BindToPointerType : <nl> - case TypeMatchKind : : SameType : { <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : { <nl> if ( typeVar1 & & typeVar2 ) { <nl> auto rep1 = getRepresentative ( typeVar1 ) ; <nl> auto rep2 = getRepresentative ( typeVar2 ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> <nl> / / Provide a fixed type for the type variable . <nl> - bool wantRvalue = kind = = TypeMatchKind : : SameType ; <nl> + bool wantRvalue = kind = = ConstraintKind : : Equal ; <nl> if ( typeVar1 ) { <nl> / / If we want an rvalue , get the rvalue . <nl> if ( wantRvalue ) <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> <nl> / / A constraint that binds any pointer to a void pointer is <nl> / / ineffective , since any pointer can be converted to a void pointer . <nl> - if ( kind = = TypeMatchKind : : BindToPointerType & & desugar2 - > isVoid ( ) ) { <nl> + if ( kind = = ConstraintKind : : BindToPointerType & & desugar2 - > isVoid ( ) ) { <nl> / / Bind type1 to Void only as a last resort . <nl> addConstraint ( ConstraintKind : : Defaultable , typeVar1 , type2 , <nl> getConstraintLocator ( locator ) ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> return SolutionKind : : Solved ; <nl> } <nl> <nl> - case TypeMatchKind : : BindParamType : { <nl> + case ConstraintKind : : BindParam : { <nl> if ( typeVar2 & & ! typeVar1 ) { <nl> if ( auto * iot = dyn_cast < InOutType > ( desugar1 ) ) { <nl> assignFixedType ( typeVar2 , LValueType : : get ( iot - > getObjectType ( ) ) ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> return formUnsolvedResult ( ) ; <nl> } <nl> <nl> - case TypeMatchKind : : ArgumentTupleConversion : <nl> - case TypeMatchKind : : Conversion : <nl> + case ConstraintKind : : ArgumentTupleConversion : <nl> + case ConstraintKind : : Conversion : <nl> if ( typeVar1 & & typeVar2 ) { <nl> auto rep1 = getRepresentative ( typeVar1 ) ; <nl> auto rep2 = getRepresentative ( typeVar2 ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> SWIFT_FALLTHROUGH ; <nl> <nl> - case TypeMatchKind : : Subtype : <nl> - case TypeMatchKind : : ExplicitConversion : <nl> - case TypeMatchKind : : ArgumentConversion : <nl> - case TypeMatchKind : : OperatorArgumentTupleConversion : <nl> - case TypeMatchKind : : OperatorArgumentConversion : <nl> + case ConstraintKind : : Subtype : <nl> + case ConstraintKind : : ExplicitConversion : <nl> + case ConstraintKind : : ArgumentConversion : <nl> + case ConstraintKind : : OperatorArgumentTupleConversion : <nl> + case ConstraintKind : : OperatorArgumentConversion : <nl> / / We couldn ' t solve this constraint . If only one of the types is a type <nl> / / variable , perhaps we can do something with it below . <nl> if ( typeVar1 & & typeVar2 ) { <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> <nl> break ; <nl> + <nl> + case ConstraintKind : : ApplicableFunction : <nl> + case ConstraintKind : : BindOverload : <nl> + case ConstraintKind : : CheckedCast : <nl> + case ConstraintKind : : ConformsTo : <nl> + case ConstraintKind : : Defaultable : <nl> + case ConstraintKind : : Disjunction : <nl> + case ConstraintKind : : DynamicTypeOf : <nl> + case ConstraintKind : : LiteralConformsTo : <nl> + case ConstraintKind : : OptionalObject : <nl> + case ConstraintKind : : SelfObjectOfProtocol : <nl> + case ConstraintKind : : TypeMember : <nl> + case ConstraintKind : : UnresolvedValueMember : <nl> + case ConstraintKind : : ValueMember : <nl> + llvm_unreachable ( " Not a relational constraint " ) ; <nl> } <nl> } <nl> <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> <nl> / / If this is an argument conversion , handle it directly . The rules are <nl> / / different from normal conversions . <nl> - if ( kind = = TypeMatchKind : : ArgumentTupleConversion | | <nl> - kind = = TypeMatchKind : : OperatorArgumentTupleConversion ) { <nl> + if ( kind = = ConstraintKind : : ArgumentTupleConversion | | <nl> + kind = = ConstraintKind : : OperatorArgumentTupleConversion ) { <nl> if ( ! typeVar2 ) { <nl> return : : matchCallArguments ( * this , kind , type1 , type2 , locator ) ; <nl> } <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> <nl> / / Check for CF < - > ObjectiveC bridging . <nl> if ( desugar1 - > getKind ( ) = = TypeKind : : Class & & <nl> - kind > = TypeMatchKind : : Subtype ) { <nl> + kind > = ConstraintKind : : Subtype ) { <nl> auto class1 = cast < ClassDecl > ( nominal1 - > getDecl ( ) ) ; <nl> auto class2 = cast < ClassDecl > ( nominal2 - > getDecl ( ) ) ; <nl> <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> auto meta1 = cast < AnyMetatypeType > ( desugar1 ) ; <nl> auto meta2 = cast < AnyMetatypeType > ( desugar2 ) ; <nl> <nl> - TypeMatchKind subKind = TypeMatchKind : : SameType ; <nl> + ConstraintKind subKind = ConstraintKind : : Equal ; <nl> / / A . Type < B . Type if A < B and both A and B are classes . <nl> if ( isa < MetatypeType > ( desugar1 ) & & <nl> - kind ! = TypeMatchKind : : SameType & & <nl> + kind ! = ConstraintKind : : Equal & & <nl> meta1 - > getInstanceType ( ) - > mayHaveSuperclass ( ) & & <nl> meta2 - > getInstanceType ( ) - > getClassOrBoundGenericClass ( ) ) <nl> - subKind = std : : min ( kind , TypeMatchKind : : Subtype ) ; <nl> + subKind = std : : min ( kind , ConstraintKind : : Subtype ) ; <nl> / / P . Type < Q . Type if P < Q , both P and Q are protocols , and P . Type <nl> / / and Q . Type are both existential metatypes . <nl> else if ( isa < ExistentialMetatypeType > ( meta1 ) <nl> & & isa < ExistentialMetatypeType > ( meta2 ) ) <nl> - subKind = std : : min ( kind , TypeMatchKind : : Subtype ) ; <nl> + subKind = std : : min ( kind , ConstraintKind : : Subtype ) ; <nl> <nl> return matchTypes ( meta1 - > getInstanceType ( ) , meta2 - > getInstanceType ( ) , <nl> subKind , subflags , <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> break ; <nl> <nl> case TypeKind : : LValue : <nl> - if ( kind = = TypeMatchKind : : BindParamType ) <nl> + if ( kind = = ConstraintKind : : BindParam ) <nl> return SolutionKind : : Error ; <nl> return matchTypes ( cast < LValueType > ( desugar1 ) - > getObjectType ( ) , <nl> cast < LValueType > ( desugar2 ) - > getObjectType ( ) , <nl> - TypeMatchKind : : SameType , subflags , <nl> + ConstraintKind : : Equal , subflags , <nl> locator . withPathElement ( <nl> ConstraintLocator : : ArrayElementType ) ) ; <nl> <nl> case TypeKind : : InOut : <nl> / / If the RHS is an inout type , the LHS must be an @ lvalue type . <nl> - if ( kind = = TypeMatchKind : : BindParamType | | <nl> - kind > = TypeMatchKind : : OperatorArgumentConversion ) <nl> + if ( kind = = ConstraintKind : : BindParam | | <nl> + kind > = ConstraintKind : : OperatorArgumentConversion ) <nl> return SolutionKind : : Error ; <nl> <nl> return matchTypes ( cast < InOutType > ( desugar1 ) - > getObjectType ( ) , <nl> cast < InOutType > ( desugar2 ) - > getObjectType ( ) , <nl> - TypeMatchKind : : SameType , subflags , <nl> + ConstraintKind : : Equal , subflags , <nl> locator . withPathElement ( ConstraintLocator : : ArrayElementType ) ) ; <nl> <nl> case TypeKind : : UnboundGeneric : <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> } <nl> <nl> - if ( concrete & & kind > = TypeMatchKind : : Subtype ) { <nl> + if ( concrete & & kind > = ConstraintKind : : Subtype ) { <nl> auto tuple1 = type1 - > getAs < TupleType > ( ) ; <nl> auto tuple2 = type2 - > getAs < TupleType > ( ) ; <nl> <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / to a tuple with varargs . <nl> if ( ( tuple2 - > getNumElements ( ) = = 1 & & <nl> ! tuple2 - > getElement ( 0 ) . isVararg ( ) ) | | <nl> - ( kind > = TypeMatchKind : : Conversion & & <nl> + ( kind > = ConstraintKind : : Conversion & & <nl> tuple2 - > getElementForScalarInit ( ) > = 0 & & <nl> ( isArgumentTupleConversion | | <nl> ! tuple2 - > getVarArgsBaseType ( ) ) ) ) { <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / Don ' t allow this in operator contexts or we ' ll end up allowing <nl> / / ' T ( ) = = U ( ) ' for unrelated T and U that just happen to be Hashable . <nl> / / We can remove this special case when we implement operator hiding . <nl> - if ( kind ! = TypeMatchKind : : OperatorArgumentConversion ) { <nl> + if ( kind ! = ConstraintKind : : OperatorArgumentConversion ) { <nl> conversionsOrFixes . push_back ( <nl> ConversionRestrictionKind : : HashableToAnyHashable ) ; <nl> } <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> <nl> / / Special implicit nominal conversions . <nl> - if ( kind > = TypeMatchKind : : Conversion ) { <nl> + if ( kind > = ConstraintKind : : Conversion ) { <nl> / / Array - > Array . <nl> if ( isArrayType ( desugar1 ) & & isArrayType ( desugar2 ) ) { <nl> conversionsOrFixes . push_back ( ConversionRestrictionKind : : ArrayUpcast ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> } <nl> <nl> - if ( kind = = TypeMatchKind : : BindToPointerType ) { <nl> + if ( kind = = ConstraintKind : : BindToPointerType ) { <nl> if ( desugar2 - > isEqual ( getASTContext ( ) . TheEmptyTupleType ) ) <nl> return SolutionKind : : Solved ; <nl> } <nl> <nl> - if ( concrete & & kind > = TypeMatchKind : : Conversion ) { <nl> + if ( concrete & & kind > = ConstraintKind : : Conversion ) { <nl> / / An lvalue of type T1 can be converted to a value of type T2 so long as <nl> / / T1 is convertible to T2 ( by loading the value ) . Note that we cannot get <nl> / / a value of inout type as an lvalue though . <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> <nl> / / Explicit bridging from a value type to an Objective - C class type . <nl> - if ( kind = = TypeMatchKind : : ExplicitConversion ) { <nl> + if ( kind = = ConstraintKind : : ExplicitConversion ) { <nl> if ( type1 - > isPotentiallyBridgedValueType ( ) & & <nl> type1 - > getAnyNominal ( ) <nl> ! = TC . Context . getImplicitlyUnwrappedOptionalDecl ( ) & & <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> if ( isBridgeableTargetType ) { <nl> Type bridgedValueType ; <nl> if ( TC . Context . getBridgedToObjC ( DC , type1 , & bridgedValueType ) ) { <nl> - if ( ( kind > = TypeMatchKind : : ExplicitConversion | | <nl> + if ( ( kind > = ConstraintKind : : ExplicitConversion | | <nl> bridgedValueType - > getAnyNominal ( ) ! = <nl> TC . Context . getErrorDecl ( ) ) ) <nl> conversionsOrFixes . push_back ( <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> <nl> / / Pointer arguments can be converted from pointer - compatible types . <nl> - if ( kind > = TypeMatchKind : : ArgumentConversion ) { <nl> + if ( kind > = ConstraintKind : : ArgumentConversion ) { <nl> Type unwrappedType2 = type2 ; <nl> OptionalTypeKind type2OptionalKind ; <nl> if ( Type unwrapped = type2 - > getAnyOptionalObjectType ( type2OptionalKind ) ) <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> <nl> Type simplifiedInoutBaseType = <nl> getFixedTypeRecursive ( inoutBaseType , <nl> - kind = = TypeMatchKind : : SameType , <nl> + kind = = ConstraintKind : : Equal , <nl> isArgumentTupleConversion ) ; <nl> <nl> / / FIXME : If the base is still a type variable , we can ' t tell <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> <nl> if ( ! flags . contains ( TMF_ApplyingOperatorParameter ) & & <nl> / / Operators cannot use these implicit conversions . <nl> - ( kind = = TypeMatchKind : : ArgumentConversion | | <nl> - kind = = TypeMatchKind : : ArgumentTupleConversion ) ) { <nl> + ( kind = = ConstraintKind : : ArgumentConversion | | <nl> + kind = = ConstraintKind : : ArgumentTupleConversion ) ) { <nl> <nl> / / We can potentially convert from an UnsafeMutablePointer <nl> / / of a different type , if we ' re a void pointer . <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> } <nl> <nl> - if ( concrete & & kind > = TypeMatchKind : : OperatorArgumentConversion ) { <nl> + if ( concrete & & kind > = ConstraintKind : : OperatorArgumentConversion ) { <nl> / / If the RHS is an inout type , the LHS must be an @ lvalue type . <nl> if ( auto * iot = type2 - > getAs < InOutType > ( ) ) { <nl> return matchTypes ( type1 , LValueType : : get ( iot - > getObjectType ( ) ) , <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / equivalent to a conformance relationship on the instance types . <nl> / / This applies to nested metatype levels , so if A : P then <nl> / / A . Type : P . Type . <nl> - if ( concrete & & kind > = TypeMatchKind : : Subtype & & <nl> + if ( concrete & & kind > = ConstraintKind : : Subtype & & <nl> type1 - > is < MetatypeType > ( ) & & type2 - > is < ExistentialMetatypeType > ( ) ) { <nl> conversionsOrFixes . push_back ( <nl> ConversionRestrictionKind : : MetatypeToExistentialMetatype ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / we hit commit_to_conversions below , but we have to add a token restriction <nl> / / to ensure we wrap the metatype value in a metatype erasure . <nl> if ( concrete & & type2 - > isExistentialType ( ) & & <nl> - kind > = TypeMatchKind : : Subtype ) { <nl> + kind > = ConstraintKind : : Subtype ) { <nl> conversionsOrFixes . push_back ( ConversionRestrictionKind : : Existential ) ; <nl> } <nl> <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> { <nl> BoundGenericType * boundGenericType2 ; <nl> <nl> - if ( concrete & & kind > = TypeMatchKind : : Subtype & & <nl> + if ( concrete & & kind > = ConstraintKind : : Subtype & & <nl> ( boundGenericType2 = type2 - > getAs < BoundGenericType > ( ) ) ) { <nl> auto decl2 = boundGenericType2 - > getDecl ( ) ; <nl> if ( auto optionalKind2 = decl2 - > classifyAsOptionalType ( ) ) { <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> conversionsOrFixes . push_back ( <nl> ConversionRestrictionKind : : ImplicitlyUnwrappedOptionalToOptional ) ; <nl> } else if ( optionalKind2 = = OTK_ImplicitlyUnwrappedOptional & & <nl> - kind > = TypeMatchKind : : Conversion & & <nl> + kind > = ConstraintKind : : Conversion & & <nl> decl1 = = TC . Context . getOptionalDecl ( ) ) { <nl> assert ( boundGenericType1 - > getGenericArgs ( ) . size ( ) = = 1 ) ; <nl> conversionsOrFixes . push_back ( <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / is convertible to U . <nl> { <nl> Type objectType1 ; <nl> - if ( concrete & & kind > = TypeMatchKind : : Conversion & & <nl> + if ( concrete & & kind > = ConstraintKind : : Conversion & & <nl> ( objectType1 = lookThroughImplicitlyUnwrappedOptionalType ( type1 ) ) ) { <nl> conversionsOrFixes . push_back ( <nl> ConversionRestrictionKind : : ForceUnchecked ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / Allow ' ( ) - > T ' to ' ( ) - > ( ) ' and ' ( ) - > Never ' to ' ( ) - > T ' for closure <nl> / / literals . <nl> { <nl> - if ( concrete & & kind > = TypeMatchKind : : Subtype & & <nl> + if ( concrete & & kind > = ConstraintKind : : Subtype & & <nl> ( type1 - > isUninhabited ( ) | | type2 - > isVoid ( ) ) ) { <nl> SmallVector < LocatorPathElt , 2 > parts ; <nl> locator . getLocatorParts ( parts ) ; <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> } <nl> } <nl> <nl> - if ( concrete & & kind = = TypeMatchKind : : BindParamType ) { <nl> + if ( concrete & & kind = = ConstraintKind : : BindParam ) { <nl> if ( auto * iot = dyn_cast < InOutType > ( desugar1 ) ) { <nl> if ( auto * lvt = dyn_cast < LValueType > ( desugar2 ) ) { <nl> return matchTypes ( iot - > getObjectType ( ) , lvt - > getObjectType ( ) , <nl> - TypeMatchKind : : BindType , subflags , <nl> + ConstraintKind : : Bind , subflags , <nl> locator . withPathElement ( <nl> ConstraintLocator : : ArrayElementType ) ) ; <nl> } <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> / / If we should attempt fixes , add those to the list . They ' ll only be visited <nl> / / if there are no other possible solutions . <nl> if ( shouldAttemptFixes ( ) & & ! typeVar1 & & ! typeVar2 & & <nl> - ! flags . contains ( TMF_ApplyingFix ) & & kind > = TypeMatchKind : : Conversion ) { <nl> + ! flags . contains ( TMF_ApplyingFix ) & & kind > = ConstraintKind : : Conversion ) { <nl> Type objectType1 = type1 - > getRValueObjectType ( ) ; <nl> <nl> / / If we have an optional type , try to force - unwrap it . <nl> ConstraintSystem : : matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> auto fixedLocator = getConstraintLocator ( locator ) ; <nl> SmallVector < Constraint * , 2 > constraints ; <nl> for ( auto potential : conversionsOrFixes ) { <nl> - auto constraintKind = getConstraintKind ( kind ) ; <nl> + auto constraintKind = kind ; <nl> <nl> if ( auto restriction = potential . getRestriction ( ) ) { <nl> / / Determine the constraint kind . For a deep equality constraint , only <nl> ConstraintSystem : : simplifyConstructionConstraint ( <nl> case TypeKind : : Tuple : { <nl> / / Tuple construction is simply tuple conversion . <nl> if ( matchTypes ( resultType , desugarValueType , <nl> - TypeMatchKind : : BindType , <nl> + ConstraintKind : : Bind , <nl> flags , <nl> ConstraintLocatorBuilder ( locator ) <nl> . withPathElement ( ConstraintLocator : : ApplyFunction ) ) <nl> = = SolutionKind : : Error ) <nl> return SolutionKind : : Error ; <nl> <nl> - return matchTypes ( argType , valueType , TypeMatchKind : : Conversion , <nl> + return matchTypes ( argType , valueType , ConstraintKind : : Conversion , <nl> getDefaultDecompositionOptions ( flags ) , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyCheckedCastConstraint ( <nl> toBaseType ) ) { <nl> / / The class we ' re bridging through must be a subtype of the type we ' re <nl> / / coming from . <nl> - return matchTypes ( classType , fromBaseType , TypeMatchKind : : Subtype , <nl> + return matchTypes ( classType , fromBaseType , ConstraintKind : : Subtype , <nl> subflags , locator ) ; <nl> } <nl> <nl> - return matchTypes ( toBaseType , fromBaseType , TypeMatchKind : : Subtype , <nl> + return matchTypes ( toBaseType , fromBaseType , ConstraintKind : : Subtype , <nl> subflags , locator ) ; <nl> } <nl> case CheckedCastKind : : DictionaryDowncast : { <nl> ConstraintSystem : : simplifyCheckedCastConstraint ( <nl> } <nl> <nl> / / Perform subtype check on the possibly - bridged - through key type . <nl> - auto result = matchTypes ( toKeyType , fromKeyType , TypeMatchKind : : Subtype , <nl> + auto result = matchTypes ( toKeyType , fromKeyType , ConstraintKind : : Subtype , <nl> subflags , locator ) ; <nl> if ( result = = SolutionKind : : Error ) <nl> return result ; <nl> ConstraintSystem : : simplifyCheckedCastConstraint ( <nl> } <nl> <nl> / / Perform subtype check on the possibly - bridged - through value type . <nl> - switch ( matchTypes ( toValueType , fromValueType , TypeMatchKind : : Subtype , <nl> + switch ( matchTypes ( toValueType , fromValueType , ConstraintKind : : Subtype , <nl> subflags , locator ) ) { <nl> case SolutionKind : : Solved : <nl> return result ; <nl> ConstraintSystem : : simplifyDynamicTypeOfConstraint ( <nl> } else { <nl> dynamicType2 = MetatypeType : : get ( type2 ) ; <nl> } <nl> - return matchTypes ( type1 , dynamicType2 , TypeMatchKind : : BindType , subflags , <nl> + return matchTypes ( type1 , dynamicType2 , ConstraintKind : : Bind , subflags , <nl> locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyDynamicTypeOfConstraint ( <nl> / / the constraint . <nl> if ( auto metatype1 = type1 - > getAs < ExistentialMetatypeType > ( ) ) <nl> return matchTypes ( metatype1 - > getInstanceType ( ) , type2 , <nl> - TypeMatchKind : : BindType , <nl> + ConstraintKind : : Bind , <nl> subflags , locator ) ; <nl> <nl> / / If we have a normal metatype , we can ' t solve backwards unless we <nl> ConstraintSystem : : simplifyDynamicTypeOfConstraint ( <nl> if ( instanceType1 - > isTypeVariableOrMember ( ) ) <nl> return formUnsolved ( ) ; <nl> <nl> - return matchTypes ( instanceType1 , type2 , TypeMatchKind : : BindType , subflags , <nl> + return matchTypes ( instanceType1 , type2 , ConstraintKind : : Bind , subflags , <nl> locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyApplicableFnConstraint ( <nl> / / If this application is part of an operator , then we allow an implicit <nl> / / lvalue to be compatible with inout arguments . This is used by <nl> / / assignment operators . <nl> - TypeMatchKind ArgConv = TypeMatchKind : : ArgumentTupleConversion ; <nl> + ConstraintKind ArgConv = ConstraintKind : : ArgumentTupleConversion ; <nl> if ( isa < PrefixUnaryExpr > ( anchor ) | | isa < PostfixUnaryExpr > ( anchor ) | | <nl> isa < BinaryExpr > ( anchor ) ) <nl> - ArgConv = TypeMatchKind : : OperatorArgumentTupleConversion ; <nl> + ArgConv = ConstraintKind : : OperatorArgumentTupleConversion ; <nl> <nl> / / The argument type must be convertible to the input type . <nl> if ( matchTypes ( func1 - > getInput ( ) , func2 - > getInput ( ) , <nl> ConstraintSystem : : simplifyApplicableFnConstraint ( <nl> <nl> / / The result types are equivalent . <nl> if ( matchTypes ( func1 - > getResult ( ) , func2 - > getResult ( ) , <nl> - TypeMatchKind : : BindType , <nl> + ConstraintKind : : Bind , <nl> subflags , <nl> locator . withPathElement ( ConstraintLocator : : FunctionResult ) ) <nl> = = SolutionKind : : Error ) <nl> ConstraintSystem : : simplifyApplicableFnConstraint ( <nl> return SolutionKind : : Error ; <nl> } <nl> <nl> - / / / \ brief Retrieve the type - matching kind corresponding to the given <nl> - / / / constraint kind . <nl> - static TypeMatchKind getTypeMatchKind ( ConstraintKind kind ) { <nl> - switch ( kind ) { <nl> - case ConstraintKind : : Bind : return TypeMatchKind : : BindType ; <nl> - case ConstraintKind : : Equal : return TypeMatchKind : : SameType ; <nl> - case ConstraintKind : : BindParam : return TypeMatchKind : : BindParamType ; <nl> - case ConstraintKind : : Subtype : return TypeMatchKind : : Subtype ; <nl> - case ConstraintKind : : Conversion : return TypeMatchKind : : Conversion ; <nl> - case ConstraintKind : : ExplicitConversion : <nl> - return TypeMatchKind : : ExplicitConversion ; <nl> - case ConstraintKind : : ArgumentConversion : <nl> - return TypeMatchKind : : ArgumentConversion ; <nl> - case ConstraintKind : : ArgumentTupleConversion : <nl> - return TypeMatchKind : : ArgumentTupleConversion ; <nl> - case ConstraintKind : : OperatorArgumentTupleConversion : <nl> - return TypeMatchKind : : OperatorArgumentTupleConversion ; <nl> - case ConstraintKind : : OperatorArgumentConversion : <nl> - return TypeMatchKind : : OperatorArgumentConversion ; <nl> - <nl> - case ConstraintKind : : ApplicableFunction : <nl> - llvm_unreachable ( " ApplicableFunction constraints don ' t involve " <nl> - " type matches " ) ; <nl> - <nl> - case ConstraintKind : : DynamicTypeOf : <nl> - llvm_unreachable ( " DynamicTypeOf constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : BindOverload : <nl> - llvm_unreachable ( " Overload binding constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : ConformsTo : <nl> - case ConstraintKind : : LiteralConformsTo : <nl> - case ConstraintKind : : SelfObjectOfProtocol : <nl> - llvm_unreachable ( " Conformance constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : CheckedCast : <nl> - llvm_unreachable ( " Checked cast constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : ValueMember : <nl> - case ConstraintKind : : UnresolvedValueMember : <nl> - case ConstraintKind : : TypeMember : <nl> - llvm_unreachable ( " Member constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : OptionalObject : <nl> - llvm_unreachable ( " optional object constraints don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : Defaultable : <nl> - llvm_unreachable ( " Type properties don ' t involve type matches " ) ; <nl> - <nl> - case ConstraintKind : : Disjunction : <nl> - llvm_unreachable ( " Con / disjunction constraints don ' t involve type matches " ) ; <nl> - } <nl> - } <nl> - <nl> Type ConstraintSystem : : getBaseTypeForArrayType ( TypeBase * type ) { <nl> type = type - > lookThroughAllAnyOptionalTypes ( ) . getPointer ( ) ; <nl> <nl> void ConstraintSystem : : addRestrictedConstraint ( <nl> ConversionRestrictionKind restriction , <nl> Type first , Type second , <nl> ConstraintLocatorBuilder locator ) { <nl> - ( void ) simplifyRestrictedConstraint ( restriction , first , second , <nl> - getTypeMatchKind ( kind ) , <nl> + ( void ) simplifyRestrictedConstraint ( restriction , first , second , kind , <nl> TMF_GenerateConstraints , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> ConversionRestrictionKind restriction , <nl> Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> / / Add to the score based on context . <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> <nl> / / We ' ll apply user conversions for operator arguments at the application <nl> / / site . <nl> - if ( matchKind = = TypeMatchKind : : OperatorArgumentConversion ) { <nl> + if ( matchKind = = ConstraintKind : : OperatorArgumentConversion ) { <nl> flags | = TMF_ApplyingOperatorParameter ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> addContextualScore ( ) ; <nl> increaseScore ( SK_ValueToOptional ) ; <nl> <nl> - assert ( matchKind > = TypeMatchKind : : Subtype ) ; <nl> + assert ( matchKind > = ConstraintKind : : Subtype ) ; <nl> auto generic2 = type2 - > castTo < BoundGenericType > ( ) ; <nl> assert ( generic2 - > getDecl ( ) - > classifyAsOptionalType ( ) ) ; <nl> return matchTypes ( type1 , generic2 - > getGenericArgs ( ) [ 0 ] , <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> case ConversionRestrictionKind : : ImplicitlyUnwrappedOptionalToOptional : <nl> case ConversionRestrictionKind : : OptionalToOptional : { <nl> addContextualScore ( ) ; <nl> - assert ( matchKind > = TypeMatchKind : : Subtype ) ; <nl> + assert ( matchKind > = ConstraintKind : : Subtype ) ; <nl> auto generic1 = type1 - > castTo < BoundGenericType > ( ) ; <nl> auto generic2 = type2 - > castTo < BoundGenericType > ( ) ; <nl> assert ( generic1 - > getDecl ( ) - > classifyAsOptionalType ( ) ) ; <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> / / conversions on their results . <nl> case ConversionRestrictionKind : : ForceUnchecked : { <nl> addContextualScore ( ) ; <nl> - assert ( matchKind > = TypeMatchKind : : Conversion ) ; <nl> + assert ( matchKind > = ConstraintKind : : Conversion ) ; <nl> auto boundGenericType1 = type1 - > castTo < BoundGenericType > ( ) ; <nl> assert ( boundGenericType1 - > getDecl ( ) - > classifyAsOptionalType ( ) <nl> = = OTK_ImplicitlyUnwrappedOptional ) ; <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> auto baseType2 = getBaseTypeForPointer ( * this , t2 ) ; <nl> <nl> return matchTypes ( baseType1 , baseType2 , <nl> - TypeMatchKind : : BindToPointerType , <nl> + ConstraintKind : : BindToPointerType , <nl> subflags , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> / / Set up the disjunction for the array or scalar cases . <nl> <nl> return matchTypes ( baseType1 , baseType2 , <nl> - TypeMatchKind : : BindToPointerType , <nl> + ConstraintKind : : BindToPointerType , <nl> subflags , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> Type baseType2 = getBaseTypeForPointer ( * this , t2 ) ; <nl> <nl> return matchTypes ( baseType1 , baseType2 , <nl> - TypeMatchKind : : BindToPointerType , <nl> + ConstraintKind : : BindToPointerType , <nl> subflags , locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> addConstraint ( ConstraintKind : : ConformsTo , tv , <nl> hashableProtocol - > getDeclaredType ( ) , constraintLocator ) ; <nl> <nl> - return matchTypes ( type1 , tv , TypeMatchKind : : Conversion , subflags , <nl> + return matchTypes ( type1 , tv , ConstraintKind : : Conversion , subflags , <nl> locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> return SolutionKind : : Error ; <nl> } <nl> <nl> - return matchTypes ( objcClass , type2 , TypeMatchKind : : Subtype , subflags , <nl> + return matchTypes ( objcClass , type2 , ConstraintKind : : Subtype , subflags , <nl> locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> } <nl> <nl> / / Make sure we have the bridged value type . <nl> - if ( matchTypes ( type2 , bridgedValueType , TypeMatchKind : : SameType , subflags , <nl> + if ( matchTypes ( type2 , bridgedValueType , ConstraintKind : : Equal , subflags , <nl> locator ) = = ConstraintSystem : : SolutionKind : : Error ) <nl> return ConstraintSystem : : SolutionKind : : Error ; <nl> <nl> - return matchTypes ( type1 , objcClass , TypeMatchKind : : Subtype , subflags , <nl> + return matchTypes ( type1 , objcClass , ConstraintKind : : Subtype , subflags , <nl> locator ) ; <nl> } <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> = nativeClass - > getAttrs ( ) . getAttribute < ObjCBridgedAttr > ( ) - > getObjCClass ( ) ; <nl> <nl> return matchTypes ( bridgedObjCClass - > getDeclaredInterfaceType ( ) , <nl> - type2 , TypeMatchKind : : Subtype , subflags , locator ) ; <nl> + type2 , ConstraintKind : : Subtype , subflags , locator ) ; <nl> } <nl> <nl> / / T < U ' and U a toll - free - bridged to U ' = = = > T < c U <nl> ConstraintSystem : : simplifyRestrictedConstraintImpl ( <nl> <nl> return matchTypes ( type1 , <nl> bridgedObjCClass - > getDeclaredInterfaceType ( ) , <nl> - TypeMatchKind : : Subtype , subflags , locator ) ; <nl> + ConstraintKind : : Subtype , subflags , locator ) ; <nl> } <nl> } <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : simplifyRestrictedConstraint ( <nl> ConversionRestrictionKind restriction , <nl> Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> switch ( simplifyRestrictedConstraintImpl ( restriction , type1 , type2 , <nl> bool ConstraintSystem : : recordFix ( Fix fix , ConstraintLocatorBuilder locator ) { <nl> <nl> ConstraintSystem : : SolutionKind <nl> ConstraintSystem : : simplifyFixConstraint ( Fix fix , Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) { <nl> if ( recordFix ( fix , locator ) ) <nl> ConstraintSystem : : addConstraintImpl ( ConstraintKind kind , Type first , <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> ConstraintSystem : : addConstraintImpl ( ConstraintKind kind , Type first , <nl> case ConstraintKind : : ArgumentTupleConversion : <nl> case ConstraintKind : : OperatorArgumentTupleConversion : <nl> case ConstraintKind : : OperatorArgumentConversion : <nl> - return matchTypes ( first , second , getTypeMatchKind ( kind ) , subflags , <nl> - locator ) ; <nl> + return matchTypes ( first , second , kind , subflags , locator ) ; <nl> <nl> case ConstraintKind : : ApplicableFunction : <nl> return simplifyApplicableFnConstraint ( first , second , subflags , locator ) ; <nl> ConstraintSystem : : simplifyConstraint ( const Constraint & constraint ) { <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> ConstraintSystem : : simplifyConstraint ( const Constraint & constraint ) { <nl> case ConstraintKind : : OperatorArgumentTupleConversion : <nl> case ConstraintKind : : OperatorArgumentConversion : { <nl> / / Relational constraints . <nl> - auto matchKind = getTypeMatchKind ( constraint . getKind ( ) ) ; <nl> + auto matchKind = constraint . getKind ( ) ; <nl> <nl> / / If there is a fix associated with this constraint , apply it . <nl> if ( auto fix = constraint . getFix ( ) ) { <nl> mmm a / lib / Sema / CSSolver . cpp <nl> ppp b / lib / Sema / CSSolver . cpp <nl> static bool shouldBindToValueType ( Constraint * constraint ) <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : ConformsTo : <nl> case ConstraintKind : : LiteralConformsTo : <nl> case ConstraintKind : : CheckedCast : <nl> static PotentialBindings getPotentialBindings ( ConstraintSystem & cs , <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> mmm a / lib / Sema / Constraint . cpp <nl> ppp b / lib / Sema / Constraint . cpp <nl> Constraint : : Constraint ( ConstraintKind Kind , Type First , Type Second , <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> Constraint * Constraint : : clone ( ConstraintSystem & cs ) const { <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> void Constraint : : print ( llvm : : raw_ostream & Out , SourceManager * sm ) const { <nl> case ConstraintKind : : Bind : Out < < " bind " ; break ; <nl> case ConstraintKind : : Equal : Out < < " equal " ; break ; <nl> case ConstraintKind : : BindParam : Out < < " bind param " ; break ; <nl> + case ConstraintKind : : BindToPointerType : Out < < " bind to pointer " ; break ; <nl> case ConstraintKind : : Subtype : Out < < " subtype " ; break ; <nl> case ConstraintKind : : Conversion : Out < < " conv " ; break ; <nl> case ConstraintKind : : ExplicitConversion : Out < < " expl conv " ; break ; <nl> gatherReferencedTypeVars ( Constraint * constraint , <nl> case ConstraintKind : : ApplicableFunction : <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : ArgumentConversion : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> mmm a / lib / Sema / Constraint . h <nl> ppp b / lib / Sema / Constraint . h <nl> enum class ConstraintKind : char { <nl> / / / type is an lvalue type with the same object type . Otherwise , the two <nl> / / / types must be the same type . <nl> BindParam , <nl> + / / / \ brief Binds the first type to the element type of the second type . <nl> + BindToPointerType , <nl> / / / \ brief The first type is a subtype of the second type , i . e . , a value <nl> / / / of the type of the first type can be used wherever a value of the <nl> / / / second type is expected . <nl> class Constraint final : public llvm : : ilist_node < Constraint > , <nl> case ConstraintKind : : Bind : <nl> case ConstraintKind : : Equal : <nl> case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> case ConstraintKind : : Subtype : <nl> case ConstraintKind : : Conversion : <nl> case ConstraintKind : : ExplicitConversion : <nl> mmm a / lib / Sema / ConstraintGraph . cpp <nl> ppp b / lib / Sema / ConstraintGraph . cpp <nl> unsigned ConstraintGraph : : computeConnectedComponents ( <nl> / / / edge in the graph . <nl> static bool shouldContractEdge ( ConstraintKind kind ) { <nl> switch ( kind ) { <nl> - case ConstraintKind : : Bind : <nl> - case ConstraintKind : : BindParam : <nl> - case ConstraintKind : : Equal : <nl> - case ConstraintKind : : BindOverload : <nl> - <nl> - / / We currently only allow subtype contractions for the purpose of <nl> - / / parameter binding constraints . <nl> - / / TODO : We do this because of how inout parameter bindings are handled <nl> - / / for implicit closure parameters . We should consider adjusting our <nl> - / / current approach to unlock more opportunities for subtype contractions . <nl> - case ConstraintKind : : Subtype : <nl> - return true ; <nl> - <nl> - default : <nl> - return false ; <nl> + case ConstraintKind : : Bind : <nl> + case ConstraintKind : : BindParam : <nl> + case ConstraintKind : : BindToPointerType : <nl> + case ConstraintKind : : Equal : <nl> + case ConstraintKind : : BindOverload : <nl> + <nl> + / / We currently only allow subtype contractions for the purpose of <nl> + / / parameter binding constraints . <nl> + / / TODO : We do this because of how inout parameter bindings are handled <nl> + / / for implicit closure parameters . We should consider adjusting our <nl> + / / current approach to unlock more opportunities for subtype contractions . <nl> + case ConstraintKind : : Subtype : <nl> + return true ; <nl> + <nl> + default : <nl> + return false ; <nl> } <nl> } <nl> <nl> mmm a / lib / Sema / ConstraintSystem . h <nl> ppp b / lib / Sema / ConstraintSystem . h <nl> namespace constraints { <nl> <nl> struct ResolvedOverloadSetListItem ; <nl> <nl> - / / / \ brief The kind of type matching to perform in matchTypes ( ) . <nl> - enum class TypeMatchKind : char { <nl> - / / / \ brief Bind the types together directly . <nl> - BindType , <nl> - / / / \ brief Binds to a pointer element type . <nl> - BindToPointerType , <nl> - / / / \ brief Bind the type of a function parameter to the type of a reference <nl> - / / / to it from within the function body . The param type is an inout type iff <nl> - / / / the reference type is an lvalue type with the same object type . <nl> - / / / Otherwise , the two types must be the same type . <nl> - BindParamType , <nl> - / / / \ brief Require the types to match exactly , but strips lvalueness from <nl> - / / / a type when binding to a type variable . <nl> - SameType , <nl> - / / / \ brief Require the first type to be a subtype of the second type <nl> - / / / ( or be an exact match or trivial subtype ) . <nl> - Subtype , <nl> - / / / \ brief Requires the first type to be convertible to the second type , <nl> - / / / which includes exact matches and both forms of subtyping . <nl> - Conversion , <nl> - / / / \ brief Requires the first type to be explicitly convertible to the second <nl> - / / / type , which includes all forms of conversion included in Conversion , in <nl> - / / / addition to bridging conversions . <nl> - ExplicitConversion , <nl> - / / / \ brief Requires the first type to be the element of an argument tuple <nl> - / / / that is convertible to the second type , which represents the corresponding <nl> - / / / element of the parameter tuple . <nl> - ArgumentConversion , <nl> - / / / Requires the first type to be an argument type ( tuple ) that can be <nl> - / / / converted to the second type , which represents the parameter type ( tuple ) . <nl> - ArgumentTupleConversion , <nl> - / / / \ brief Requires the first type to be convertible to the second type , <nl> - / / / which includes exact matches , both forms of subtyping , and inserting <nl> - / / / address - of to convert implicit lvalues to inout arguments . This is <nl> - / / / used by assignment operators . <nl> - OperatorArgumentConversion , <nl> - / / / Like \ c ArgumentTupleConversion , but for operators . <nl> - OperatorArgumentTupleConversion , <nl> - } ; <nl> - <nl> / / / \ brief The result of comparing two constraint systems that are a solutions <nl> / / / to the given set of constraints . <nl> enum class SolutionCompareResult { <nl> class ConstraintSystem { <nl> / / / <nl> / / / \ returns the result of performing the tuple - to - tuple conversion . <nl> SolutionKind matchTupleTypes ( TupleType * tuple1 , TupleType * tuple2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> / / / \ brief Subroutine of \ c matchTypes ( ) , which matches a scalar type to <nl> class ConstraintSystem { <nl> / / / <nl> / / / \ returns the result of performing the scalar - to - tuple conversion . <nl> SolutionKind matchScalarToTupleTypes ( Type type1 , TupleType * tuple2 , <nl> - TypeMatchKind kind , <nl> + ConstraintKind kind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> class ConstraintSystem { <nl> / / / <nl> / / / \ returns the result of performing the tuple - to - scalar conversion . <nl> SolutionKind matchTupleToScalarTypes ( TupleType * tuple1 , Type type2 , <nl> - TypeMatchKind kind , <nl> + ConstraintKind kind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> / / / \ brief Subroutine of \ c matchTypes ( ) , which matches up two function <nl> / / / types . <nl> SolutionKind matchFunctionTypes ( FunctionType * func1 , FunctionType * func2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> / / / \ brief Subroutine of \ c matchTypes ( ) , which matches up a value to a <nl> / / / superclass . <nl> SolutionKind matchSuperclassTypes ( Type type1 , Type type2 , <nl> - TypeMatchKind kind , TypeMatchOptions flags , <nl> + ConstraintKind kind , TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> / / / \ brief Subroutine of \ c matchTypes ( ) , which matches up two types that <nl> class ConstraintSystem { <nl> / / / the specific types being matched . <nl> / / / <nl> / / / \ returns the result of attempting to solve this constraint . <nl> - SolutionKind matchTypes ( Type type1 , Type type2 , TypeMatchKind kind , <nl> + SolutionKind matchTypes ( Type type1 , Type type2 , ConstraintKind kind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> class ConstraintSystem { <nl> SolutionKind simplifyRestrictedConstraintImpl ( <nl> ConversionRestrictionKind restriction , <nl> Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> class ConstraintSystem { <nl> SolutionKind simplifyRestrictedConstraint ( <nl> ConversionRestrictionKind restriction , <nl> Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl> class ConstraintSystem { <nl> / / / \ brief Simplify a conversion constraint with a fix applied to it . <nl> SolutionKind simplifyFixConstraint ( Fix fix , <nl> Type type1 , Type type2 , <nl> - TypeMatchKind matchKind , <nl> + ConstraintKind matchKind , <nl> TypeMatchOptions flags , <nl> ConstraintLocatorBuilder locator ) ; <nl> <nl>
Merge pull request from DougGregor / remove - type - match - kind
apple/swift
db7a047753ea71178b199af9576b5fc52a759f96
2016-10-25T07:01:59Z
mmm a / tensorflow / compiler / mlir / xla / tests / lhlo - legalize - to - linalg . mlir <nl> ppp b / tensorflow / compiler / mlir / xla / tests / lhlo - legalize - to - linalg . mlir <nl> func @ iota ( % out : memref < 7x10xi64 > ) { <nl> <nl> / / mmm - - <nl> <nl> + / / CHECK - DAG : # [ [ OPERAND_MAP : . * ] ] = affine_map < ( d0 , d1 , d2 , d3 , d4 ) - > ( d4 , d0 , d2 ) > <nl> + / / CHECK - DAG : # [ [ RESULT_MAP : . * ] ] = affine_map < ( d0 , d1 , d2 , d3 , d4 ) - > ( d0 , d1 , d2 , d3 , d4 ) > <nl> + / / CHECK - LABEL : func @ dynamic_broadcast <nl> + func @ dynamic_broadcast ( % operand : memref < ? x ? x ? xf32 > , <nl> + % result : memref < ? x ? x ? x ? x ? xf32 > ) { <nl> + " xla_lhlo . broadcast_in_dim " ( % operand , % result ) <nl> + { broadcast_dimensions = dense < [ 4 , 0 , 2 ] > : tensor < 3xi64 > } <nl> + : ( memref < ? x ? x ? xf32 > , memref < ? x ? x ? x ? x ? xf32 > ) - > ( ) <nl> + return <nl> + } <nl> + / / CHECK : linalg . generic { { { . * } } indexing_maps = [ # [ [ OPERAND_MAP ] ] , # [ [ RESULT_MAP ] ] ] <nl> + / / CHECK - NEXT : ^ bb0 ( % [ [ OPERAND : . * ] ] : f32 , % [ [ RESULT : . * ] ] : f32 ) : <nl> + / / CHECK - NEXT : linalg . yield % [ [ OPERAND ] ] : f32 <nl> + <nl> + / / mmm - - <nl> + <nl> / / CHECK - DAG : # [ [ OPERAND_MAP : . * ] ] = affine_map < ( d0 , d1 , d2 , d3 , d4 ) - > ( d4 , d0 , 0 ) > <nl> / / CHECK - DAG : # [ [ RESULT_MAP : . * ] ] = affine_map < ( d0 , d1 , d2 , d3 , d4 ) - > ( d0 , d1 , d2 , d3 , d4 ) > <nl> / / CHECK - LABEL : func @ broadcast <nl> mmm a / tensorflow / compiler / mlir / xla / transforms / xla_legalize_to_linalg . cc <nl> ppp b / tensorflow / compiler / mlir / xla / transforms / xla_legalize_to_linalg . cc <nl> class BroadcastInDimConverter <nl> <nl> unsigned nloops = resultMemrefType . getRank ( ) ; <nl> <nl> + auto operandShape = operandMemrefType . getShape ( ) ; <nl> SmallVector < AffineExpr , 4 > dimExprs ; <nl> { <nl> dimExprs . reserve ( nloops ) ; <nl> - <nl> - auto operandShape = operandMemrefType . getShape ( ) ; <nl> - int index = 0 ; <nl> - for ( const auto & broadcastSize : <nl> - broadcastOp . broadcast_dimensions ( ) . getValue ( ) . getIntValues ( ) ) { <nl> - int size = broadcastSize . getSExtValue ( ) ; <nl> - dimExprs . push_back ( <nl> - operandShape [ index + + ] = = 1 <nl> + for ( const auto & broadcastDim : llvm : : enumerate ( <nl> + broadcastOp . broadcast_dimensions ( ) . getValue ( ) . getIntValues ( ) ) ) { <nl> + int dim = broadcastDim . value ( ) . getSExtValue ( ) ; <nl> + <nl> + / / TODO ( pifon ) : Add support for args with dynamic shapes for the case <nl> + / / when a dimension of size 1 is broadcasted into dim of size N . <nl> + AffineExpr affineExpr = <nl> + operandShape [ broadcastDim . index ( ) ] = = 1 <nl> ? mlir : : getAffineConstantExpr ( 0 , broadcastOp . getContext ( ) ) <nl> - : mlir : : getAffineDimExpr ( size , broadcastOp . getContext ( ) ) ) ; <nl> + : mlir : : getAffineDimExpr ( dim , broadcastOp . getContext ( ) ) ; <nl> + dimExprs . push_back ( affineExpr ) ; <nl> } <nl> } <nl> <nl>
Add xla_lhlo : : DynamicBroadcastInDimOp - > Linalg lowering .
tensorflow/tensorflow
b5ac5db07c16f7e3a59967591a2aae7669b0ef2d
2020-02-19T06:25:44Z
mmm a / LICENSE <nl> ppp b / LICENSE <nl> copy or use the software . <nl> For Open Source Computer Vision Library <nl> ( 3 - clause BSD License ) <nl> <nl> - Copyright ( C ) 2000 - 2015 , Intel Corporation , all rights reserved . <nl> + Copyright ( C ) 2000 - 2016 , Intel Corporation , all rights reserved . <nl> Copyright ( C ) 2009 - 2011 , Willow Garage Inc . , all rights reserved . <nl> - Copyright ( C ) 2009 - 2015 , NVIDIA Corporation , all rights reserved . <nl> + Copyright ( C ) 2009 - 2016 , NVIDIA Corporation , all rights reserved . <nl> Copyright ( C ) 2010 - 2013 , Advanced Micro Devices , Inc . , all rights reserved . <nl> - Copyright ( C ) 2015 , OpenCV Foundation , all rights reserved . <nl> - Copyright ( C ) 2015 , Itseez Inc . , all rights reserved . <nl> + Copyright ( C ) 2015 - 2016 , OpenCV Foundation , all rights reserved . <nl> + Copyright ( C ) 2015 - 2016 , Itseez Inc . , all rights reserved . <nl> Third party copyrights are property of their respective owners . <nl> <nl> Redistribution and use in source and binary forms , with or without modification , <nl>
Merge pull request from pra85 : patch - 1
opencv/opencv
347ffbb0eb340f2d10da37bbdbd89c5e11042cf9
2016-01-19T10:51:21Z
mmm a / include / swift / AST / DiagnosticsSema . def <nl> ppp b / include / swift / AST / DiagnosticsSema . def <nl> NOTE ( optional_req_near_match_accessibility , none , <nl> / / Protocols and existentials <nl> ERROR ( assoc_type_outside_of_protocol , none , <nl> " cannot use associated type % 0 outside of its protocol " , ( Identifier ) ) <nl> + ERROR ( typealias_to_assoc_type_outside_of_protocol , none , <nl> + " cannot use typealias % 0 of associated type % 1 outside of its protocol " , <nl> + ( Identifier , TypeLoc ) ) <nl> <nl> ERROR ( circular_protocol_def , none , <nl> " circular protocol inheritance % 0 " , ( StringRef ) ) <nl> mmm a / lib / Sema / TypeCheckNameLookup . cpp <nl> ppp b / lib / Sema / TypeCheckNameLookup . cpp <nl> LookupTypeResult TypeChecker : : lookupMemberType ( DeclContext * dc , <nl> } <nl> } <nl> <nl> - / / Ignore typealiases found in protocol members . <nl> - if ( auto alias = dyn_cast < TypeAliasDecl > ( typeDecl ) ) { <nl> - auto aliasParent = alias - > getParent ( ) ; <nl> - if ( aliasParent ! = dc & & isa < ProtocolDecl > ( aliasParent ) ) <nl> - continue ; <nl> - } <nl> - <nl> / / Substitute the base into the member ' s type . <nl> if ( Type memberType = substMemberTypeWithBase ( dc - > getParentModule ( ) , <nl> typeDecl , type , <nl> / * isTypeReference = * / true ) ) { <nl> + <nl> + / / Similar to the associated type case , ignore typealiases containing <nl> + / / associated types when looking into a non - protocol . <nl> + if ( auto alias = dyn_cast < TypeAliasDecl > ( typeDecl ) ) { <nl> + auto parentProtocol = alias - > getDeclContext ( ) - > <nl> + getAsProtocolOrProtocolExtensionContext ( ) ; <nl> + if ( parentProtocol & & memberType - > hasTypeParameter ( ) & & <nl> + ! type - > is < ArchetypeType > ( ) & & ! type - > isExistentialType ( ) ) { <nl> + continue ; <nl> + } <nl> + } <nl> + <nl> / / If we haven ' t seen this type result yet , add it to the result set . <nl> if ( types . insert ( memberType - > getCanonicalType ( ) ) . second ) <nl> result . Results . push_back ( { typeDecl , memberType } ) ; <nl> mmm a / lib / Sema / TypeCheckType . cpp <nl> ppp b / lib / Sema / TypeCheckType . cpp <nl> static Type resolveNestedIdentTypeComponent ( <nl> member = memberTypes . back ( ) . first ; <nl> } <nl> <nl> - if ( parentTy - > isExistentialType ( ) ) { <nl> + if ( parentTy - > isExistentialType ( ) & & isa < AssociatedTypeDecl > ( member ) ) { <nl> if ( diagnoseErrors ) <nl> TC . diagnose ( comp - > getIdLoc ( ) , diag : : assoc_type_outside_of_protocol , <nl> comp - > getIdentifier ( ) ) ; <nl> <nl> return ErrorType : : get ( TC . Context ) ; <nl> } <nl> + if ( auto alias = dyn_cast < TypeAliasDecl > ( member ) ) { <nl> + if ( parentTy - > isExistentialType ( ) & & memberType - > hasTypeParameter ( ) ) { <nl> + if ( diagnoseErrors ) <nl> + TC . diagnose ( comp - > getIdLoc ( ) , diag : : typealias_to_assoc_type_outside_of_protocol , <nl> + comp - > getIdentifier ( ) , alias - > getUnderlyingTypeLoc ( ) ) ; <nl> + <nl> + return ErrorType : : get ( TC . Context ) ; <nl> + } <nl> + } <nl> <nl> / / If there are generic arguments , apply them now . <nl> if ( auto genComp = dyn_cast < GenericIdentTypeRepr > ( comp ) ) <nl> class UnsupportedProtocolVisitor <nl> } <nl> <nl> bool walkToTypeReprPre ( TypeRepr * T ) { <nl> + if ( T - > isInvalid ( ) ) <nl> + return false ; <nl> + if ( auto compound = dyn_cast < CompoundIdentTypeRepr > ( T ) ) { <nl> + / / Only visit the last component to check , because nested typealiases in <nl> + / / existentials are okay . <nl> + visit ( compound - > getComponentRange ( ) . back ( ) ) ; <nl> + return false ; <nl> + } <nl> visit ( T ) ; <nl> return true ; <nl> } <nl> - <nl> + <nl> std : : pair < bool , Stmt * > walkToStmtPre ( Stmt * S ) { <nl> if ( recurseIntoSubstatements ) { <nl> return { true , S } ; <nl> mmm a / test / decl / typealias / typealias . swift <nl> ppp b / test / decl / typealias / typealias . swift <nl> protocol P4 { <nl> func getSelf ( ) - > X <nl> } <nl> <nl> + / / Availability of typealiases in protocols for nested type lookup <nl> + protocol P5 { <nl> + associatedtype A <nl> + typealias T1 = Int <nl> + typealias T2 = A <nl> + var a : T2 { get } <nl> + } <nl> + <nl> + struct T5 : P5 { <nl> + var a : P5 . T1 / / OK <nl> + var v2 : P5 . T2 / / expected - error { { cannot use typealias ' T2 ' of associated type ' A ' outside of its protocol } } <nl> + } <nl> + <nl> <nl>
Merge pull request from gregomni / more - typealias
apple/swift
4f00d3452816717d1109a2582ab5f4062b32060f
2016-06-07T05:28:47Z
mmm a / mars / stn / src / longlink_connect_monitor . cc <nl> ppp b / mars / stn / src / longlink_connect_monitor . cc <nl> static const unsigned long kNoAccountInfoSaltRate = 2 ; <nl> static const unsigned long kNoAccountInfoSaltRise = 300 ; <nl> <nl> static const unsigned long kNoAccountInfoInactiveInterval = ( 7 * 24 * 60 * 60 ) ; / / s <nl> - / / static const unsigned int kUpOrDownThreshold = 60 * 10 * 1000 ; / / 10min <nl> - static const unsigned int kUpOrDownThreshold = 3 * 60 * 1000 ; / / 3min for debug <nl> + static const unsigned int kUpOrDownThreshold = 60 * 10 * 1000 ; / / 10min <nl> <nl> <nl> # ifdef __ANDROID__ <nl> static unsigned long const sg_interval [ ] [ 5 ] = { <nl> { 0 , 0 , 0 , 0 , 0 } , <nl> } ; <nl> <nl> - / / static int const reconnect_interval [ 6 ] = { 0 , 60 , 120 , 240 , 360 , 480 } ; <nl> - static int const reconnect_interval [ 6 ] = { 0 , 20 , 40 , 60 , 80 , 120 } ; <nl> + static int const reconnect_interval [ 6 ] = { 0 , 60 , 120 , 240 , 360 , 480 } ; <nl> <nl> static std : : string alarm_reason ; <nl> static std : : string error_msg ; <nl>
change longlink rebuilding time interval
Tencent/mars
278a11d5a1db9dadc0869a35a539912091be5922
2020-04-17T03:39:27Z
mmm a / docs / ABI . rst <nl> ppp b / docs / ABI . rst <nl> layout is as follows : <nl> * * offset 7 + n * * . This is the number of witness table pointers that are <nl> stored for the type parameter in the generic parameter vector . <nl> <nl> + Note that there is no nominal type descriptor for protocols or protocol types . <nl> + See the ` protocol descriptor ` _ description below . <nl> + <nl> Protocol Descriptor <nl> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <nl> <nl> + ` Protocol metadata ` contains references to zero , one , or more * * protocol <nl> + descriptors * * that describe the protocols values of the type are required to <nl> + conform to . The protocol descriptor is laid out to be compatible with <nl> + Objective - C ` ` Protocol ` ` objects . The layout is as follows : <nl> + <nl> + - An * * isa * * placeholder is stored at * * offset 0 * * . This field is populated by <nl> + the Objective - C runtime . <nl> + - The mangled * * name * * is referenced as a null - terminated C string at <nl> + * * offset 1 * * . <nl> + - For an ObjC - compatible protocol , its * * required instance methods * * are stored <nl> + at * * offset 2 * * as an ObjC - compatible method list . This is null for native <nl> + Swift protocols . <nl> + - For an ObjC - compatible protocol , its * * required class methods * * are stored <nl> + at * * offset 3 * * as an ObjC - compatible method list . This is null for native <nl> + Swift protocols . <nl> + - For an ObjC - compatible protocol , its * * optional instance methods * * are stored <nl> + at * * offset 4 * * as an ObjC - compatible method list . This is null for native <nl> + Swift protocols . <nl> + - For an ObjC - compatible protocol , its * * optional class methods * * are stored <nl> + at * * offset 5 * * as an ObjC - compatible method list . This is null for native <nl> + Swift protocols . <nl> + - For an ObjC - compatible protocol , its * * instance properties * * are stored <nl> + at * * offset 6 * * as an ObjC - compatible property list . This is null for native <nl> + Swift protocols . <nl> + - The * * size * * of the protocol descriptor record is stored as a 32 - bit integer <nl> + at * * offset 7 * * . This is currently 72 on 64 - bit platforms and 40 on 32 - bit <nl> + platforms . <nl> + - * * Flags * * are stored as a 32 - bit integer after the size . The following bits <nl> + are currently used ( counting from least significant bit zero ) : <nl> + <nl> + * * * Bit 0 * * is the * * Swift bit * * . It is set for all protocols defined in <nl> + Swift and unset for protocols defined in Objective - C . <nl> + * * * Bit 1 * * is the * * class constraint bit * * . It is set if the protocol is <nl> + * * not * * class - constrained , meaning that any struct , enum , or class type <nl> + may conform to the protocol . It is unset if only classes can conform to <nl> + the protocol . ( The inverted meaning is for compatibility with Objective - C <nl> + protocol records , in which the bit is never set . Objective - C protocols can <nl> + only be conformed to by classes . ) <nl> + * * * Bit 2 * * is the * * witness table bit * * . It is set if dispatch to the <nl> + protocol ' s methods is done through a witness table , which is either passed <nl> + as an extra parameter to generic functions or included in the ` existential <nl> + container layout ` _ of protocol types . It is unset if dispatch is done <nl> + through ` ` objc_msgSend ` ` and requires no additional information to accompany <nl> + a value of conforming type . <nl> + * * * Bit 31 * * is set by the Objective - C runtime when it has done its <nl> + initialization of the protocol record . It is unused by the Swift runtime . <nl> + <nl> Heap Objects <nl> mmmmmmmmmmmm <nl> <nl>
ABI . rst : Describe protocol descriptors .
apple/swift
1b0e03cb9e1bbe9844bf1bea6662164710ff7460
2013-11-01T21:12:24Z
mmm a / doc / py_tutorials / py_imgproc / py_contours / py_contours_hierarchy / py_contours_hierarchy . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_contours / py_contours_hierarchy / py_contours_hierarchy . markdown <nl> will have their corresponding values . Just check it yourself and verify it . <nl> <nl> Below is the result I got , and each row is hierarchy details of corresponding contour . For eg , first <nl> row corresponds to contour 0 . Next contour is contour 1 . So Next = 1 . There is no previous contour , <nl> - so Previous = 0 . And the remaining two , as told before , it is - 1 . <nl> + so Previous = - 1 . And the remaining two , as told before , it is - 1 . <nl> @ code { . py } <nl> > > > hierarchy <nl> array ( [ [ [ 1 , - 1 , - 1 , - 1 ] , <nl> Take contour - 0 : It is in hierarchy - 0 . Next contour in same hierarchy is contour <nl> contours . Child is contour - 1 . And no parent . So array is [ 7 , - 1 , 1 , - 1 ] . <nl> <nl> Take contour - 2 : It is in hierarchy - 1 . No contour in same level . No previous one . Child is <nl> - contour - 2 . Parent is contour - 0 . So array is [ - 1 , - 1 , 2 , 0 ] . <nl> + contour - 3 . Parent is contour - 1 . So array is [ - 1 , - 1 , 3 , 1 ] . <nl> <nl> And remaining , try yourself . Below is the full answer : <nl> @ code { . py } <nl>
Merge pull request from sxldvd : master
opencv/opencv
63d3fdcf5835d2be66c31eefe9a2fbdfed68aecf
2017-04-03T09:32:38Z
mmm a / Marlin / src / feature / host_actions . h <nl> ppp b / Marlin / src / feature / host_actions . h <nl> <nl> * / <nl> # pragma once <nl> <nl> - # include " . . / inc / MarlinConfig . h " <nl> + # include " . . / inc / MarlinConfigPre . h " <nl> + <nl> + # include < stdint . h > <nl> <nl> void host_action ( const char * const pstr , const bool eol = true ) ; <nl> <nl>
Fix HOST_PROMPT_SUPPORT compile issue ( )
MarlinFirmware/Marlin
09f1b581460529a807b0a6f6e18d5359b280f2e4
2019-05-05T03:55:51Z
mmm a / test / stdlib / Error . swift <nl> ppp b / test / stdlib / Error . swift <nl> ErrorTests . test ( " try ! " ) <nl> . code { <nl> expectCrashLater ( ) <nl> let _ : ( ) = try ! { throw SillyError . JazzHands } ( ) <nl> - } <nl> + } <nl> + <nl> + ErrorTests . test ( " try ! / location " ) <nl> + . skip ( . custom ( { _isFastAssertConfiguration ( ) } , <nl> + reason : " trap is not guaranteed to happen in - Ounchecked " ) ) <nl> + . crashOutputMatches ( _isDebugAssertConfiguration ( ) <nl> + ? " test / stdlib / Error . swift , line 128 " <nl> + : " " ) <nl> + . code { <nl> + expectCrashLater ( ) <nl> + let _ : ( ) = try ! { throw SillyError . JazzHands } ( ) <nl> + } <nl> <nl> ErrorTests . test ( " try ? " ) { <nl> var value = try ? { ( ) throws - > Int in return 1 } ( ) <nl>
Add a test for try ! location reporting
apple/swift
7c7a97618535f5abcfae70d8e9723c0ed528f238
2018-09-26T18:22:41Z
mmm a / lib / SIL / SILVerifier . cpp <nl> ppp b / lib / SIL / SILVerifier . cpp <nl> class SILVerifier : public SILVerifierBase < SILVerifier > { <nl> <nl> void checkBuiltinInst ( BuiltinInst * BI ) { <nl> / / Check for special constraints on llvm intrinsics . <nl> - if ( BI - > getIntrinsicInfo ( ) . ID ! = llvm : : Intrinsic : : not_intrinsic ) <nl> + if ( BI - > getIntrinsicInfo ( ) . ID ! = llvm : : Intrinsic : : not_intrinsic ) { <nl> verifyLLVMIntrinsic ( BI , BI - > getIntrinsicInfo ( ) . ID ) ; <nl> + return ; <nl> + } <nl> + <nl> + / / At this point , we know that we have a Builtin that is a Swift Builtin <nl> + / / rather than an llvm intrinsic . Make sure our name corresponds to an <nl> + / / actual ValueDecl . Otherwise , we have an invalid builtin . <nl> + require ( getBuiltinValueDecl ( BI - > getModule ( ) . getASTContext ( ) , BI - > getName ( ) ) , <nl> + " Invalid builtin name ? ! " ) ; <nl> } <nl> <nl> void checkFunctionRefBaseInst ( FunctionRefBaseInst * FRI ) { <nl>
[ sil ] Teach the SILVerifier how to validate that a builtin insts are always mapped to a known builtin .
apple/swift
e2a9a432209affcd5b427481795cc859bd5ae19d
2019-09-19T15:51:15Z
mmm a / platform / x11 / os_x11 . cpp <nl> ppp b / platform / x11 / os_x11 . cpp <nl> Error OS_X11 : : initialize ( const VideoMode & p_desired , int p_video_driver , int p_a <nl> / / Set DRI_PRIME if not set . This means that Godot should default to a higher - power GPU if it exists . <nl> / / Note : Due to the final ' 0 ' parameter to setenv any existing DRI_PRIME environment variables will not <nl> / / be overwritten . <nl> - setenv ( " DRI_PRIME " , " 1 " , 0 ) ; <nl> + bool enable_dri_prime = true ; <nl> + / / Check if Nouveau is loaded , we don ' t want to force dGPU usage with that driver . <nl> + if ( FileAccess * f = FileAccess : : open ( " / proc / modules " , FileAccess : : READ ) ) { <nl> + / / Match driver name + space <nl> + String nouveau_str = " nouveau " ; <nl> + <nl> + while ( ! f - > eof_reached ( ) ) { <nl> + String line = f - > get_line ( ) ; <nl> + <nl> + if ( line . begins_with ( nouveau_str ) ) { <nl> + enable_dri_prime = false ; <nl> + break ; <nl> + } <nl> + } <nl> + f - > close ( ) ; <nl> + memdelete ( f ) ; <nl> + } <nl> + if ( enable_dri_prime ) { <nl> + setenv ( " DRI_PRIME " , " 1 " , 0 ) ; <nl> + } <nl> <nl> ContextGL_X11 : : ContextType opengl_api_type = ContextGL_X11 : : GLES_3_0_COMPATIBLE ; <nl> <nl>
Merge pull request from lupoDharkael / nouveau
godotengine/godot
b1e3215f3a316cfaf518747f7dafba4cc0d8d291
2019-01-03T22:35:47Z
mmm a / stdlib / public / core / ObjectIdentifier . swift <nl> ppp b / stdlib / public / core / ObjectIdentifier . swift <nl> public struct ObjectIdentifier { <nl> <nl> / / / Creates an instance that uniquely identifies the given class instance . <nl> / / / <nl> - / / / The following example creates an example class ` A ` and compares instances <nl> - / / / of the class using their object identifiers and the identical - to <nl> + / / / The following example creates an example class ` IntegerRef ` and compares <nl> + / / / instances of the class using their object identifiers and the identical - to <nl> / / / operator ( ` = = = ` ) : <nl> / / / <nl> / / / class IntegerRef { <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
1dbf8d5840d80c0dbf12a3a896d863598817d907
2018-04-21T15:29:36Z
mmm a / src / Storages / MergeTree / KeyCondition . cpp <nl> ppp b / src / Storages / MergeTree / KeyCondition . cpp <nl> bool KeyCondition : : tryPrepareSetIndex ( <nl> return true ; <nl> } <nl> <nl> + class FunctionWithOptionalConstArg : public IFunctionBase <nl> + { <nl> + public : <nl> + enum Kind <nl> + { <nl> + NO_CONST = 0 , <nl> + LEFT_CONST , <nl> + RIGHT_CONST , <nl> + } ; <nl> + <nl> + FunctionWithOptionalConstArg ( const FunctionBasePtr & func_ ) : func ( func_ ) { } <nl> + FunctionWithOptionalConstArg ( const FunctionBasePtr & func_ , const ColumnWithTypeAndName & const_arg_ , Kind kind_ ) <nl> + : func ( func_ ) , const_arg ( const_arg_ ) , kind ( kind_ ) <nl> + { <nl> + } <nl> + <nl> + String getName ( ) const override { return func - > getName ( ) ; } <nl> + <nl> + const DataTypes & getArgumentTypes ( ) const override { return func - > getArgumentTypes ( ) ; } <nl> + <nl> + const DataTypePtr & getResultType ( ) const override { return func - > getResultType ( ) ; } <nl> + <nl> + ExecutableFunctionPtr prepare ( const ColumnsWithTypeAndName & arguments ) const override { return func - > prepare ( arguments ) ; } <nl> + <nl> + ColumnPtr <nl> + execute ( const ColumnsWithTypeAndName & arguments , const DataTypePtr & result_type , size_t input_rows_count , bool dry_run = false ) <nl> + const override <nl> + { <nl> + if ( kind = = Kind : : LEFT_CONST ) <nl> + { <nl> + ColumnsWithTypeAndName new_arguments ; <nl> + new_arguments . reserve ( arguments . size ( ) + 1 ) ; <nl> + new_arguments . push_back ( const_arg ) ; <nl> + for ( const auto & arg : arguments ) <nl> + new_arguments . push_back ( arg ) ; <nl> + return func - > prepare ( new_arguments ) - > execute ( new_arguments , result_type , input_rows_count , dry_run ) ; <nl> + } <nl> + else if ( kind = = Kind : : RIGHT_CONST ) <nl> + { <nl> + auto new_arguments = arguments ; <nl> + new_arguments . push_back ( const_arg ) ; <nl> + return func - > prepare ( new_arguments ) - > execute ( new_arguments , result_type , input_rows_count , dry_run ) ; <nl> + } <nl> + else <nl> + return func - > prepare ( arguments ) - > execute ( arguments , result_type , input_rows_count , dry_run ) ; <nl> + } <nl> + <nl> + bool isDeterministic ( ) const override { return func - > isDeterministic ( ) ; } <nl> + <nl> + bool isDeterministicInScopeOfQuery ( ) const override { return func - > isDeterministicInScopeOfQuery ( ) ; } <nl> + <nl> + bool hasInformationAboutMonotonicity ( ) const override { return func - > hasInformationAboutMonotonicity ( ) ; } <nl> + <nl> + IFunctionBase : : Monotonicity getMonotonicityForRange ( const IDataType & type , const Field & left , const Field & right ) const override <nl> + { <nl> + return func - > getMonotonicityForRange ( type , left , right ) ; <nl> + } <nl> + <nl> + private : <nl> + FunctionBasePtr func ; <nl> + ColumnWithTypeAndName const_arg ; <nl> + Kind kind = Kind : : NO_CONST ; <nl> + } ; <nl> + <nl> <nl> bool KeyCondition : : isKeyPossiblyWrappedByMonotonicFunctions ( <nl> const ASTPtr & node , <nl> bool KeyCondition : : isKeyPossiblyWrappedByMonotonicFunctions ( <nl> const auto & args = ( * it ) - > arguments - > children ; <nl> auto func_builder = FunctionFactory : : instance ( ) . tryGet ( ( * it ) - > name , context ) ; <nl> ColumnsWithTypeAndName arguments ; <nl> + ColumnWithTypeAndName const_arg ; <nl> + FunctionWithOptionalConstArg : : Kind kind = FunctionWithOptionalConstArg : : Kind : : NO_CONST ; <nl> if ( args . size ( ) = = 2 ) <nl> { <nl> if ( const auto * arg_left = args [ 0 ] - > as < ASTLiteral > ( ) ) <nl> { <nl> auto left_arg_type = applyVisitor ( FieldToDataType ( ) , arg_left - > value ) ; <nl> - arguments . push_back ( { left_arg_type - > createColumnConst ( 0 , arg_left - > value ) , left_arg_type , " " } ) ; <nl> + const_arg = { left_arg_type - > createColumnConst ( 0 , arg_left - > value ) , left_arg_type , " " } ; <nl> + arguments . push_back ( const_arg ) ; <nl> arguments . push_back ( { nullptr , key_column_type , " " } ) ; <nl> + kind = FunctionWithOptionalConstArg : : Kind : : LEFT_CONST ; <nl> } <nl> else if ( const auto * arg_right = args [ 1 ] - > as < ASTLiteral > ( ) ) <nl> { <nl> arguments . push_back ( { nullptr , key_column_type , " " } ) ; <nl> auto right_arg_type = applyVisitor ( FieldToDataType ( ) , arg_right - > value ) ; <nl> - arguments . push_back ( { right_arg_type - > createColumnConst ( 0 , arg_right - > value ) , right_arg_type , " " } ) ; <nl> + const_arg = { right_arg_type - > createColumnConst ( 0 , arg_right - > value ) , right_arg_type , " " } ; <nl> + arguments . push_back ( const_arg ) ; <nl> + kind = FunctionWithOptionalConstArg : : Kind : : RIGHT_CONST ; <nl> } <nl> } <nl> else <nl> bool KeyCondition : : isKeyPossiblyWrappedByMonotonicFunctions ( <nl> return false ; <nl> <nl> key_column_type = func - > getResultType ( ) ; <nl> - out_functions_chain . push_back ( func ) ; <nl> + if ( kind = = FunctionWithOptionalConstArg : : Kind : : NO_CONST ) <nl> + out_functions_chain . push_back ( func ) ; <nl> + else <nl> + out_functions_chain . push_back ( std : : make_shared < FunctionWithOptionalConstArg > ( func , const_arg , kind ) ) ; <nl> } <nl> <nl> out_key_res_column_type = key_column_type ; <nl> BoolMask KeyCondition : : checkInRange ( <nl> } ) ; <nl> } <nl> <nl> - <nl> std : : optional < Range > KeyCondition : : applyMonotonicFunctionsChainToRange ( <nl> Range key_range , <nl> const MonotonicFunctionsChain & functions , <nl> new file mode 100644 <nl> index 00000000000 . . 6439de16e24 <nl> mmm / dev / null <nl> ppp b / tests / queries / 0_stateless / 01615_two_args_function_index_fix . reference <nl> @ @ - 0 , 0 + 1 @ @ <nl> + 2020 - 12 - 19 2020 - 12 - 19 22 : 59 : 52 2020 - 12 - 19 22 : 59 : 52 1 <nl> new file mode 100644 <nl> index 00000000000 . . 258a07d25f2 <nl> mmm / dev / null <nl> ppp b / tests / queries / 0_stateless / 01615_two_args_function_index_fix . sql <nl> <nl> + drop table if exists bad_date_time ; <nl> + <nl> + create table bad_date_time ( time Datetime , count UInt16 ) Engine = MergeTree ( ) ORDER BY ( time ) ; <nl> + <nl> + insert into bad_date_time values ( ' 2020 - 12 - 20 20 : 59 : 52 ' , 1 ) , ( ' 2020 - 12 - 20 21 : 59 : 52 ' , 1 ) , ( ' 2020 - 12 - 20 01 : 59 : 52 ' , 1 ) ; <nl> + <nl> + select toDate ( time , ' UTC ' ) dt , min ( toDateTime ( time , ' UTC ' ) ) , max ( toDateTime ( time , ' UTC ' ) ) , sum ( count ) from bad_date_time where toDate ( time , ' UTC ' ) = ' 2020 - 12 - 19 ' group by dt ; <nl> + <nl> + drop table if exists bad_date_time ; <nl>
Fix 2 - arg functions with constant in PK analysis
ClickHouse/ClickHouse
8b5714b2ac63dd0d143eec85265b07759046414b
2020-12-23T04:29:29Z
mmm a / src / runtime / ext / ext_memcache . cpp <nl> ppp b / src / runtime / ext / ext_memcache . cpp <nl> Array static memcache_build_stats ( const memcached_st * ptr , <nl> memcached_stat_st * memc_stat , <nl> memcached_return_t * ret ) { <nl> char * * curr_key ; <nl> - char * * stat_keys = memcached_stat_get_keys ( ptr , memc_stat , ret ) ; <nl> + char * * stat_keys = memcached_stat_get_keys ( const_cast < memcached_st * > ( ptr ) , <nl> + memc_stat , ret ) ; <nl> <nl> if ( * ret ! = MEMCACHED_SUCCESS ) { <nl> if ( stat_keys ) { <nl>
De - const first parameter to memcached_stat_get_keys ( )
facebook/hhvm
94740b8affa7bb6a391341f9c939896b896bff6b
2012-08-07T22:31:41Z
mmm a / modules / planning / tasks / optimizers / path_time_heuristic / gridded_path_time_graph . cc <nl> ppp b / modules / planning / tasks / optimizers / path_time_heuristic / gridded_path_time_graph . cc <nl> void GriddedPathTimeGraph : : CalculateCostAt ( <nl> <nl> const auto & pre_col = cost_table_ [ c - 1 ] ; <nl> <nl> - double curr_speed_limit = speed_limit ; <nl> if ( c = = 2 ) { <nl> for ( uint32_t r_pre = r_low ; r_pre < = r ; + + r_pre ) { <nl> - curr_speed_limit = <nl> - std : : fmin ( curr_speed_limit , speed_limit_by_index_ [ r_pre ] ) ; <nl> const double acc = <nl> ( r * unit_s_ - 2 * r_pre * unit_s_ ) / ( unit_t_ * unit_t_ ) ; <nl> if ( acc < gridded_path_time_graph_config_ . max_deceleration ( ) | | <nl> void GriddedPathTimeGraph : : CalculateCostAt ( <nl> continue ; <nl> } <nl> <nl> + double curr_speed_limit = <nl> + std : : fmin ( speed_limit , speed_limit_by_index_ [ r_pre ] ) ; <nl> const double cost = cost_cr . obstacle_cost ( ) + <nl> pre_col [ r_pre ] . total_cost ( ) + <nl> CalculateEdgeCostForThirdCol ( <nl> void GriddedPathTimeGraph : : CalculateCostAt ( <nl> continue ; <nl> } <nl> <nl> - curr_speed_limit = <nl> - std : : fmin ( curr_speed_limit , speed_limit_by_index_ [ r_pre ] ) ; <nl> const double curr_a = ( cost_cr . index_s ( ) * unit_s_ + <nl> pre_col [ r_pre ] . pre_point ( ) - > index_s ( ) * unit_s_ - <nl> 2 * pre_col [ r_pre ] . index_s ( ) * unit_s_ ) / <nl> void GriddedPathTimeGraph : : CalculateCostAt ( <nl> const STPoint & prepre_point = prepre_graph_point . point ( ) ; <nl> const STPoint & pre_point = pre_col [ r_pre ] . point ( ) ; <nl> const STPoint & curr_point = cost_cr . point ( ) ; <nl> + double curr_speed_limit = <nl> + std : : fmin ( speed_limit , speed_limit_by_index_ [ r_pre ] ) ; <nl> double cost = <nl> cost_cr . obstacle_cost ( ) + pre_col [ r_pre ] . total_cost ( ) + <nl> CalculateEdgeCost ( triple_pre_point , prepre_point , pre_point , curr_point , <nl>
Planning : fix minimal speed limit inquery during edge st cost calculation
ApolloAuto/apollo
c6da43f6457e191fb8fef13d72dd063c44dc37fd
2019-09-05T18:41:16Z
mmm a / lib / Sema / CSDiag . cpp <nl> ppp b / lib / Sema / CSDiag . cpp <nl> diagnoseAmbiguousMultiStatementClosure ( ClosureExpr * closure ) { <nl> / / constraint system through declaration types . <nl> bool hasUnresolvedParams = false ; <nl> resultExpr - > forEachChildExpr ( [ & ] ( Expr * childExpr ) - > Expr * { <nl> - if ( auto DRE = dyn_cast < DeclRefExpr > ( resultExpr ) ) { <nl> + if ( auto DRE = dyn_cast < DeclRefExpr > ( childExpr ) ) { <nl> if ( auto param = dyn_cast < ParamDecl > ( DRE - > getDecl ( ) ) ) { <nl> - auto paramType = param - > getType ( ) ; <nl> + auto paramType = param - > hasType ( ) ? param - > getType ( ) : Type ( ) ; <nl> if ( ! paramType | | paramType - > hasTypeVariable ( ) ) { <nl> hasUnresolvedParams = true ; <nl> return nullptr ; <nl> similarity index 82 % <nl> rename from validation - test / compiler_crashers / 28663 - impl - getgraphindex - typevariables - size - out - of - bounds - index . swift <nl> rename to validation - test / compiler_crashers_fixed / 28663 - impl - getgraphindex - typevariables - size - out - of - bounds - index . swift <nl> mmm a / validation - test / compiler_crashers / 28663 - impl - getgraphindex - typevariables - size - out - of - bounds - index . swift <nl> ppp b / validation - test / compiler_crashers_fixed / 28663 - impl - getgraphindex - typevariables - size - out - of - bounds - index . swift <nl> <nl> / / See https : / / swift . org / LICENSE . txt for license information <nl> / / See https : / / swift . org / CONTRIBUTORS . txt for the list of Swift project authors <nl> <nl> - / / REQUIRES : asserts <nl> - / / RUN : not - - crash % target - swift - frontend % s - emit - ir <nl> + / / RUN : not % target - swift - frontend % s - emit - ir <nl> ( _ = = _ { return ( $ 0 ) u <nl> similarity index 83 % <nl> rename from validation - test / compiler_crashers / 28664 - typevariables - impl - getgraphindex - typevar - type - variable - mismatch . swift <nl> rename to validation - test / compiler_crashers_fixed / 28664 - typevariables - impl - getgraphindex - typevar - type - variable - mismatch . swift <nl> mmm a / validation - test / compiler_crashers / 28664 - typevariables - impl - getgraphindex - typevar - type - variable - mismatch . swift <nl> ppp b / validation - test / compiler_crashers_fixed / 28664 - typevariables - impl - getgraphindex - typevar - type - variable - mismatch . swift <nl> <nl> / / See https : / / swift . org / LICENSE . txt for license information <nl> / / See https : / / swift . org / CONTRIBUTORS . txt for the list of Swift project authors <nl> <nl> - / / REQUIRES : asserts <nl> - / / RUN : not - - crash % target - swift - frontend % s - emit - ir <nl> + / / RUN : not % target - swift - frontend % s - emit - ir <nl> [ . s { return ( $ 0 <nl> protocol r <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
9597b39524a28c41acfae686822449d629b6411a
2017-05-30T10:28:39Z
mmm a / tools / accnn / rank_selection . py <nl> ppp b / tools / accnn / rank_selection . py <nl> <nl> # under the License . <nl> <nl> import numpy as np <nl> - import mxnet as mx <nl> import json <nl> import utils <nl> import math <nl> import sys <nl> <nl> + from mxnet . base import xrange <nl> + <nl> + <nl> def calc_complexity ( ishape , node ) : <nl> y , x = map ( int , eval ( node [ ' param ' ] [ ' kernel ' ] ) ) <nl> N = int ( node [ ' param ' ] [ ' num_filter ' ] ) <nl> mmm a / tools / accnn / utils . py <nl> ppp b / tools / accnn / utils . py <nl> <nl> import json <nl> import ast <nl> <nl> + from mxnet . base import xrange <nl> + <nl> <nl> def load_model ( args ) : <nl> devs = mx . cpu ( ) if args . gpus = = None else [ mx . gpu ( int ( i ) ) for i in args . gpus . split ( ' , ' ) ] <nl> mmm a / tools / caffe_converter / convert_symbol . py <nl> ppp b / tools / caffe_converter / convert_symbol . py <nl> <nl> from __future__ import print_function <nl> import argparse <nl> import re <nl> + import mxnet as mx <nl> import caffe_parser <nl> <nl> + <nl> def _get_input ( proto ) : <nl> " " " Get input size <nl> " " " <nl> mmm a / tools / coreml / test / test_mxnet_image . py <nl> ppp b / tools / coreml / test / test_mxnet_image . py <nl> <nl> import unittest <nl> import sys <nl> import os <nl> + <nl> + from mxnet . base import xrange <nl> + <nl> current_working_directory = os . getcwd ( ) <nl> sys . path . append ( current_working_directory + " / . . " ) <nl> sys . path . append ( current_working_directory + " / . . / converter / " ) <nl> import _mxnet_converter as mxnet_converter <nl> from converter . utils import load_model <nl> <nl> - <nl> VAL_DATA = ' data / val - 5k - 256 . rec ' <nl> URL = ' http : / / data . mxnet . io / data / val - 5k - 256 . rec ' <nl> <nl> def test_vgg16 ( self ) : <nl> <nl> if __name__ = = ' __main__ ' : <nl> suite = unittest . TestLoader ( ) . loadTestsFromTestCase ( ImageNetTest ) <nl> - unittest . TextTestRunner ( verbosity = 2 ) . run ( suite ) <nl> \ No newline at end of file <nl> + unittest . TextTestRunner ( verbosity = 2 ) . run ( suite ) <nl> mmm a / tools / coreml / test / test_mxnet_models . py <nl> ppp b / tools / coreml / test / test_mxnet_models . py <nl> <nl> import numpy as np <nl> import sys <nl> import os <nl> + from collections import namedtuple <nl> + <nl> + from mxnet . base import xrange <nl> + <nl> current_working_directory = os . getcwd ( ) <nl> sys . path . append ( current_working_directory + " / . . " ) <nl> sys . path . append ( current_working_directory + " / . . / converter / " ) <nl> import _mxnet_converter as mxnet_converter <nl> - from collections import namedtuple <nl> <nl> <nl> def _mxnet_remove_batch ( input_data ) : <nl>
Some Python 3 fixes in . / tools ( )
apache/incubator-mxnet
d6110378b4b2a95490c961bd286e17350caa41bb
2018-07-13T08:03:45Z
mmm a / scripts / cmake / vcpkg_build_cmake . cmake <nl> ppp b / scripts / cmake / vcpkg_build_cmake . cmake <nl> function ( vcpkg_build_cmake ) <nl> <nl> if ( _VCPKG_CMAKE_GENERATOR MATCHES " Ninja " ) <nl> set ( BUILD_ARGS " - v " ) # verbose output <nl> + set ( PARALLEL_ARG " - j $ { VCPKG_CONCURRENCY } " ) <nl> set ( NO_PARALLEL_ARG " - j1 " ) <nl> elseif ( _VCPKG_CMAKE_GENERATOR MATCHES " Visual Studio " ) <nl> set ( BUILD_ARGS <nl>
[ vcpkg_build_cmake ] Set PARALLEL_ARG when using Ninja ( )
microsoft/vcpkg
6d6c6642361fe75cf4b4d8881b81dc4a1908fc18
2020-09-26T12:17:05Z
mmm a / Telegram / SourceFiles / api / api_common . h <nl> ppp b / Telegram / SourceFiles / api / api_common . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + class History ; <nl> + <nl> namespace Api { <nl> <nl> struct SendOptions { <nl> mmm a / Telegram / SourceFiles / api / api_sending . cpp <nl> ppp b / Telegram / SourceFiles / api / api_sending . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_document . h " <nl> # include " data / data_photo . h " <nl> # include " data / data_channel . h " / / ChannelData : : addsSignature . <nl> - # include " data / data_user . h " / / App : : peerName ( UserData * ) . <nl> + # include " data / data_user . h " / / UserData : : name <nl> # include " data / data_session . h " <nl> # include " data / data_file_origin . h " <nl> # include " history / history . h " <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " mainwidget . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> <nl> namespace Api { <nl> namespace { <nl> void SendExistingMedia ( <nl> sendFlags | = MTPmessages_SendMedia : : Flag : : f_silent ; <nl> } <nl> auto messageFromId = channelPost ? 0 : session - > userId ( ) ; <nl> - auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( session - > user ( ) ) <nl> - : QString ( ) ; <nl> + auto messagePostAuthor = channelPost ? session - > user ( ) - > name : QString ( ) ; <nl> <nl> auto caption = TextWithEntities { <nl> message . textWithTags . text , <nl> mmm a / Telegram / SourceFiles / apiwrap . cpp <nl> ppp b / Telegram / SourceFiles / apiwrap . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / storage_shared_media . h " <nl> # include " storage / storage_user_photos . h " <nl> # include " storage / storage_media_prepare . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> / / # include " storage / storage_feed_messages . h " / / # feed <nl> <nl> namespace { <nl> void ApiWrap : : forwardMessages ( <nl> ? UserId ( 0 ) <nl> : peerToUser ( self - > id ) ; <nl> const auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( self ) <nl> + ? self - > name <nl> : QString ( ) ; <nl> history - > addNewLocalMessage ( <nl> newId . msg , <nl> void ApiWrap : : sendSharedContact ( <nl> } <nl> const auto messageFromId = channelPost ? 0 : _session - > userId ( ) ; <nl> const auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( _session - > user ( ) ) <nl> + ? _session - > user ( ) - > name <nl> : QString ( ) ; <nl> const auto vcard = QString ( ) ; <nl> const auto views = 1 ; <nl> void ApiWrap : : sendMessage ( MessageToSend & & message ) { <nl> } <nl> auto messageFromId = channelPost ? 0 : _session - > userId ( ) ; <nl> auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( _session - > user ( ) ) <nl> + ? _session - > user ( ) - > name <nl> : QString ( ) ; <nl> if ( action . options . scheduled ) { <nl> flags | = MTPDmessage : : Flag : : f_from_scheduled ; <nl> void ApiWrap : : sendInlineResult ( <nl> <nl> const auto messageFromId = channelPost ? 0 : _session - > userId ( ) ; <nl> const auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( _session - > user ( ) ) <nl> + ? _session - > user ( ) - > name <nl> : QString ( ) ; <nl> <nl> _session - > data ( ) . registerMessageRandomId ( randomId , newId ) ; <nl> mmm a / Telegram / SourceFiles / app . cpp <nl> ppp b / Telegram / SourceFiles / app . cpp <nl> namespace App { <nl> return result ; <nl> } <nl> <nl> - MainWindow * wnd ( ) { <nl> - return ( Core : : IsAppLaunched ( ) & & Core : : App ( ) . activeWindow ( ) ) <nl> - ? Core : : App ( ) . activeWindow ( ) - > widget ( ) . get ( ) <nl> - : nullptr ; <nl> - } <nl> - <nl> - MainWidget * main ( ) { <nl> - if ( auto window = wnd ( ) ) { <nl> - return window - > mainWidget ( ) ; <nl> - } <nl> - return nullptr ; <nl> - } <nl> - <nl> - QString peerName ( const PeerData * peer , bool forDialogs ) { <nl> - return peer ? ( ( forDialogs & & peer - > isUser ( ) & & ! peer - > asUser ( ) - > nameOrPhone . isEmpty ( ) ) ? peer - > asUser ( ) - > nameOrPhone : peer - > name ) : tr : : lng_deleted ( tr : : now ) ; <nl> - } <nl> - <nl> void prepareCorners ( RoundCorners index , int32 radius , const QBrush & brush , const style : : color * shadow = nullptr , QImage * cors = nullptr ) { <nl> Expects ( : : corners . size ( ) > index ) ; <nl> <nl> mmm a / Telegram / SourceFiles / app . h <nl> ppp b / Telegram / SourceFiles / app . h <nl> namespace HistoryView { <nl> class Element ; <nl> } / / namespace HistoryView <nl> <nl> + namespace Media { <nl> + namespace Clip { <nl> + class Reader ; <nl> + } / / namespace Clip <nl> + } / / namespace Media <nl> + <nl> using HistoryItemsMap = base : : flat_set < not_null < HistoryItem * > > ; <nl> using GifItems = QHash < Media : : Clip : : Reader * , HistoryItem * > ; <nl> <nl> - enum RoundCorners { <nl> + enum RoundCorners : int { <nl> SmallMaskCorners = 0x00 , / / for images <nl> LargeMaskCorners , <nl> <nl> enum RoundCorners { <nl> } ; <nl> <nl> namespace App { <nl> - MainWindow * wnd ( ) ; <nl> - MainWidget * main ( ) ; <nl> - <nl> QString formatPhone ( QString phone ) ; <nl> <nl> - [ [ nodiscard ] ] QString peerName ( const PeerData * peer , bool forDialogs = false ) ; <nl> - <nl> void hoveredItem ( HistoryView : : Element * item ) ; <nl> HistoryView : : Element * hoveredItem ( ) ; <nl> void pressedItem ( HistoryView : : Element * item ) ; <nl> mmm a / Telegram / SourceFiles / boxes / abstract_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / abstract_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / timer . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> + # include " app . h " <nl> <nl> struct AbstractBox : : LoadingProgress { <nl> LoadingProgress ( <nl> void BoxContentDivider : : paintEvent ( QPaintEvent * e ) { <nl> auto dividerFillBottom = myrtlrect ( 0 , height ( ) - st : : profileDividerBottom . height ( ) , width ( ) , st : : profileDividerBottom . height ( ) ) ; <nl> st : : profileDividerBottom . fill ( p , dividerFillBottom ) ; <nl> } <nl> + <nl> + namespace Ui { <nl> + namespace internal { <nl> + <nl> + void showBox ( <nl> + object_ptr < BoxContent > content , <nl> + LayerOptions options , <nl> + anim : : type animated ) { <nl> + if ( auto w = App : : wnd ( ) ) { <nl> + w - > ui_showBox ( std : : move ( content ) , options , animated ) ; <nl> + } <nl> + } <nl> + <nl> + } / / namespace internal <nl> + <nl> + void hideLayer ( anim : : type animated ) { <nl> + if ( auto w = App : : wnd ( ) ) { <nl> + w - > ui_showBox ( <nl> + { nullptr } , <nl> + LayerOption : : CloseOther , <nl> + animated ) ; <nl> + } <nl> + } <nl> + <nl> + void hideSettingsAndLayer ( anim : : type animated ) { <nl> + if ( auto w = App : : wnd ( ) ) { <nl> + w - > ui_hideSettingsAndLayer ( animated ) ; <nl> + } <nl> + } <nl> + <nl> + bool isLayerShown ( ) { <nl> + if ( auto w = App : : wnd ( ) ) return w - > ui_isLayerShown ( ) ; <nl> + return false ; <nl> + } <nl> + <nl> + } / / namespace Ui <nl> mmm a / Telegram / SourceFiles / boxes / abstract_box . h <nl> ppp b / Telegram / SourceFiles / boxes / abstract_box . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " window / layer_widget . h " <nl> # include " base / unique_qptr . h " <nl> + # include " base / flags . h " <nl> + # include " ui / effects / animation_value . h " <nl> # include " ui / rp_widget . h " <nl> <nl> namespace style { <nl> class BoxPointer { <nl> QPointer < BoxContent > _value ; <nl> <nl> } ; <nl> + <nl> + / / Legacy global method . <nl> + namespace Ui { <nl> + namespace internal { <nl> + <nl> + void showBox ( <nl> + object_ptr < BoxContent > content , <nl> + LayerOptions options , <nl> + anim : : type animated ) ; <nl> + <nl> + } / / namespace internal <nl> + <nl> + template < typename BoxType > <nl> + QPointer < BoxType > show ( <nl> + object_ptr < BoxType > content , <nl> + LayerOptions options = LayerOption : : CloseOther , <nl> + anim : : type animated = anim : : type : : normal ) { <nl> + auto result = QPointer < BoxType > ( content . data ( ) ) ; <nl> + internal : : showBox ( std : : move ( content ) , options , animated ) ; <nl> + return result ; <nl> + } <nl> + <nl> + void hideLayer ( anim : : type animated = anim : : type : : normal ) ; <nl> + void hideSettingsAndLayer ( anim : : type animated = anim : : type : : normal ) ; <nl> + bool isLayerShown ( ) ; <nl> + <nl> + } / / namespace Ui <nl> mmm a / Telegram / SourceFiles / boxes / add_contact_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / add_contact_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " apiwrap . h " <nl> # include " observer_peer . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> <nl> # include < QtGui / QGuiApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / boxes / add_contact_box . h <nl> ppp b / Telegram / SourceFiles / boxes / add_contact_box . h <nl> For license and copyright information please follow this link : <nl> # include " mtproto / sender . h " <nl> # include " styles / style_widgets . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> class ConfirmBox ; <nl> class PeerListBox ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / auto_lock_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / auto_lock_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / localstorage . h " <nl> # include " mainwindow . h " <nl> # include " ui / widgets / checkbox . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> <nl> AutoLockBox : : AutoLockBox ( QWidget * , not_null < Main : : Session * > session ) <nl> mmm a / Telegram / SourceFiles / boxes / background_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / background_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " boxes / background_preview_box . h " <nl> # include " boxes / confirm_box . h " <nl> + # include " app . h " <nl> # include " styles / style_overview . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> mmm a / Telegram / SourceFiles / boxes / background_preview_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / background_preview_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / unixtime . h " <nl> # include " boxes / confirm_box . h " <nl> # include " boxes / background_preview_box . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / change_phone_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / change_phone_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " data / data_session . h " <nl> # include " data / data_user . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> <nl> namespace { <nl> mmm a / Telegram / SourceFiles / boxes / confirm_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / confirm_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / unixtime . h " <nl> # include " main / main_session . h " <nl> # include " observer_peer . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QGuiApplication > <nl> # include < QtGui / QClipboard > <nl> void ConfirmInviteBox : : prepare ( ) { <nl> for ( const auto user : _participants ) { <nl> auto name = new Ui : : FlatLabel ( this , st : : confirmInviteUserName ) ; <nl> name - > resizeToWidth ( st : : confirmInviteUserPhotoSize + padding ) ; <nl> - name - > setText ( user - > firstName . isEmpty ( ) ? App : : peerName ( user ) : user - > firstName ) ; <nl> + name - > setText ( user - > firstName . isEmpty ( ) <nl> + ? user - > name <nl> + : user - > firstName ) ; <nl> name - > moveToLeft ( left + ( padding / 2 ) , st : : confirmInviteUserNameTop ) ; <nl> left + = _userWidth ; <nl> } <nl> mmm a / Telegram / SourceFiles / boxes / confirm_phone_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / confirm_phone_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_info . h " / / Platform : : SystemVersionPretty <nl> # include " mainwidget . h " <nl> # include " numbers . h " <nl> + # include " app . h " <nl> # include " lang / lang_keys . h " <nl> <nl> namespace { <nl> mmm a / Telegram / SourceFiles / boxes / connection_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / connection_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / animations . h " <nl> # include " ui / effects / radial_animation . h " <nl> # include " ui / text_options . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / boxes / create_poll_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / create_poll_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / view / history_view_schedule_box . h " <nl> # include " settings / settings_common . h " <nl> # include " base / unique_qptr . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_settings . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / download_path_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / download_path_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / checkbox . h " <nl> # include " ui / widgets / buttons . h " <nl> # include " platform / platform_specific . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> <nl> DownloadPathBox : : DownloadPathBox ( QWidget * parent ) <nl> mmm a / Telegram / SourceFiles / boxes / edit_caption_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / edit_caption_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_session_controller . h " <nl> # include " ui / widgets / checkbox . h " <nl> # include " confirm_box . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QMimeData > <nl> <nl> mmm a / Telegram / SourceFiles / boxes / edit_caption_box . h <nl> ppp b / Telegram / SourceFiles / boxes / edit_caption_box . h <nl> For license and copyright information please follow this link : <nl> # include " boxes / abstract_box . h " <nl> # include " storage / storage_media_prepare . h " <nl> # include " ui / wrap / slide_wrap . h " <nl> - # include < rpl / event_stream . h > <nl> + # include " media / clip / media_clip_reader . h " <nl> <nl> namespace ChatHelpers { <nl> class TabbedPanel ; <nl> mmm a / Telegram / SourceFiles / boxes / edit_color_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / edit_color_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / edit_color_box . h " <nl> <nl> # include " lang / lang_keys . h " <nl> - # include " styles / style_boxes . h " <nl> # include " ui / widgets / shadow . h " <nl> + # include " ui / widgets / input_fields . h " <nl> # include " platform / platform_info . h " <nl> + # include " app . h " <nl> + # include " styles / style_boxes . h " <nl> # include " styles / style_mediaview . h " <nl> - # include " ui / widgets / input_fields . h " <nl> <nl> class EditColorBox : : Picker : public TWidget { <nl> public : <nl> mmm a / Telegram / SourceFiles / boxes / mute_settings_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / mute_settings_box . cpp <nl> Copyright ( C ) 2017 , Nicholas Guriev < guriev - ns @ ya . ru > <nl> # include " main / main_session . h " <nl> # include " data / data_session . h " <nl> # include " data / data_peer . h " <nl> - # include " styles / style_boxes . h " <nl> # include " ui / special_buttons . h " <nl> # include " ui / widgets / checkbox . h " <nl> # include " ui / widgets / labels . h " <nl> + # include " app . h " <nl> + # include " styles / style_boxes . h " <nl> <nl> namespace { <nl> <nl> void MuteSettingsBox : : prepare ( ) { <nl> icon - > moveToLeft ( st : : boxPadding . left ( ) , y ) ; <nl> <nl> object_ptr < Ui : : FlatLabel > title ( this , st : : muteChatTitle ) ; <nl> - title - > setText ( App : : peerName ( _peer , true ) ) ; <nl> + title - > setText ( _peer - > name ) ; <nl> title - > moveToLeft ( <nl> st : : boxPadding . left ( ) + st : : muteChatTitleLeft , <nl> y + ( icon - > height ( ) / 2 ) - ( title - > height ( ) / 2 ) ) ; <nl> mmm a / Telegram / SourceFiles / boxes / passcode_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / passcode_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / wrap / fade_wrap . h " <nl> # include " passport / passport_encryption . h " <nl> # include " passport / passport_panel_edit_contact . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_passport . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / peer_list_controllers . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peer_list_controllers . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / history . h " <nl> # include " dialogs / dialogs_main_list . h " <nl> # include " window / window_session_controller . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_profile . h " <nl> <nl> void AddBotToGroupBoxController : : shareBotGame ( not_null < PeerData * > chat ) { <nl> } ) ; <nl> auto confirmText = [ chat ] { <nl> if ( chat - > isUser ( ) ) { <nl> - return tr : : lng_bot_sure_share_game ( tr : : now , lt_user , App : : peerName ( chat ) ) ; <nl> + return tr : : lng_bot_sure_share_game ( tr : : now , lt_user , chat - > name ) ; <nl> } <nl> return tr : : lng_bot_sure_share_game_group ( tr : : now , lt_group , chat - > name ) ; <nl> } ( ) ; <nl> mmm a / Telegram / SourceFiles / boxes / peer_list_controllers . h <nl> ppp b / Telegram / SourceFiles / boxes / peer_list_controllers . h <nl> For license and copyright information please follow this link : <nl> / / <nl> / / } ; <nl> <nl> + class History ; <nl> + <nl> namespace Window { <nl> class SessionNavigation ; <nl> } / / namespace Window <nl> mmm a / Telegram / SourceFiles / boxes / peers / add_participants_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / add_participants_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_session_controller . h " <nl> # include " apiwrap . h " <nl> # include " observer_peer . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace { <nl> <nl> void AddSpecialBoxController : : kickUser ( <nl> : tr : : lng_profile_sure_kick_channel ) ( <nl> tr : : now , <nl> lt_user , <nl> - App : : peerName ( user ) ) ; <nl> + user - > name ) ; <nl> _editBox = Ui : : show ( <nl> Box < ConfirmBox > ( text , kickUserSure ) , <nl> LayerOption : : KeepOther ) ; <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_contact_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_contact_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / toast / toast . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_info . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_linked_chat_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_linked_chat_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / confirm_box . h " <nl> # include " boxes / add_contact_box . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " main / main_session . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_participant_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_participant_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / core_cloud_password . h " <nl> # include " base / unixtime . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " main / main_session . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_info . h " <nl> EditParticipantBox : : Inner : : Inner ( <nl> _userPhoto - > setPointerCursor ( false ) ; <nl> _userName . setText ( <nl> st : : rightsNameStyle , <nl> - App : : peerName ( _user ) , <nl> + _user - > name , <nl> Ui : : NameTextOptions ( ) ) ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_participants_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_participants_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / popup_menu . h " <nl> # include " window / window_session_controller . h " <nl> # include " history / history . h " <nl> + # include " facades . h " <nl> <nl> namespace { <nl> <nl> void ParticipantsBoxController : : refreshCustomStatus ( <nl> row - > setCustomStatus ( tr : : lng_channel_admin_status_promoted_by ( <nl> tr : : now , <nl> lt_user , <nl> - App : : peerName ( by ) ) ) ; <nl> + by - > name ) ) ; <nl> } else { <nl> if ( _additional . isCreator ( user ) ) { <nl> row - > setCustomStatus ( <nl> void ParticipantsBoxController : : refreshCustomStatus ( <nl> : tr : : lng_channel_banned_status_restricted_by ) ( <nl> tr : : now , <nl> lt_user , <nl> - by ? App : : peerName ( by ) : " Unknown " ) ) ; <nl> + by ? by - > name : " Unknown " ) ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_peer_info_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_peer_info_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / wrap / slide_wrap . h " <nl> # include " ui / wrap / vertical_layout . h " <nl> # include " window / window_session_controller . h " <nl> - # include < rpl / flatten_latest . h > <nl> - # include < rpl / range . h > <nl> # include " info / profile / info_profile_icon . h " <nl> + # include " app . h " <nl> + # include " facades . h " <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / boxes / peers / edit_peer_permissions_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peers / edit_peer_permissions_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / peers / edit_peer_info_box . h " <nl> # include " window / window_session_controller . h " <nl> # include " mainwindow . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_info . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / photo_crop_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / photo_crop_box . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " lang / lang_keys . h " <nl> # include " ui / widgets / buttons . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> <nl> PhotoCropBox : : PhotoCropBox ( <nl> mmm a / Telegram / SourceFiles / boxes / send_files_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / send_files_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " api / api_common . h " <nl> # include " window / window_session_controller . h " <nl> # include " layout . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> mmm a / Telegram / SourceFiles / boxes / share_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / share_box . cpp <nl> class ShareBox : : Inner <nl> Fn < void ( PeerData * peer , bool selected ) > callback ) ; <nl> void peerUnselected ( not_null < PeerData * > peer ) ; <nl> <nl> - QVector < PeerData * > selected ( ) const ; <nl> + std : : vector < not_null < PeerData * > > selected ( ) const ; <nl> bool hasSelected ( ) const ; <nl> <nl> void peopleReceived ( <nl> void ShareBox : : Inner : : refresh ( ) { <nl> update ( ) ; <nl> } <nl> <nl> - QVector < PeerData * > ShareBox : : Inner : : selected ( ) const { <nl> - auto result = QVector < PeerData * > ( ) ; <nl> + std : : vector < not_null < PeerData * > > ShareBox : : Inner : : selected ( ) const { <nl> + auto result = std : : vector < not_null < PeerData * > > ( ) ; <nl> result . reserve ( _dataMap . size ( ) ) ; <nl> for ( const auto & [ peer , chat ] : _dataMap ) { <nl> if ( chat - > checkbox . checked ( ) ) { <nl> mmm a / Telegram / SourceFiles / boxes / share_box . h <nl> ppp b / Telegram / SourceFiles / boxes / share_box . h <nl> class ShareBox : public BoxContent , public RPCSender { <nl> public : <nl> using CopyCallback = Fn < void ( ) > ; <nl> using SubmitCallback = Fn < void ( <nl> - QVector < PeerData * > & & , <nl> + std : : vector < not_null < PeerData * > > & & , <nl> TextWithTags & & , <nl> Api : : SendOptions ) > ; <nl> using FilterCallback = Fn < bool ( PeerData * ) > ; <nl> mmm a / Telegram / SourceFiles / boxes / sticker_set_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / sticker_set_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " apiwrap . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / stickers_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / stickers_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / image / image . h " <nl> # include " window / window_session_controller . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> mmm a / Telegram / SourceFiles / boxes / url_auth_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / url_auth_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_keys . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> <nl> void UrlAuthBox : : Activate ( <nl> not_null < Ui : : RpWidget * > UrlAuthBox : : setupContent ( <nl> textcmdStartSemibold ( ) + domain + textcmdStopSemibold ( ) , <nl> lt_user , <nl> ( textcmdStartSemibold ( ) <nl> - + App : : peerName ( session - > user ( ) ) <nl> + + session - > user ( ) - > name <nl> + textcmdStopSemibold ( ) ) ) ) ; <nl> const auto allow = bot <nl> ? addCheckbox ( tr : : lng_url_auth_allow_messages ( <nl> mmm a / Telegram / SourceFiles / calls / calls_box_controller . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_box_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_media_types . h " <nl> # include " data / data_user . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Calls { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / calls / calls_call . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_call . cpp <nl> For license and copyright information please follow this link : <nl> # include " calls / calls_panel . h " <nl> # include " data / data_user . h " <nl> # include " data / data_session . h " <nl> + # include " facades . h " <nl> <nl> # ifdef slots <nl> # undef slots <nl> void Call : : setFailedQueued ( int error ) { <nl> <nl> void Call : : handleRequestError ( const RPCError & error ) { <nl> if ( error . type ( ) = = qstr ( " USER_PRIVACY_RESTRICTED " ) ) { <nl> - Ui : : show ( Box < InformBox > ( tr : : lng_call_error_not_available ( tr : : now , lt_user , App : : peerName ( _user ) ) ) ) ; <nl> + Ui : : show ( Box < InformBox > ( tr : : lng_call_error_not_available ( tr : : now , lt_user , _user - > name ) ) ) ; <nl> } else if ( error . type ( ) = = qstr ( " PARTICIPANT_VERSION_OUTDATED " ) ) { <nl> - Ui : : show ( Box < InformBox > ( tr : : lng_call_error_outdated ( tr : : now , lt_user , App : : peerName ( _user ) ) ) ) ; <nl> + Ui : : show ( Box < InformBox > ( tr : : lng_call_error_outdated ( tr : : now , lt_user , _user - > name ) ) ) ; <nl> } else if ( error . type ( ) = = qstr ( " CALL_PROTOCOL_LAYER_INVALID " ) ) { <nl> - Ui : : show ( Box < InformBox > ( Lang : : Hard : : CallErrorIncompatible ( ) . replace ( " { user } " , App : : peerName ( _user ) ) ) ) ; <nl> + Ui : : show ( Box < InformBox > ( Lang : : Hard : : CallErrorIncompatible ( ) . replace ( " { user } " , _user - > name ) ) ) ; <nl> } <nl> finish ( FinishType : : Failed ) ; <nl> } <nl> void Call : : handleControllerError ( int error ) { <nl> Ui : : show ( Box < InformBox > ( <nl> Lang : : Hard : : CallErrorIncompatible ( ) . replace ( <nl> " { user } " , <nl> - App : : peerName ( _user ) ) ) ) ; <nl> + _user - > name ) ) ) ; <nl> } else if ( error = = tgvoip : : ERROR_AUDIO_IO ) { <nl> Ui : : show ( Box < InformBox > ( tr : : lng_call_error_audio_io ( tr : : now ) ) ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / calls / calls_instance . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_instance . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / unixtime . h " <nl> # include " mainwidget . h " <nl> # include " boxes / rate_call_box . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Calls { <nl> namespace { <nl> void Instance : : startOutgoingCall ( not_null < UserData * > user ) { <nl> if ( user - > callsStatus ( ) = = UserData : : CallsStatus : : Private ) { <nl> / / Request full user once more to refresh the setting in case it was changed . <nl> _session - > api ( ) . requestFullPeer ( user ) ; <nl> - Ui : : show ( Box < InformBox > ( tr : : lng_call_error_not_available ( tr : : now , lt_user , App : : peerName ( user ) ) ) ) ; <nl> + Ui : : show ( Box < InformBox > ( tr : : lng_call_error_not_available ( tr : : now , lt_user , user - > name ) ) ) ; <nl> return ; <nl> } <nl> requestMicrophonePermissionOrFail ( crl : : guard ( this , [ = ] { <nl> mmm a / Telegram / SourceFiles / calls / calls_panel . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_panel . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_specific . h " <nl> # include " window / main_window . h " <nl> # include " layout . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QDesktopWidget > <nl> # include < QtWidgets / QApplication > <nl> void Panel : : initControls ( ) { <nl> if ( ! _call | | update . peer ! = _call - > user ( ) ) { <nl> return ; <nl> } <nl> - _name - > setText ( App : : peerName ( _call - > user ( ) ) ) ; <nl> + _name - > setText ( _call - > user ( ) - > name ) ; <nl> updateControlsGeometry ( ) ; <nl> } ) ) ; <nl> _updateDurationTimer . setCallback ( [ this ] { <nl> void Panel : : reinitControls ( ) { <nl> st : : callPanelSignalBars , <nl> [ = ] { rtlupdate ( signalBarsRect ( ) ) ; } ) ; <nl> <nl> - _name - > setText ( App : : peerName ( _call - > user ( ) ) ) ; <nl> + _name - > setText ( _call - > user ( ) - > name ) ; <nl> updateStatusText ( _call - > state ( ) ) ; <nl> } <nl> <nl> void Panel : : leaveToChildEvent ( QEvent * e , QWidget * child ) { <nl> } <nl> <nl> QString Panel : : tooltipText ( ) const { <nl> - return tr : : lng_call_fingerprint_tooltip ( tr : : now , lt_user , App : : peerName ( _user ) ) ; <nl> + return tr : : lng_call_fingerprint_tooltip ( tr : : now , lt_user , _user - > name ) ; <nl> } <nl> <nl> QPoint Panel : : tooltipPos ( ) const { <nl> mmm a / Telegram / SourceFiles / calls / calls_top_bar . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_top_bar . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / abstract_box . h " <nl> # include " base / timer . h " <nl> # include " layout . h " <nl> + # include " app . h " <nl> # include " styles / style_calls . h " <nl> # include " styles / style_boxes . h " <nl> <nl> void TopBar : : updateInfoLabels ( ) { <nl> } <nl> <nl> void TopBar : : setInfoLabels ( ) { <nl> - if ( auto call = _call . get ( ) ) { <nl> - auto user = call - > user ( ) ; <nl> - auto fullName = App : : peerName ( user ) ; <nl> - auto shortName = user - > firstName ; <nl> + if ( const auto call = _call . get ( ) ) { <nl> + const auto user = call - > user ( ) ; <nl> + const auto fullName = user - > name ; <nl> + const auto shortName = user - > firstName ; <nl> _fullInfoLabel - > setText ( fullName . toUpper ( ) ) ; <nl> _shortInfoLabel - > setText ( shortName . toUpper ( ) ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / chat_helpers / bot_keyboard . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / bot_keyboard . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " data / data_session . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_history . h " <nl> <nl> mmm a / Telegram / SourceFiles / chat_helpers / emoji_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / emoji_list_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " emoji_suggestions_helper . h " <nl> # include " window / window_session_controller . h " <nl> # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> namespace ChatHelpers { <nl> mmm a / Telegram / SourceFiles / chat_helpers / emoji_sets_manager . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / emoji_sets_manager . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " main / main_account . h " <nl> # include " mainwidget . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> mmm a / Telegram / SourceFiles / chat_helpers / emoji_suggestions_widget . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / emoji_suggestions_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " core / event_filter . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> mmm a / Telegram / SourceFiles / chat_helpers / field_autocomplete . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / field_autocomplete . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " chat_helpers / stickers . h " <nl> # include " base / unixtime . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_chat_helpers . h " <nl> mmm a / Telegram / SourceFiles / chat_helpers / gifs_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / gifs_list_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " window / window_session_controller . h " <nl> # include " history / view / history_view_cursor_state . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> <nl> mmm a / Telegram / SourceFiles / chat_helpers / gifs_list_widget . h <nl> ppp b / Telegram / SourceFiles / chat_helpers / gifs_list_widget . h <nl> For license and copyright information please follow this link : <nl> # include " chat_helpers / tabbed_selector . h " <nl> # include " base / timer . h " <nl> # include " inline_bots / inline_bot_layout_item . h " <nl> + # include " app . h " <nl> + <nl> + # include < QtCore / QTimer > <nl> <nl> namespace InlineBots { <nl> namespace Layout { <nl> mmm a / Telegram / SourceFiles / chat_helpers / stickers . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / stickers . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / unixtime . h " <nl> # include " lottie / lottie_single_player . h " <nl> # include " lottie / lottie_multi_player . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> namespace Stickers { <nl> mmm a / Telegram / SourceFiles / chat_helpers / stickers_emoji_pack . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / stickers_emoji_pack . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_document . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> + # include " facades . h " <nl> # include " styles / style_history . h " <nl> <nl> # include < QtCore / QBuffer > <nl> mmm a / Telegram / SourceFiles / chat_helpers / stickers_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / stickers_list_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " observer_peer . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> # include " styles / style_chat_helpers . h " <nl> # include " styles / style_window . h " <nl> <nl> mmm a / Telegram / SourceFiles / chat_helpers / tabbed_panel . cpp <nl> ppp b / Telegram / SourceFiles / chat_helpers / tabbed_panel . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " core / application . h " <nl> # include " core / qt_signal_producer . h " <nl> + # include " app . h " <nl> # include " styles / style_chat_helpers . h " <nl> <nl> namespace ChatHelpers { <nl> mmm a / Telegram / SourceFiles / core / application . cpp <nl> ppp b / Telegram / SourceFiles / core / application . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / confirm_phone_box . h " <nl> # include " boxes / confirm_box . h " <nl> # include " boxes / share_box . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QDesktopWidget > <nl> # include < QtCore / QMimeDatabase > <nl> mmm a / Telegram / SourceFiles / core / click_handler_types . cpp <nl> ppp b / Telegram / SourceFiles / core / click_handler_types . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / tooltip . h " <nl> # include " data / data_user . h " <nl> # include " data / data_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QDesktopServices > <nl> # include < QtGui / QGuiApplication > <nl> auto MentionNameClickHandler : : getTextEntity ( ) const - > TextEntity { <nl> } <nl> <nl> QString MentionNameClickHandler : : tooltip ( ) const { <nl> - if ( auto user = Auth ( ) . data ( ) . userLoaded ( _userId ) ) { <nl> - auto name = App : : peerName ( user ) ; <nl> + if ( const auto user = Auth ( ) . data ( ) . userLoaded ( _userId ) ) { <nl> + const auto name = user - > name ; <nl> if ( name ! = _text ) { <nl> return name ; <nl> } <nl> mmm a / Telegram / SourceFiles / core / crash_report_window . cpp <nl> ppp b / Telegram / SourceFiles / core / crash_report_window . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / main_window . h " <nl> # include " platform / platform_specific . h " <nl> # include " base / zlib_help . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QFileDialog > <nl> # include < QtGui / QScreen > <nl> # include < QtGui / QDesktopServices > <nl> # include < QtCore / QStandardPaths > <nl> + # include < QtCore / QTimer > <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / core / local_url_handlers . cpp <nl> ppp b / Telegram / SourceFiles / core / local_url_handlers . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> <nl> namespace Core { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / core / main_queue_processor . cpp <nl> ppp b / Telegram / SourceFiles / core / main_queue_processor . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " core / sandbox . h " <nl> # include " platform / platform_specific . h " <nl> + # include " facades . h " <nl> <nl> namespace Core { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / core / sandbox . cpp <nl> ppp b / Telegram / SourceFiles / core / sandbox . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / qthelp_url . h " <nl> # include " base / qthelp_regex . h " <nl> # include " ui / effects / animations . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QScreen > <nl> <nl> mmm a / Telegram / SourceFiles / core / shortcuts . cpp <nl> ppp b / Telegram / SourceFiles / core / shortcuts . cpp <nl> For license and copyright information please follow this link : <nl> # include " media / player / media_player_instance . h " <nl> # include " platform / platform_info . h " <nl> # include " base / parse_helper . h " <nl> + # include " facades . h " <nl> <nl> # include < QtWidgets / QShortcut > <nl> # include < QtCore / QJsonDocument > <nl> mmm a / Telegram / SourceFiles / core / update_checker . cpp <nl> ppp b / Telegram / SourceFiles / core / update_checker . cpp <nl> For license and copyright information please follow this link : <nl> # include " info / settings / info_settings_widget . h " <nl> # include " window / window_session_controller . h " <nl> # include " settings / settings_intro . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QJsonDocument > <nl> # include < QtCore / QJsonObject > <nl> mmm a / Telegram / SourceFiles / data / data_cloud_themes . cpp <nl> ppp b / Telegram / SourceFiles / data / data_cloud_themes . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " / / Core : : App ( ) . showTheme . <nl> # include " lang / lang_keys . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> # include " mainwindow . h " <nl> <nl> namespace Data { <nl> mmm a / Telegram / SourceFiles / data / data_document . cpp <nl> ppp b / Telegram / SourceFiles / data / data_document . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " core / application . h " <nl> # include " lottie / lottie_animation . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / data / data_document . h <nl> ppp b / Telegram / SourceFiles / data / data_document . h <nl> For license and copyright information please follow this link : <nl> # pragma once <nl> <nl> # include " base / flags . h " <nl> + # include " base / binary_guard . h " <nl> # include " data / data_types . h " <nl> # include " ui / image / image . h " <nl> <nl> mmm a / Telegram / SourceFiles / data / data_document_good_thumbnail . cpp <nl> ppp b / Telegram / SourceFiles / data / data_document_good_thumbnail . cpp <nl> For license and copyright information please follow this link : <nl> # include " lottie / lottie_animation . h " <nl> # include " window / themes / window_theme_preview . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QBuffer > <nl> # include < QtGui / QImageReader > <nl> mmm a / Telegram / SourceFiles / data / data_document_good_thumbnail . h <nl> ppp b / Telegram / SourceFiles / data / data_document_good_thumbnail . h <nl> For license and copyright information please follow this link : <nl> # pragma once <nl> <nl> # include " ui / image / image . h " <nl> + # include " base / binary_guard . h " <nl> <nl> class DocumentData ; <nl> <nl> mmm a / Telegram / SourceFiles / data / data_folder . cpp <nl> ppp b / Telegram / SourceFiles / data / data_folder . cpp <nl> For license and copyright information please follow this link : <nl> # include " observer_peer . h " <nl> # include " apiwrap . h " <nl> # include " mainwidget . h " <nl> + # include " facades . h " <nl> # include " styles / style_dialogs . h " <nl> <nl> namespace Data { <nl> mmm a / Telegram / SourceFiles / data / data_media_types . cpp <nl> ppp b / Telegram / SourceFiles / data / data_media_types . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_keys . h " <nl> # include " layout . h " <nl> # include " storage / file_upload . h " <nl> + # include " app . h " <nl> <nl> namespace Data { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / data / data_peer . cpp <nl> ppp b / Telegram / SourceFiles / data / data_peer . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / history . h " <nl> # include " history / view / history_view_element . h " <nl> # include " history / history_item . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / data / data_photo . cpp <nl> ppp b / Telegram / SourceFiles / data / data_photo . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / image / image_source . h " <nl> # include " mainwidget . h " <nl> # include " core / application . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> PhotoData : : PhotoData ( not_null < Data : : Session * > owner , PhotoId id ) <nl> : id ( id ) <nl> mmm a / Telegram / SourceFiles / data / data_pts_waiter . cpp <nl> ppp b / Telegram / SourceFiles / data / data_pts_waiter . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> <nl> uint64 PtsWaiter : : ptsKey ( PtsSkippedQueue queue , int32 pts ) { <nl> return _queue . insert ( uint64 ( uint32 ( pts ) ) < < 32 | ( + + _skippedKey ) , queue ) . key ( ) ; <nl> mmm a / Telegram / SourceFiles / data / data_session . cpp <nl> ppp b / Telegram / SourceFiles / data / data_session . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_scheduled_messages . h " <nl> # include " data / data_cloud_themes . h " <nl> # include " base / unixtime . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " / / st : : backgroundSize <nl> <nl> namespace Data { <nl> mmm a / Telegram / SourceFiles / data / data_shared_media . h <nl> ppp b / Telegram / SourceFiles / data / data_shared_media . h <nl> For license and copyright information please follow this link : <nl> # include " base / weak_ptr . h " <nl> # include " data / data_sparse_ids . h " <nl> <nl> + class History ; <nl> + <nl> std : : optional < Storage : : SharedMediaType > SharedMediaOverviewType ( <nl> Storage : : SharedMediaType type ) ; <nl> void SharedMediaShowOverview ( <nl> mmm a / Telegram / SourceFiles / data / data_user . cpp <nl> ppp b / Telegram / SourceFiles / data / data_user . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / text_options . h " <nl> # include " apiwrap . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_entry . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_entry . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " history / history_item . h " <nl> # include " history / history . h " <nl> + # include " app . h " <nl> # include " styles / style_dialogs . h " / / st : : dialogsTextWidthMin <nl> <nl> namespace Dialogs { <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_inner_widget . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_inner_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / multi_select . h " <nl> # include " ui / empty_userpic . h " <nl> # include " ui / unread_badge . h " <nl> + # include " facades . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_chat_helpers . h " <nl> # include " styles / style_window . h " <nl> void InnerWidget : : refreshSearchInChatLabel ( ) { <nl> dialog , <nl> Ui : : DialogTextOptions ( ) ) ; <nl> } <nl> - const auto from = [ & ] { <nl> - if ( const auto from = _searchFromUser ) { <nl> - return App : : peerName ( from ) ; <nl> - } <nl> - return QString ( ) ; <nl> - } ( ) ; <nl> + const auto from = _searchFromUser ? _searchFromUser - > name : QString ( ) ; <nl> if ( ! from . isEmpty ( ) ) { <nl> const auto fromUserText = tr : : lng_dlg_search_from ( <nl> tr : : now , <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_inner_widget . h <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_inner_widget . h <nl> namespace Dialogs { <nl> class Row ; <nl> class FakeRow ; <nl> class IndexedList ; <nl> + enum class Mode ; <nl> <nl> struct ChosenRow { <nl> Key key ; <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_layout . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_layout . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " data / data_folder . h " <nl> # include " data / data_peer_values . h " <nl> + # include " app . h " <nl> <nl> namespace Dialogs { <nl> namespace Layout { <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_row . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_row . cpp <nl> QString ComposeFolderListEntryText ( not_null < Data : : Folder * > folder ) { <nl> list . size ( ) - ( throwAwayLastName ? 1 : 0 ) <nl> ) ; <nl> const auto wrapName = [ ] ( not_null < History * > history ) { <nl> - const auto name = TextUtilities : : Clean ( App : : peerName ( history - > peer ) ) ; <nl> + const auto name = TextUtilities : : Clean ( history - > peer - > name ) ; <nl> return ( history - > unreadCount ( ) > 0 ) <nl> ? ( textcmdStartSemibold ( ) <nl> + textcmdLink ( 1 , name ) <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_widget . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_chat . h " <nl> # include " data / data_user . h " <nl> # include " data / data_folder . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_widget . h <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_widget . h <nl> class ConnectionState ; <nl> <nl> namespace Dialogs { <nl> <nl> + enum class Mode ; <nl> struct RowDescriptor ; <nl> class Row ; <nl> class FakeRow ; <nl> mmm a / Telegram / SourceFiles / export / view / export_view_panel_controller . cpp <nl> ppp b / Telegram / SourceFiles / export / view / export_view_panel_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " data / data_session . h " <nl> # include " base / unixtime . h " <nl> + # include " facades . h " <nl> # include " styles / style_export . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / export / view / export_view_settings . h <nl> ppp b / Telegram / SourceFiles / export / view / export_view_settings . h <nl> For license and copyright information please follow this link : <nl> # include " export / export_settings . h " <nl> # include " ui / rp_widget . h " <nl> <nl> + class BoxContent ; <nl> + <nl> namespace Ui { <nl> class VerticalLayout ; <nl> class Checkbox ; <nl> mmm a / Telegram / SourceFiles / facades . cpp <nl> ppp b / Telegram / SourceFiles / facades . cpp <nl> void activateClickHandler ( ClickHandlerPtr handler , Qt : : MouseButton button ) { <nl> } / / namespace App <nl> <nl> namespace Ui { <nl> - namespace internal { <nl> - <nl> - void showBox ( <nl> - object_ptr < BoxContent > content , <nl> - LayerOptions options , <nl> - anim : : type animated ) { <nl> - if ( auto w = App : : wnd ( ) ) { <nl> - w - > ui_showBox ( std : : move ( content ) , options , animated ) ; <nl> - } <nl> - } <nl> - <nl> - } / / namespace internal <nl> - <nl> - void hideLayer ( anim : : type animated ) { <nl> - if ( auto w = App : : wnd ( ) ) { <nl> - w - > ui_showBox ( <nl> - { nullptr } , <nl> - LayerOption : : CloseOther , <nl> - animated ) ; <nl> - } <nl> - } <nl> - <nl> - void hideSettingsAndLayer ( anim : : type animated ) { <nl> - if ( auto w = App : : wnd ( ) ) { <nl> - w - > ui_hideSettingsAndLayer ( animated ) ; <nl> - } <nl> - } <nl> - <nl> - bool isLayerShown ( ) { <nl> - if ( auto w = App : : wnd ( ) ) return w - > ui_isLayerShown ( ) ; <nl> - return false ; <nl> - } <nl> <nl> void showPeerProfile ( const PeerId & peer ) { <nl> if ( const auto window = App : : wnd ( ) ) { <nl> mmm a / Telegram / SourceFiles / facades . h <nl> ppp b / Telegram / SourceFiles / facades . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " base / type_traits . h " <nl> # include " base / observer . h " <nl> + # include " ui / effects / animation_value . h " <nl> <nl> - class BoxContent ; <nl> + class History ; <nl> <nl> namespace Data { <nl> struct FileOrigin ; <nl> void activateClickHandler ( ClickHandlerPtr handler , Qt : : MouseButton button ) ; <nl> <nl> } / / namespace App <nl> <nl> - <nl> - enum class LayerOption { <nl> - CloseOther = ( 1 < < 0 ) , <nl> - KeepOther = ( 1 < < 1 ) , <nl> - ShowAfterOther = ( 1 < < 2 ) , <nl> - } ; <nl> - using LayerOptions = base : : flags < LayerOption > ; <nl> - inline constexpr auto is_flag_type ( LayerOption ) { return true ; } ; <nl> - <nl> namespace Ui { <nl> - namespace internal { <nl> - <nl> - void showBox ( <nl> - object_ptr < BoxContent > content , <nl> - LayerOptions options , <nl> - anim : : type animated ) ; <nl> - <nl> - } / / namespace internal <nl> - <nl> - template < typename BoxType > <nl> - QPointer < BoxType > show ( <nl> - object_ptr < BoxType > content , <nl> - LayerOptions options = LayerOption : : CloseOther , <nl> - anim : : type animated = anim : : type : : normal ) { <nl> - auto result = QPointer < BoxType > ( content . data ( ) ) ; <nl> - internal : : showBox ( std : : move ( content ) , options , animated ) ; <nl> - return result ; <nl> - } <nl> <nl> - void hideLayer ( anim : : type animated = anim : : type : : normal ) ; <nl> - void hideSettingsAndLayer ( anim : : type animated = anim : : type : : normal ) ; <nl> - bool isLayerShown ( ) ; <nl> + / / Legacy global methods . <nl> <nl> void showPeerProfile ( const PeerId & peer ) ; <nl> void showPeerProfile ( const PeerData * peer ) ; <nl> mmm a / Telegram / SourceFiles / history / admin_log / history_admin_log_inner . cpp <nl> ppp b / Telegram / SourceFiles / history / admin_log / history_admin_log_inner . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_media_types . h " <nl> # include " data / data_channel . h " <nl> # include " data / data_user . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / history / admin_log / history_admin_log_item . cpp <nl> ppp b / Telegram / SourceFiles / history / admin_log / history_admin_log_item . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " mainwindow . h " / / App : : wnd ( ) - > sessionController <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> <nl> namespace AdminLog { <nl> namespace { <nl> TextWithEntities GenerateBannedChangeText ( <nl> auto GenerateUserString ( MTPint userId ) { <nl> / / User name in " User name ( @ username ) " format with entities . <nl> auto user = Auth ( ) . data ( ) . user ( userId . v ) ; <nl> - auto name = TextWithEntities { App : : peerName ( user ) } ; <nl> + auto name = TextWithEntities { user - > name } ; <nl> auto entityData = QString : : number ( user - > id ) <nl> + ' . ' <nl> + QString : : number ( user - > accessHash ( ) ) ; <nl> void GenerateItems ( <nl> } ; <nl> <nl> using Flag = MTPDmessage : : Flag ; <nl> - auto fromName = App : : peerName ( from ) ; <nl> + auto fromName = from - > name ; <nl> auto fromLink = from - > createOpenLink ( ) ; <nl> auto fromLinkText = textcmdLink ( 1 , fromName ) ; <nl> <nl> mmm a / Telegram / SourceFiles / history / admin_log / history_admin_log_item . h <nl> ppp b / Telegram / SourceFiles / history / admin_log / history_admin_log_item . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + class History ; <nl> + <nl> namespace HistoryView { <nl> class ElementDelegate ; <nl> class Element ; <nl> mmm a / Telegram / SourceFiles / history / admin_log / history_admin_log_section . cpp <nl> ppp b / Telegram / SourceFiles / history / admin_log / history_admin_log_section . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_channel . h " <nl> # include " data / data_session . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / history / history . cpp <nl> ppp b / Telegram / SourceFiles / history / history . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / text_options . h " <nl> # include " core / crash_reports . h " <nl> # include " base / unixtime . h " <nl> + # include " facades . h " <nl> # include " styles / style_dialogs . h " <nl> - # include < memory > <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / history / history_drag_area . cpp <nl> ppp b / Telegram / SourceFiles / history / history_drag_area . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " apiwrap . h " <nl> # include " mainwidget . h " <nl> + # include " app . h " <nl> # include " ui / widgets / shadow . h " <nl> <nl> DragArea : : DragArea ( QWidget * parent ) : TWidget ( parent ) { <nl> mmm a / Telegram / SourceFiles / history / history_inner_widget . cpp <nl> ppp b / Telegram / SourceFiles / history / history_inner_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_poll . h " <nl> # include " data / data_photo . h " <nl> # include " data / data_user . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QClipboard > <nl> # include < QtWidgets / QApplication > <nl> mmm a / Telegram / SourceFiles / history / history_inner_widget . h <nl> ppp b / Telegram / SourceFiles / history / history_inner_widget . h <nl> struct StateRequest ; <nl> enum class CursorState : char ; <nl> enum class PointState : char ; <nl> class EmptyPainter ; <nl> + class Element ; <nl> } / / namespace HistoryView <nl> <nl> namespace Window { <nl> mmm a / Telegram / SourceFiles / history / history_item . cpp <nl> ppp b / Telegram / SourceFiles / history / history_item . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_chat . h " <nl> # include " data / data_user . h " <nl> # include " observer_peer . h " <nl> + # include " facades . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_history . h " <nl> <nl> mmm a / Telegram / SourceFiles / history / history_item . h <nl> ppp b / Telegram / SourceFiles / history / history_item . h <nl> class ElementDelegate ; <nl> } / / namespace HistoryView <nl> <nl> struct HiddenSenderInfo ; <nl> + class History ; <nl> <nl> class HistoryItem : public RuntimeComposer < HistoryItem > { <nl> public : <nl> mmm a / Telegram / SourceFiles / history / history_item_components . cpp <nl> ppp b / Telegram / SourceFiles / history / history_item_components . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " data / data_file_origin . h " <nl> # include " main / main_session . h " <nl> + # include " window / window_session_controller . h " <nl> + # include " facades . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_history . h " <nl> - # include " window / window_session_controller . h " <nl> <nl> # include < QtGui / QGuiApplication > <nl> <nl> void HistoryMessageForwarded : : create ( const HistoryMessageVia * via ) const { <nl> & & originalSender - > isChannel ( ) <nl> & & ! originalSender - > isMegagroup ( ) ; <nl> const auto name = originalSender <nl> - ? App : : peerName ( originalSender ) <nl> + ? originalSender - > name <nl> : hiddenSenderInfo - > name ; <nl> if ( ! originalAuthor . isEmpty ( ) ) { <nl> phrase = tr : : lng_forwarded_signed ( <nl> void HistoryMessageReply : : updateName ( ) const { <nl> } <nl> return replyToMsg - > author ( ) . get ( ) ; <nl> } ( ) ; <nl> - const auto name = [ & ] { <nl> - if ( replyToVia & & from - > isUser ( ) ) { <nl> - return from - > asUser ( ) - > firstName ; <nl> - } <nl> - return App : : peerName ( from ) ; <nl> - } ( ) ; <nl> + const auto name = ( replyToVia & & from - > isUser ( ) ) <nl> + ? from - > asUser ( ) - > firstName <nl> + : from - > name ; <nl> replyToName . setText ( st : : fwdTextStyle , name , Ui : : NameTextOptions ( ) ) ; <nl> replyToVersion = replyToMsg - > author ( ) - > nameVersion ; <nl> bool hasPreview = replyToMsg - > media ( ) ? replyToMsg - > media ( ) - > hasReplyPreview ( ) : false ; <nl> mmm a / Telegram / SourceFiles / history / history_message . cpp <nl> ppp b / Telegram / SourceFiles / history / history_message . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_media_types . h " <nl> # include " data / data_channel . h " <nl> # include " data / data_user . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_history . h " <nl> void FastShareMessage ( not_null < HistoryItem * > item ) { <nl> } <nl> } ; <nl> auto submitCallback = [ = ] ( <nl> - QVector < PeerData * > & & result , <nl> + std : : vector < not_null < PeerData * > > & & result , <nl> TextWithTags & & comment , <nl> Api : : SendOptions options ) { <nl> if ( ! data - > requests . empty ( ) ) { <nl> void FastShareMessage ( not_null < HistoryItem * > item ) { <nl> auto text = TextWithEntities ( ) ; <nl> if ( result . size ( ) > 1 ) { <nl> text . append ( <nl> - Ui : : Text : : Bold ( App : : peerName ( error . second ) ) <nl> + Ui : : Text : : Bold ( error . second - > name ) <nl> ) . append ( " \ n \ n " ) ; <nl> } <nl> text . append ( error . first ) ; <nl> QString HistoryMessage : : notificationHeader ( ) const { <nl> if ( out ( ) & & isFromScheduled ( ) & & ! _history - > peer - > isSelf ( ) ) { <nl> return tr : : lng_from_you ( tr : : now ) ; <nl> } else if ( ! _history - > peer - > isUser ( ) & & ! isPost ( ) ) { <nl> - return App : : peerName ( from ( ) ) ; <nl> + return from ( ) - > name ; <nl> } <nl> return QString ( ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / history / history_service . cpp <nl> ppp b / Telegram / SourceFiles / history / history_service . cpp <nl> void HistoryService : : setMessageByAction ( const MTPmessageAction & action ) { <nl> result . text = tr : : lng_action_secure_values_sent ( <nl> tr : : now , <nl> lt_user , <nl> - textcmdLink ( 1 , App : : peerName ( history ( ) - > peer ) ) , <nl> + textcmdLink ( 1 , history ( ) - > peer - > name ) , <nl> lt_documents , <nl> documents . join ( " , " ) ) ; <nl> return result ; <nl> mmm a / Telegram / SourceFiles / history / history_widget . cpp <nl> ppp b / Telegram / SourceFiles / history / history_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " support / support_common . h " <nl> # include " support / support_autocomplete . h " <nl> # include " dialogs / dialogs_key . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_window . h " <nl> void HistoryWidget : : onMentionInsert ( UserData * user ) { <nl> if ( user - > username . isEmpty ( ) ) { <nl> replacement = user - > firstName ; <nl> if ( replacement . isEmpty ( ) ) { <nl> - replacement = App : : peerName ( user ) ; <nl> + replacement = user - > name ; <nl> } <nl> entityTag = PrepareMentionTag ( user ) ; <nl> } else { <nl> void HistoryWidget : : sendFileConfirmed ( <nl> <nl> const auto messageFromId = channelPost ? 0 : session ( ) . userId ( ) ; <nl> const auto messagePostAuthor = channelPost <nl> - ? App : : peerName ( session ( ) . user ( ) ) <nl> + ? session ( ) . user ( ) - > name <nl> : QString ( ) ; <nl> <nl> if ( file - > type = = SendMediaType : : Photo ) { <nl> void HistoryWidget : : updateForwardingTexts ( ) { <nl> if ( ! insertedPeers . contains ( from ) ) { <nl> insertedPeers . emplace ( from ) ; <nl> names . push_back ( from - > shortName ( ) ) ; <nl> - fullname = App : : peerName ( from ) ; <nl> + fullname = from - > name ; <nl> } <nl> version + = from - > nameVersion ; <nl> } else if ( const auto info = item - > hiddenForwardedInfo ( ) ) { <nl> void HistoryWidget : : updateReplyToName ( ) { <nl> } ( ) ; <nl> _replyToName . setText ( <nl> st : : msgNameStyle , <nl> - App : : peerName ( from ) , <nl> + from - > name , <nl> Ui : : NameTextOptions ( ) ) ; <nl> _replyToNameVersion = ( _replyEditMsg ? _replyEditMsg : _kbReplyTo ) - > author ( ) - > nameVersion ; <nl> } <nl> mmm a / Telegram / SourceFiles / history / history_widget . h <nl> ppp b / Telegram / SourceFiles / history / history_widget . h <nl> struct UploadedThumbDocument ; <nl> namespace HistoryView { <nl> class TopBarWidget ; <nl> class ContactStatus ; <nl> + class Element ; <nl> } / / namespace HistoryView <nl> <nl> class DragArea ; <nl> mmm a / Telegram / SourceFiles / history / view / history_view_compose_controls . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_compose_controls . cpp <nl> For license and copyright information please follow this link : <nl> # include " chat_helpers / emoji_suggestions_widget . h " <nl> # include " window / window_session_controller . h " <nl> # include " inline_bots / inline_results_widget . h " <nl> + # include " facades . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / history_view_compose_controls . h <nl> ppp b / Telegram / SourceFiles / history / view / history_view_compose_controls . h <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / animations . h " <nl> # include " chat_helpers / tabbed_selector . h " <nl> <nl> + class History ; <nl> + <nl> namespace ChatHelpers { <nl> class TabbedPanel ; <nl> class TabbedSelector ; <nl> mmm a / Telegram / SourceFiles / history / view / history_view_contact_status . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_contact_status . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / confirm_box . h " <nl> # include " boxes / generic_box . h " / / window - > show ( Box ( InitMethod ( ) ) ) <nl> # include " boxes / peers / edit_contact_box . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_boxes . h " <nl> <nl> void ContactStatus : : setupShareHandler ( not_null < UserData * > user ) { <nl> Ui : : Text : : WithEntities ( <nl> App : : formatPhone ( user - > session ( ) . user ( ) - > phone ( ) ) ) , <nl> lt_user , <nl> - Ui : : Text : : Bold ( App : : peerName ( user ) ) , <nl> + Ui : : Text : : Bold ( user - > name ) , <nl> Ui : : Text : : WithEntities ) , <nl> tr : : lng_box_ok ( tr : : now ) , <nl> share ) ) ; <nl> mmm a / Telegram / SourceFiles / history / view / history_view_context_menu . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_context_menu . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " / / App : : wnd ( ) - > sessionController <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> <nl> # include < QtGui / QGuiApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / history / view / history_view_element . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_element . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_media_types . h " <nl> # include " lang / lang_keys . h " <nl> # include " layout . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / history_view_element . h <nl> ppp b / Telegram / SourceFiles / history / view / history_view_element . h <nl> For license and copyright information please follow this link : <nl> # include " base / runtime_composer . h " <nl> # include " base / flags . h " <nl> <nl> + class History ; <nl> class HistoryBlock ; <nl> class HistoryItem ; <nl> class HistoryMessage ; <nl> mmm a / Telegram / SourceFiles / history / view / history_view_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_list_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_media_types . h " <nl> # include " data / data_document . h " <nl> # include " data / data_peer . h " <nl> + # include " facades . h " <nl> # include " styles / style_history . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> mmm a / Telegram / SourceFiles / history / view / history_view_message . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_message . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " window / window_session_controller . h " <nl> # include " layout . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_dialogs . h " <nl> mmm a / Telegram / SourceFiles / history / view / history_view_scheduled_section . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_scheduled_section . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / localstorage . h " <nl> # include " inline_bots / inline_bot_result . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / history / view / history_view_service_message . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_service_message . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " layout . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / history_view_top_bar_widget . cpp <nl> ppp b / Telegram / SourceFiles / history / view / history_view_top_bar_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " support / support_helper . h " <nl> # include " observer_peer . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_history . h " <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_contact . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_contact . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " data / data_media_types . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_document . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_document . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_document . h " <nl> # include " data / data_media_types . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_game . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_game . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_game . h " <nl> # include " data / data_media_types . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_gif . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_gif . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / image / image . h " <nl> # include " data / data_session . h " <nl> # include " data / data_document . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_gif . h <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_gif . h <nl> For license and copyright information please follow this link : <nl> # pragma once <nl> <nl> # include " history / view / media / history_view_file . h " <nl> + # include " media / clip / media_clip_reader . h " <nl> <nl> struct HistoryMessageVia ; <nl> struct HistoryMessageReply ; <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_invoice . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_invoice . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / view / media / history_view_media_common . h " <nl> # include " ui / text_options . h " <nl> # include " data / data_media_types . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_location . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_location . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / text_options . h " <nl> # include " data / data_file_origin . h " <nl> # include " data / data_location . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_media . h <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_media . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " history / view / history_view_object . h " <nl> <nl> + class History ; <nl> struct HistoryMessageEdited ; <nl> struct TextSelection ; <nl> <nl> enum class CursorState : char ; <nl> enum class InfoDisplayType : char ; <nl> struct TextState ; <nl> struct StateRequest ; <nl> + class Element ; <nl> <nl> enum class MediaInBubbleState { <nl> None , <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_media_unwrapped . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_media_unwrapped . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / history_item . h " <nl> # include " history / history_item_components . h " <nl> # include " layout . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_photo . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_photo . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_photo . h " <nl> # include " data / data_file_origin . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_theme_document . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_theme_document . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_file_origin . h " <nl> # include " base / qthelp_url . h " <nl> # include " window / themes / window_theme . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_video . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_video . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_document . h " <nl> # include " data / data_file_origin . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / history / view / media / history_view_web_page . cpp <nl> ppp b / Telegram / SourceFiles / history / view / media / history_view_web_page . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_web_page . h " <nl> # include " data / data_photo . h " <nl> # include " data / data_file_origin . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace HistoryView { <nl> mmm a / Telegram / SourceFiles / info / info_layer_widget . cpp <nl> ppp b / Telegram / SourceFiles / info / info_layer_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_session_controller . h " <nl> # include " window / main_window . h " <nl> # include " main / main_session . h " <nl> + # include " boxes / abstract_box . h " <nl> + # include " app . h " <nl> # include " styles / style_info . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_boxes . h " <nl> mmm a / Telegram / SourceFiles / info / info_wrap_widget . cpp <nl> ppp b / Telegram / SourceFiles / info / info_wrap_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " mainwidget . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> # include " styles / style_info . h " <nl> # include " styles / style_profile . h " <nl> <nl> mmm a / Telegram / SourceFiles / info / media / info_media_list_widget . cpp <nl> ppp b / Telegram / SourceFiles / info / media / info_media_list_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / peer_list_controllers . h " <nl> # include " boxes / confirm_box . h " <nl> # include " core / file_utilities . h " <nl> + # include " facades . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / info / profile / info_profile_actions . cpp <nl> ppp b / Telegram / SourceFiles / info / profile / info_profile_actions . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " core / application . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " styles / style_info . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / info / profile / info_profile_values . cpp <nl> ppp b / Telegram / SourceFiles / info / profile / info_profile_values . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_chat . h " <nl> # include " data / data_user . h " <nl> # include " data / data_session . h " <nl> - <nl> # include " boxes / peers / edit_peer_permissions_box . h " <nl> + # include " app . h " <nl> <nl> namespace Info { <nl> namespace Profile { <nl> rpl : : producer < TextWithEntities > NameValue ( not_null < PeerData * > peer ) { <nl> peer , <nl> Notify : : PeerUpdate : : Flag : : NameChanged <nl> ) | rpl : : map ( [ = ] { <nl> - return App : : peerName ( peer ) ; <nl> + return peer - > name ; <nl> } ) | Ui : : Text : : ToWithEntities ( ) ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_layout_internal . cpp <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_layout_internal . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> <nl> namespace InlineBots { <nl> namespace Layout { <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_layout_internal . h <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_layout_internal . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " base / flags . h " <nl> # include " inline_bots / inline_bot_layout_item . h " <nl> + # include " media / clip / media_clip_reader . h " <nl> # include " ui / effects / animations . h " <nl> # include " ui / effects / radial_animation . h " <nl> # include " ui / text / text . h " <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_layout_item . h <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_layout_item . h <nl> For license and copyright information please follow this link : <nl> # include " ui / text / text . h " <nl> <nl> namespace InlineBots { <nl> + <nl> class Result ; <nl> <nl> namespace Layout { <nl> <nl> + class ItemBase ; <nl> + <nl> class PaintContext : public PaintContextBase { <nl> public : <nl> PaintContext ( crl : : time ms , bool selecting , bool paused , bool lastRow ) <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_result . h <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_result . h <nl> For license and copyright information please follow this link : <nl> # pragma once <nl> <nl> class FileLoader ; <nl> + class History ; <nl> <nl> namespace Data { <nl> class LocationPoint ; <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_send_data . cpp <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_send_data . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_keys . h " <nl> # include " history / history . h " <nl> # include " data / data_channel . h " <nl> + # include " app . h " <nl> <nl> namespace InlineBots { <nl> namespace internal { <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_bot_send_data . h <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_bot_send_data . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " history / history_location_manager . h " <nl> <nl> + class History ; <nl> + <nl> namespace InlineBots { <nl> <nl> class Result ; <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_results_widget . cpp <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_results_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / labels . h " <nl> # include " observer_peer . h " <nl> # include " history / view / history_view_cursor_state . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> <nl> mmm a / Telegram / SourceFiles / inline_bots / inline_results_widget . h <nl> ppp b / Telegram / SourceFiles / inline_bots / inline_results_widget . h <nl> For license and copyright information please follow this link : <nl> # include " mtproto / sender . h " <nl> # include " inline_bots / inline_bot_layout_item . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> class ScrollArea ; <nl> class IconButton ; <nl> mmm a / Telegram / SourceFiles / intro / introcode . cpp <nl> ppp b / Telegram / SourceFiles / intro / introcode . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / labels . h " <nl> # include " ui / text / text_utilities . h " <nl> # include " boxes / confirm_box . h " <nl> + # include " app . h " <nl> # include " styles / style_intro . h " <nl> <nl> namespace Intro { <nl> mmm a / Telegram / SourceFiles / intro / introwidget . cpp <nl> ppp b / Telegram / SourceFiles / intro / introwidget . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / themes / window_theme . h " <nl> # include " lang / lang_cloud_manager . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_intro . h " <nl> # include " styles / style_window . h " <nl> mmm a / Telegram / SourceFiles / lang / lang_cloud_manager . cpp <nl> ppp b / Telegram / SourceFiles / lang / lang_cloud_manager . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_file_parser . h " <nl> # include " core / file_utilities . h " <nl> # include " core / click_handler_types . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> <nl> namespace Lang { <nl> mmm a / Telegram / SourceFiles / layout . cpp <nl> ppp b / Telegram / SourceFiles / layout . cpp <nl> For license and copyright information please follow this link : <nl> # include " media / audio / media_audio . h " <nl> # include " storage / localstorage . h " <nl> # include " history / view / history_view_cursor_state . h " <nl> + # include " app . h " <nl> <nl> QString formatSizeText ( qint64 size ) { <nl> if ( size > = 1024 * 1024 ) { / / more than 1 mb <nl> mmm a / Telegram / SourceFiles / layout . h <nl> ppp b / Telegram / SourceFiles / layout . h <nl> struct TextState ; <nl> struct StateRequest ; <nl> } / / namespace HistoryView <nl> <nl> + enum RoundCorners : int ; <nl> + <nl> constexpr auto FullSelection = TextSelection { 0xFFFF , 0xFFFF } ; <nl> <nl> inline bool IsSubGroupSelection ( TextSelection selection ) { <nl> mmm a / Telegram / SourceFiles / main / main_account . cpp <nl> ppp b / Telegram / SourceFiles / main / main_account . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " observer_peer . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> <nl> namespace Main { <nl> <nl> mmm a / Telegram / SourceFiles / main / main_app_config . cpp <nl> ppp b / Telegram / SourceFiles / main / main_app_config . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> <nl> namespace Main { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / main / main_session . cpp <nl> ppp b / Telegram / SourceFiles / main / main_session . cpp <nl> For license and copyright information please follow this link : <nl> # include " calls / calls_instance . h " <nl> # include " support / support_helper . h " <nl> # include " observer_peer . h " <nl> + # include " facades . h " <nl> <nl> namespace Main { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / mainwidget . cpp <nl> ppp b / Telegram / SourceFiles / mainwidget . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / storage_facade . h " <nl> # include " storage / storage_shared_media . h " <nl> # include " storage / storage_user_photos . h " <nl> + # include " app . h " <nl> + # include " facades . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_boxes . h " <nl> void MainWidget : : feedUpdate ( const MTPUpdate & update ) { <nl> <nl> } <nl> } <nl> + <nl> + namespace App { <nl> + <nl> + MainWidget * main ( ) { <nl> + if ( const auto window = wnd ( ) ) { <nl> + return window - > mainWidget ( ) ; <nl> + } <nl> + return nullptr ; <nl> + } <nl> + <nl> + } / / namespace App <nl> mmm a / Telegram / SourceFiles / mainwidget . h <nl> ppp b / Telegram / SourceFiles / mainwidget . h <nl> class ConfirmBox ; <nl> class HistoryWidget ; <nl> class StackItem ; <nl> struct FileLoadResult ; <nl> + class History ; <nl> <nl> namespace Api { <nl> struct SendAction ; <nl> struct RowDescriptor ; <nl> class Row ; <nl> class Key ; <nl> class Widget ; <nl> + enum class Mode ; <nl> } / / namespace Dialogs <nl> <nl> namespace Media { <nl> public slots : <nl> int _firstColumnResizingShift = 0 ; <nl> <nl> } ; <nl> + <nl> + namespace App { <nl> + MainWidget * main ( ) ; <nl> + } / / namespace App <nl> mmm a / Telegram / SourceFiles / mainwindow . cpp <nl> ppp b / Telegram / SourceFiles / mainwindow . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / themes / window_theme_warning . h " <nl> # include " window / window_lock_widgets . h " <nl> # include " window / window_main_menu . h " <nl> + # include " window / window_controller . h " / / App : : wnd . <nl> # include " window / window_session_controller . h " <nl> + # include " window / window_media_preview . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QWindow > <nl> # include < QtCore / QCoreApplication > <nl> MainWindow : : ~ MainWindow ( ) { <nl> delete trayIcon ; <nl> delete trayIconMenu ; <nl> } <nl> + <nl> + namespace App { <nl> + <nl> + MainWindow * wnd ( ) { <nl> + return ( Core : : IsAppLaunched ( ) & & Core : : App ( ) . activeWindow ( ) ) <nl> + ? Core : : App ( ) . activeWindow ( ) - > widget ( ) . get ( ) <nl> + : nullptr ; <nl> + } <nl> + <nl> + } / / namespace App <nl> mmm a / Telegram / SourceFiles / mainwindow . h <nl> ppp b / Telegram / SourceFiles / mainwindow . h <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_specific . h " <nl> # include " platform / platform_main_window . h " <nl> # include " base / unique_qptr . h " <nl> + # include " window / layer_widget . h " <nl> + # include " ui / effects / animation_value . h " <nl> <nl> class MainWidget ; <nl> class BoxContent ; <nl> class ClearManager ; <nl> } / / namespace Local <nl> <nl> namespace Window { <nl> + class MediaPreviewWidget ; <nl> class LayerWidget ; <nl> class LayerStackWidget ; <nl> class SectionMemento ; <nl> public slots : <nl> object_ptr < Intro : : Widget > _intro = { nullptr } ; <nl> object_ptr < MainWidget > _main = { nullptr } ; <nl> base : : unique_qptr < Window : : LayerStackWidget > _layer ; <nl> - object_ptr < MediaPreviewWidget > _mediaPreview = { nullptr } ; <nl> + object_ptr < Window : : MediaPreviewWidget > _mediaPreview = { nullptr } ; <nl> <nl> object_ptr < Window : : Theme : : WarningWidget > _testingThemeWarning = { nullptr } ; <nl> <nl> Local : : ClearManager * _clearManager = nullptr ; <nl> <nl> } ; <nl> + <nl> + namespace App { <nl> + MainWindow * wnd ( ) ; <nl> + } / / namespace App <nl> mmm a / Telegram / SourceFiles / media / audio / media_audio . cpp <nl> ppp b / Telegram / SourceFiles / media / audio / media_audio . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_audio . h " <nl> # include " core / application . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < AL / al . h > <nl> # include < AL / alc . h > <nl> mmm a / Telegram / SourceFiles / media / audio / media_audio . h <nl> ppp b / Telegram / SourceFiles / media / audio / media_audio . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + # include " ui / effects / animation_value . h " <nl> # include " storage / localimageloader . h " <nl> # include " base / bytes . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Media { <nl> struct ExternalSoundData ; <nl> struct ExternalSoundPart ; <nl> mmm a / Telegram / SourceFiles / media / audio / media_audio_capture . h <nl> ppp b / Telegram / SourceFiles / media / audio / media_audio_capture . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> struct AVFrame ; <nl> <nl> namespace Media { <nl> mmm a / Telegram / SourceFiles / media / clip / media_clip_reader . cpp <nl> ppp b / Telegram / SourceFiles / media / clip / media_clip_reader . cpp <nl> void Finish ( ) { <nl> } <nl> } <nl> <nl> + Reader * const ReaderPointer : : BadPointer = SharedMemoryLocation < Reader , 0 > ( ) ; <nl> + <nl> + ReaderPointer : : ~ ReaderPointer ( ) { <nl> + if ( valid ( ) ) { <nl> + delete _pointer ; <nl> + } <nl> + _pointer = nullptr ; <nl> + } <nl> + <nl> } / / namespace Clip <nl> } / / namespace Media <nl> mmm a / Telegram / SourceFiles / media / clip / media_clip_reader . h <nl> ppp b / Telegram / SourceFiles / media / clip / media_clip_reader . h <nl> For license and copyright information please follow this link : <nl> # include " storage / localimageloader . h " <nl> # include " ui / image / image_prepare . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> class FileLocation ; <nl> <nl> namespace Media { <nl> enum ReaderSteps { <nl> WaitingForFirstFrameStep = - 1 , / / before ReaderPrivate got the frame request and started waiting for the 1 - 2 delay <nl> } ; <nl> <nl> + enum Notification { <nl> + NotificationReinit , <nl> + NotificationRepaint , <nl> + } ; <nl> + <nl> class ReaderPrivate ; <nl> class Reader { <nl> public : <nl> class Reader { <nl> <nl> } ; <nl> <nl> + class ReaderPointer { <nl> + public : <nl> + ReaderPointer ( std : : nullptr_t = nullptr ) { <nl> + } <nl> + explicit ReaderPointer ( Reader * pointer ) : _pointer ( pointer ) { <nl> + } <nl> + ReaderPointer ( const ReaderPointer & other ) = delete ; <nl> + ReaderPointer & operator = ( const ReaderPointer & other ) = delete ; <nl> + ReaderPointer ( ReaderPointer & & other ) : _pointer ( base : : take ( other . _pointer ) ) { <nl> + } <nl> + ReaderPointer & operator = ( ReaderPointer & & other ) { <nl> + swap ( other ) ; <nl> + return * this ; <nl> + } <nl> + void swap ( ReaderPointer & other ) { <nl> + qSwap ( _pointer , other . _pointer ) ; <nl> + } <nl> + Reader * get ( ) const { <nl> + return valid ( ) ? _pointer : nullptr ; <nl> + } <nl> + Reader * operator - > ( ) const { <nl> + return get ( ) ; <nl> + } <nl> + void setBad ( ) { <nl> + reset ( ) ; <nl> + _pointer = BadPointer ; <nl> + } <nl> + void reset ( ) { <nl> + ReaderPointer temp ; <nl> + swap ( temp ) ; <nl> + } <nl> + bool isBad ( ) const { <nl> + return ( _pointer = = BadPointer ) ; <nl> + } <nl> + bool valid ( ) const { <nl> + return _pointer & & ! isBad ( ) ; <nl> + } <nl> + explicit operator bool ( ) const { <nl> + return valid ( ) ; <nl> + } <nl> + static inline ReaderPointer Bad ( ) { <nl> + ReaderPointer result ; <nl> + result . setBad ( ) ; <nl> + return result ; <nl> + } <nl> + ~ ReaderPointer ( ) ; <nl> + <nl> + private : <nl> + Reader * _pointer = nullptr ; <nl> + static Reader * const BadPointer ; <nl> + <nl> + } ; <nl> + <nl> template < typename . . . Args > <nl> inline ReaderPointer MakeReader ( Args & & . . . args ) { <nl> return ReaderPointer ( new Reader ( std : : forward < Args > ( args ) . . . ) ) ; <nl> mmm a / Telegram / SourceFiles / media / player / media_player_float . cpp <nl> ppp b / Telegram / SourceFiles / media / player / media_player_float . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_session_controller . h " <nl> # include " window / section_widget . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_media_player . h " <nl> # include " styles / style_history . h " <nl> <nl> mmm a / Telegram / SourceFiles / media / player / media_player_instance . cpp <nl> ppp b / Telegram / SourceFiles / media / player / media_player_instance . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_account . h " / / Account : : sessionValue . <nl> # include " mainwindow . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> <nl> namespace Media { <nl> namespace Player { <nl> mmm a / Telegram / SourceFiles / media / player / media_player_panel . cpp <nl> ppp b / Telegram / SourceFiles / media / player / media_player_panel . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / scroll_area . h " <nl> # include " mainwindow . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> # include " styles / style_overview . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_media_player . h " <nl> mmm a / Telegram / SourceFiles / media / player / media_player_volume_controller . cpp <nl> ppp b / Telegram / SourceFiles / media / player / media_player_volume_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " styles / style_widgets . h " <nl> # include " mainwindow . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Media { <nl> namespace Player { <nl> mmm a / Telegram / SourceFiles / media / player / media_player_volume_controller . h <nl> ppp b / Telegram / SourceFiles / media / player / media_player_volume_controller . h <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / animations . h " <nl> # include " ui / rp_widget . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> class IconButton ; <nl> class MediaSlider ; <nl> mmm a / Telegram / SourceFiles / media / player / media_player_widget . cpp <nl> ppp b / Telegram / SourceFiles / media / player / media_player_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_specific . h " <nl> # include " data / data_document . h " <nl> # include " data / data_session . h " <nl> + # include " data / data_peer . h " <nl> # include " ui / widgets / labels . h " <nl> # include " ui / widgets / continuous_sliders . h " <nl> # include " ui / widgets / shadow . h " <nl> For license and copyright information please follow this link : <nl> # include " storage / localstorage . h " <nl> # include " layout . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> <nl> namespace Media { <nl> namespace Player { <nl> void Widget : : handleSongChange ( ) { <nl> TextWithEntities textWithEntities ; <nl> if ( document - > isVoiceMessage ( ) | | document - > isVideoMessage ( ) ) { <nl> if ( const auto item = Auth ( ) . data ( ) . message ( current . contextId ( ) ) ) { <nl> - const auto name = App : : peerName ( item - > fromOriginal ( ) ) ; <nl> + const auto name = item - > fromOriginal ( ) - > name ; <nl> const auto date = [ item ] { <nl> const auto parsed = ItemDateTime ( item ) ; <nl> const auto date = parsed . date ( ) ; <nl> mmm a / Telegram / SourceFiles / media / streaming / media_streaming_common . h <nl> ppp b / Telegram / SourceFiles / media / streaming / media_streaming_common . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + enum class ImageRoundRadius ; <nl> + <nl> namespace Media { <nl> <nl> inline constexpr auto kTimeUnknown = std : : numeric_limits < crl : : time > : : min ( ) ; <nl> mmm a / Telegram / SourceFiles / media / view / media_view_group_thumbs . cpp <nl> ppp b / Telegram / SourceFiles / media / view / media_view_group_thumbs . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / view / media / history_view_media . h " <nl> # include " ui / image / image . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> # include " styles / style_mediaview . h " <nl> <nl> namespace Media { <nl> mmm a / Telegram / SourceFiles / media / view / media_view_overlay_widget . cpp <nl> ppp b / Telegram / SourceFiles / media / view / media_view_overlay_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " layout . h " <nl> # include " storage / file_download . h " <nl> # include " calls / calls_instance . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_mediaview . h " <nl> # include " styles / style_history . h " <nl> <nl> void OverlayWidget : : refreshFromLabel ( HistoryItem * item ) { <nl> _fromName = info - > name ; <nl> } else { <nl> Assert ( _from ! = nullptr ) ; <nl> - _fromName = App : : peerName ( <nl> - _from - > migrateTo ( ) ? _from - > migrateTo ( ) : _from ) ; <nl> + const auto from = _from - > migrateTo ( ) ? _from - > migrateTo ( ) : _from ; <nl> + _fromName = from - > name ; <nl> } <nl> } else { <nl> _from = _user ; <nl> - _fromName = _user ? App : : peerName ( _user ) : QString ( ) ; <nl> + _fromName = _user ? _user - > name : QString ( ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / media / view / media_view_playback_controls . cpp <nl> ppp b / Telegram / SourceFiles / media / view / media_view_playback_controls . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / buttons . h " <nl> # include " lang / lang_keys . h " <nl> # include " layout . h " <nl> + # include " app . h " <nl> # include " styles / style_mediaview . h " <nl> <nl> namespace Media { <nl> mmm a / Telegram / SourceFiles / mtproto / config_loader . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / config_loader . cpp <nl> For license and copyright information please follow this link : <nl> # include " mtproto / dc_options . h " <nl> # include " mtproto / mtp_instance . h " <nl> # include " mtproto / special_config_request . h " <nl> + # include " facades . h " <nl> <nl> namespace MTP { <nl> namespace internal { <nl> mmm a / Telegram / SourceFiles / mtproto / dedicated_file_loader . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / dedicated_file_loader . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " core / application . h " <nl> # include " main / main_account . h " / / Account : : sessionChanges . <nl> + # include " facades . h " <nl> <nl> namespace MTP { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / mtproto / mtp_instance . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / mtp_instance . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_instance . h " <nl> # include " lang / lang_cloud_manager . h " <nl> # include " base / timer . h " <nl> + # include " facades . h " <nl> <nl> namespace MTP { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / mtproto / session . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / session . cpp <nl> For license and copyright information please follow this link : <nl> # include " mtproto / auth_key . h " <nl> # include " base / unixtime . h " <nl> # include " core / crash_reports . h " <nl> + # include " facades . h " <nl> <nl> namespace MTP { <nl> namespace internal { <nl> mmm a / Telegram / SourceFiles / mtproto / session . h <nl> ppp b / Telegram / SourceFiles / mtproto / session . h <nl> For license and copyright information please follow this link : <nl> # include " base / timer . h " <nl> # include " mtproto / rpc_sender . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace MTP { <nl> <nl> class Instance ; <nl> mmm a / Telegram / SourceFiles / mtproto / special_config_request . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / special_config_request . cpp <nl> For license and copyright information please follow this link : <nl> # include " mtproto / auth_key . h " <nl> # include " base / unixtime . h " <nl> # include " base / openssl_help . h " <nl> + # include " facades . h " <nl> <nl> # include < QtCore / QJsonDocument > <nl> # include < QtCore / QJsonArray > <nl> mmm a / Telegram / SourceFiles / observer_peer . cpp <nl> ppp b / Telegram / SourceFiles / observer_peer . cpp <nl> For license and copyright information please follow this link : <nl> # include " observer_peer . h " <nl> <nl> # include " base / observer . h " <nl> + # include " facades . h " <nl> <nl> namespace Notify { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / overview / overview_layout . cpp <nl> ppp b / Telegram / SourceFiles / overview / overview_layout . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / round_checkbox . h " <nl> # include " ui / image / image . h " <nl> # include " ui / text_options . h " <nl> + # include " app . h " <nl> <nl> namespace Overview { <nl> namespace Layout { <nl> void Voice : : updateName ( ) { <nl> auto version = 0 ; <nl> if ( const auto forwarded = parent ( ) - > Get < HistoryMessageForwarded > ( ) ) { <nl> if ( parent ( ) - > fromOriginal ( ) - > isChannel ( ) ) { <nl> - _name . setText ( st : : semiboldTextStyle , tr : : lng_forwarded_channel ( tr : : now , lt_channel , App : : peerName ( parent ( ) - > fromOriginal ( ) ) ) , Ui : : NameTextOptions ( ) ) ; <nl> + _name . setText ( st : : semiboldTextStyle , tr : : lng_forwarded_channel ( tr : : now , lt_channel , parent ( ) - > fromOriginal ( ) - > name ) , Ui : : NameTextOptions ( ) ) ; <nl> } else { <nl> - _name . setText ( st : : semiboldTextStyle , tr : : lng_forwarded ( tr : : now , lt_user , App : : peerName ( parent ( ) - > fromOriginal ( ) ) ) , Ui : : NameTextOptions ( ) ) ; <nl> + _name . setText ( st : : semiboldTextStyle , tr : : lng_forwarded ( tr : : now , lt_user , parent ( ) - > fromOriginal ( ) - > name ) , Ui : : NameTextOptions ( ) ) ; <nl> } <nl> } else { <nl> - _name . setText ( st : : semiboldTextStyle , App : : peerName ( parent ( ) - > from ( ) ) , Ui : : NameTextOptions ( ) ) ; <nl> + _name . setText ( st : : semiboldTextStyle , parent ( ) - > from ( ) - > name , Ui : : NameTextOptions ( ) ) ; <nl> } <nl> version = parent ( ) - > fromOriginal ( ) - > nameVersion ; <nl> _nameVersion = version ; <nl> mmm a / Telegram / SourceFiles / passport / passport_form_controller . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_form_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / localstorage . h " <nl> # include " storage / file_upload . h " <nl> # include " storage / file_download . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QJsonDocument > <nl> # include < QtCore / QJsonArray > <nl> mmm a / Telegram / SourceFiles / passport / passport_panel . h <nl> ppp b / Telegram / SourceFiles / passport / passport_panel . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + # include " window / layer_widget . h " <nl> + <nl> + class BoxContent ; <nl> + <nl> namespace Ui { <nl> class RpWidget ; <nl> class SeparatePanel ; <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_controller . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / update_checker . h " <nl> # include " data / data_countries . h " <nl> # include " layout . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> <nl> namespace Passport { <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_edit_contact . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_edit_contact . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " main / main_session . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> # include " styles / style_passport . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_edit_contact . h <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_edit_contact . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " ui / rp_widget . h " <nl> <nl> + class BoxContent ; <nl> + <nl> namespace Ui { <nl> class MaskedInputField ; <nl> class PlainShadow ; <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_edit_document . h <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_edit_document . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " ui / rp_widget . h " <nl> <nl> + class BoxContent ; <nl> + <nl> namespace Ui { <nl> class InputField ; <nl> class ScrollArea ; <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_edit_scans . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_edit_scans . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / abstract_box . h " <nl> # include " storage / storage_media_prepare . h " <nl> # include " storage / file_upload . h " / / For Storage : : kUseBigFilesFrom . <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_passport . h " <nl> <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_form . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_form . cpp <nl> not_null < Ui : : RpWidget * > PanelForm : : setupContent ( ) { <nl> inner , <nl> object_ptr < Ui : : FlatLabel > ( <nl> inner , <nl> - tr : : lng_passport_request1 ( tr : : now , lt_bot , App : : peerName ( bot ) ) , <nl> + tr : : lng_passport_request1 ( tr : : now , lt_bot , bot - > name ) , <nl> st : : passportPasswordLabelBold ) ) , <nl> st : : passportFormAbout1Padding ) - > entity ( ) ; <nl> <nl> not_null < Ui : : RpWidget * > PanelForm : : setupContent ( ) { <nl> lt_policy , <nl> tr : : lng_passport_policy ( <nl> lt_bot , <nl> - rpl : : single ( App : : peerName ( bot ) ) <nl> + rpl : : single ( bot - > name ) <nl> ) | Ui : : Text : : ToLink ( policyUrl ) , <nl> lt_bot , <nl> rpl : : single ( ' @ ' + bot - > username ) | Ui : : Text : : ToWithEntities ( ) , <nl> mmm a / Telegram / SourceFiles / passport / passport_panel_password . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_panel_password . cpp <nl> PanelAskPassword : : PanelAskPassword ( <nl> tr : : lng_passport_request1 ( <nl> tr : : now , <nl> lt_bot , <nl> - App : : peerName ( _controller - > bot ( ) ) ) , <nl> + _controller - > bot ( ) - > name ) , <nl> st : : passportPasswordLabelBold ) <nl> , _about2 ( <nl> this , <nl> void PanelNoPassword : : setupContent ( ) { <nl> tr : : lng_passport_request1 ( <nl> tr : : now , <nl> lt_bot , <nl> - App : : peerName ( _controller - > bot ( ) ) ) , <nl> + _controller - > bot ( ) - > name ) , <nl> st : : passportPasswordLabelBold ) ) , <nl> st : : passportPasswordAbout1Padding ) - > entity ( ) ; <nl> <nl> mmm a / Telegram / SourceFiles / platform / linux / file_utilities_linux . cpp <nl> ppp b / Telegram / SourceFiles / platform / linux / file_utilities_linux . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / linux / linux_gdk_helper . h " <nl> # include " core / application . h " <nl> # include " mainwindow . h " <nl> + # include " boxes / abstract_box . h " <nl> # include " storage / localstorage . h " <nl> + # include " facades . h " <nl> <nl> # include < QtCore / QProcess > <nl> <nl> mmm a / Telegram / SourceFiles / platform / linux / main_window_linux . cpp <nl> ppp b / Telegram / SourceFiles / platform / linux / main_window_linux . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " lang / lang_keys . h " <nl> # include " storage / localstorage . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtDBus > <nl> # include < QtWidgets / QMenu > <nl> mmm a / Telegram / SourceFiles / platform / linux / main_window_linux . h <nl> ppp b / Telegram / SourceFiles / platform / linux / main_window_linux . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " platform / platform_main_window . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Platform { <nl> <nl> class MainWindow : public Window : : MainWindow { <nl> mmm a / Telegram / SourceFiles / platform / linux / notifications_manager_linux . cpp <nl> ppp b / Telegram / SourceFiles / platform / linux / notifications_manager_linux . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / linux / linux_libs . h " <nl> # include " history / history . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> <nl> namespace Platform { <nl> namespace Notifications { <nl> mmm a / Telegram / SourceFiles / platform / mac / mac_touchbar . mm <nl> ppp b / Telegram / SourceFiles / platform / mac / mac_touchbar . mm <nl> <nl> # include " window / window_session_controller . h " <nl> # include " ui / empty_userpic . h " <nl> # include " ui / widgets / input_fields . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> NSImage * qt_mac_create_nsimage ( const QPixmap & pm ) ; <nl> <nl> mmm a / Telegram / SourceFiles / platform / mac / main_window_mac . h <nl> ppp b / Telegram / SourceFiles / platform / mac / main_window_mac . h <nl> For license and copyright information please follow this link : <nl> # include " base / timer . h " <nl> <nl> # include < QtWidgets / QMenuBar > <nl> + # include < QtCore / QTimer > <nl> <nl> namespace Platform { <nl> <nl> mmm a / Telegram / SourceFiles / platform / mac / main_window_mac . mm <nl> ppp b / Telegram / SourceFiles / platform / mac / main_window_mac . mm <nl> <nl> # include " lang / lang_keys . h " <nl> # include " platform / mac / mac_utilities . h " <nl> # include " ui / widgets / input_fields . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / platform / mac / notifications_manager_mac . mm <nl> ppp b / Telegram / SourceFiles / platform / mac / notifications_manager_mac . mm <nl> <nl> # include " history / history . h " <nl> # include " ui / empty_userpic . h " <nl> # include " mainwindow . h " <nl> + # include " facades . h " <nl> # include " styles / style_window . h " <nl> <nl> # include < thread > <nl> mmm a / Telegram / SourceFiles / platform / mac / specific_mac . mm <nl> ppp b / Telegram / SourceFiles / platform / mac / specific_mac . mm <nl> <nl> # include " mainwindow . h " <nl> # include " history / history_location_manager . h " <nl> # include " platform / mac / mac_utilities . h " <nl> + # include " facades . h " <nl> <nl> # include < QtGui / QDesktopServices > <nl> # include < QtWidgets / QApplication > <nl> mmm a / Telegram / SourceFiles / platform / mac / window_title_mac . mm <nl> ppp b / Telegram / SourceFiles / platform / mac / window_title_mac . mm <nl> <nl> # include " styles / style_window . h " <nl> # include " styles / style_mediaview . h " <nl> # include " platform / platform_main_window . h " <nl> + # include " facades . h " <nl> <nl> # include < Cocoa / Cocoa . h > <nl> # include < CoreFoundation / CFURL . h > <nl> mmm a / Telegram / SourceFiles / platform / win / file_utilities_win . cpp <nl> ppp b / Telegram / SourceFiles / platform / win / file_utilities_win . cpp <nl> For license and copyright information please follow this link : <nl> # include " lang / lang_keys . h " <nl> # include " core / application . h " <nl> # include " core / crash_reports . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QFileDialog > <nl> # include < QtGui / QDesktopServices > <nl> mmm a / Telegram / SourceFiles / platform / win / main_window_win . cpp <nl> ppp b / Telegram / SourceFiles / platform / win / main_window_win . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / popup_menu . h " <nl> # include " window / themes / window_theme . h " <nl> # include " history / history . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QDesktopWidget > <nl> # include < QtWidgets / QStyleFactory > <nl> mmm a / Telegram / SourceFiles / platform / win / main_window_win . h <nl> ppp b / Telegram / SourceFiles / platform / win / main_window_win . h <nl> For license and copyright information please follow this link : <nl> # include " platform / win / wrapper_windows_h . h " <nl> # include " base / flags . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> class PopupMenu ; <nl> } / / namespace Ui <nl> mmm a / Telegram / SourceFiles / platform / win / notifications_manager_win . cpp <nl> ppp b / Telegram / SourceFiles / platform / win / notifications_manager_win . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / win / windows_dlls . h " <nl> # include " history / history . h " <nl> # include " mainwindow . h " <nl> + # include " facades . h " <nl> <nl> # include < Shobjidl . h > <nl> # include < shellapi . h > <nl> mmm a / Telegram / SourceFiles / platform / win / windows_event_filter . cpp <nl> ppp b / Telegram / SourceFiles / platform / win / windows_event_filter . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / sandbox . h " <nl> # include " mainwindow . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QWindow > <nl> <nl> mmm a / Telegram / SourceFiles / profile / profile_back_button . cpp <nl> ppp b / Telegram / SourceFiles / profile / profile_back_button . cpp <nl> For license and copyright information please follow this link : <nl> # include " profile / profile_back_button . h " <nl> <nl> / / # include " history / view / history_view_top_bar_widget . h " <nl> + # include " facades . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_profile . h " <nl> mmm a / Telegram / SourceFiles / profile / profile_block_group_members . cpp <nl> ppp b / Telegram / SourceFiles / profile / profile_block_group_members . cpp <nl> For license and copyright information please follow this link : <nl> # include " observer_peer . h " <nl> # include " main / main_session . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> <nl> namespace Profile { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / profile / profile_block_group_members . h <nl> ppp b / Telegram / SourceFiles / profile / profile_block_group_members . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " profile / profile_block_peer_list . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> class FlatLabel ; <nl> } / / namespace Ui <nl> mmm a / Telegram / SourceFiles / profile / profile_block_peer_list . cpp <nl> ppp b / Telegram / SourceFiles / profile / profile_block_peer_list . cpp <nl> void PeerListWidget : : paintItem ( Painter & p , int x , int y , Item * item , bool select <nl> if ( item - > name . isEmpty ( ) ) { <nl> item - > name . setText ( <nl> st : : msgNameStyle , <nl> - App : : peerName ( item - > peer ) , <nl> + item - > peer - > name , <nl> Ui : : NameTextOptions ( ) ) ; <nl> } <nl> int nameLeft = x + _st . namePosition . x ( ) ; <nl> mmm a / Telegram / SourceFiles / settings / settings_advanced . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_advanced . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " main / main_session . h " <nl> # include " layout . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_settings . h " <nl> <nl> namespace Settings { <nl> mmm a / Telegram / SourceFiles / settings / settings_calls . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_calls . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / continuous_sliders . h " <nl> # include " window / window_session_controller . h " <nl> # include " calls / calls_instance . h " <nl> + # include " facades . h " <nl> <nl> # ifdef slots <nl> # undef slots <nl> mmm a / Telegram / SourceFiles / settings / settings_chat . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_chat . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_settings . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / settings / settings_codes . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_codes . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / themes / window_theme . h " <nl> # include " window / themes / window_theme_editor . h " <nl> # include " media / audio / media_audio_track . h " <nl> + # include " facades . h " <nl> <nl> namespace Settings { <nl> <nl> mmm a / Telegram / SourceFiles / settings / settings_information . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_information . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_session_controller . h " <nl> # include " apiwrap . h " <nl> # include " core / file_utilities . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_settings . h " <nl> <nl> mmm a / Telegram / SourceFiles / settings / settings_intro . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_intro . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / buttons . h " <nl> # include " ui / widgets / scroll_area . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> # include " styles / style_settings . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_info . h " <nl> mmm a / Telegram / SourceFiles / settings / settings_main . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_main . cpp <nl> For license and copyright information please follow this link : <nl> # include " apiwrap . h " <nl> # include " window / window_session_controller . h " <nl> # include " core / file_utilities . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_settings . h " <nl> <nl> # include < QtGui / QDesktopServices > <nl> mmm a / Telegram / SourceFiles / settings / settings_notifications . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_notifications . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_settings . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_window . h " <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_controllers . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_controllers . cpp <nl> For license and copyright information please follow this link : <nl> # include " boxes / peer_list_controllers . h " <nl> # include " boxes / confirm_box . h " <nl> # include " settings / settings_privacy_security . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_settings . h " <nl> void ForwardsPrivacyController : : PaintForwardedTooltip ( <nl> const auto phrase = tr : : lng_forwarded ( <nl> tr : : now , <nl> lt_user , <nl> - App : : peerName ( view - > data ( ) - > history ( ) - > session ( ) . user ( ) ) ) ; <nl> + view - > data ( ) - > history ( ) - > session ( ) . user ( ) - > name ) ; <nl> const auto kReplacementPosition = QChar ( 0x0001 ) ; <nl> const auto possiblePosition = tr : : lng_forwarded ( <nl> tr : : now , <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_security . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_security . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " window / window_session_controller . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " styles / style_settings . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_security . h <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_security . h <nl> For license and copyright information please follow this link : <nl> # include " apiwrap . h " <nl> <nl> class EditPrivacyController ; <nl> + class BoxContent ; <nl> <nl> namespace Settings { <nl> <nl> mmm a / Telegram / SourceFiles / stdafx . h <nl> ppp b / Telegram / SourceFiles / stdafx . h <nl> For license and copyright information please follow this link : <nl> # include " base / flat_set . h " <nl> # include " base / flat_map . h " <nl> # include " base / weak_ptr . h " <nl> + # include " base / observer . h " <nl> <nl> # include " base / basic_types . h " <nl> # include " logs . h " <nl> For license and copyright information please follow this link : <nl> # include " styles / palette . h " <nl> # include " styles / style_basic . h " <nl> <nl> - # include " ui / animation . h " <nl> # include " ui / twidget . h " <nl> # include " ui / image / image_location . h " <nl> # include " ui / text / text . h " <nl> <nl> # include " data / data_types . h " <nl> - # include " app . h " <nl> - # include " facades . h " <nl> <nl> # endif / / __cplusplus <nl> mmm a / Telegram / SourceFiles / storage / file_download . cpp <nl> ppp b / Telegram / SourceFiles / storage / file_download . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / crash_reports . h " <nl> # include " base / bytes . h " <nl> # include " base / openssl_help . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Storage { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / storage / file_upload . h <nl> ppp b / Telegram / SourceFiles / storage / file_upload . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " api / api_common . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> class ApiWrap ; <nl> struct FileLoadResult ; <nl> struct SendMediaReady ; <nl> mmm a / Telegram / SourceFiles / storage / localimageloader . cpp <nl> ppp b / Telegram / SourceFiles / storage / localimageloader . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QBuffer > <nl> <nl> mmm a / Telegram / SourceFiles / storage / localstorage . cpp <nl> ppp b / Telegram / SourceFiles / storage / localstorage . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / flags . h " <nl> # include " data / data_session . h " <nl> # include " history / history . h " <nl> + # include " facades . h " <nl> <nl> # include < QtCore / QBuffer > <nl> # include < QtCore / QtEndian > <nl> mmm a / Telegram / SourceFiles / storage / localstorage . h <nl> ppp b / Telegram / SourceFiles / storage / localstorage . h <nl> For license and copyright information please follow this link : <nl> # include " storage / localimageloader . h " <nl> # include " main / main_session . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> + class History ; <nl> + <nl> namespace Data { <nl> class WallPaper ; <nl> } / / namespace Data <nl> mmm a / Telegram / SourceFiles / storage / serialize_common . cpp <nl> ppp b / Telegram / SourceFiles / storage / serialize_common . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_user . h " <nl> # include " data / data_session . h " <nl> # include " ui / image / image . h " <nl> + # include " app . h " <nl> <nl> namespace Serialize { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / storage / storage_media_prepare . cpp <nl> ppp b / Telegram / SourceFiles / storage / storage_media_prepare . cpp <nl> For license and copyright information please follow this link : <nl> # include " storage / localimageloader . h " <nl> # include " core / mime_type . h " <nl> # include " ui / image / image_prepare . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QSemaphore > <nl> # include < QtCore / QMimeData > <nl> mmm a / Telegram / SourceFiles / support / support_autocomplete . cpp <nl> ppp b / Telegram / SourceFiles / support / support_autocomplete . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / unixtime . h " <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " styles / style_chat_helpers . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_boxes . h " <nl> mmm a / Telegram / SourceFiles / support / support_helper . cpp <nl> ppp b / Telegram / SourceFiles / support / support_helper . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " observer_peer . h " <nl> # include " apiwrap . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> <nl> namespace Main { <nl> mmm a / Telegram / SourceFiles / support / support_helper . h <nl> ppp b / Telegram / SourceFiles / support / support_helper . h <nl> For license and copyright information please follow this link : <nl> # include " support / support_templates . h " <nl> # include " mtproto / sender . h " <nl> <nl> + class History ; <nl> + <nl> namespace Main { <nl> class Session ; <nl> } / / namespace Main <nl> similarity index 88 % <nl> rename from Telegram / SourceFiles / ui / animation . cpp <nl> rename to Telegram / SourceFiles / ui / effects / animation_value . cpp <nl> mmm a / Telegram / SourceFiles / ui / animation . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / animation_value . cpp <nl> the official desktop application for the Telegram messaging service . <nl> For license and copyright information please follow this link : <nl> https : / / github . com / telegramdesktop / tdesktop / blob / master / LEGAL <nl> * / <nl> - # include " animation . h " <nl> - <nl> - # include " media / clip / media_clip_reader . h " <nl> - <nl> - namespace Media { <nl> - namespace Clip { <nl> - <nl> - Reader * const ReaderPointer : : BadPointer = SharedMemoryLocation < Reader , 0 > ( ) ; <nl> - <nl> - ReaderPointer : : ~ ReaderPointer ( ) { <nl> - if ( valid ( ) ) { <nl> - delete _pointer ; <nl> - } <nl> - _pointer = nullptr ; <nl> - } <nl> - <nl> - } / / namespace Clip <nl> - } / / namespace Media <nl> + # include " ui / effects / animation_value . h " <nl> <nl> + namespace anim { <nl> namespace { <nl> <nl> bool AnimationsDisabled = false ; <nl> <nl> } / / namespace <nl> <nl> - namespace anim { <nl> - <nl> transition linear = [ ] ( const float64 & delta , const float64 & dt ) { <nl> return delta * dt ; <nl> } ; <nl> similarity index 86 % <nl> rename from Telegram / SourceFiles / ui / animation . h <nl> rename to Telegram / SourceFiles / ui / effects / animation_value . h <nl> mmm a / Telegram / SourceFiles / ui / animation . h <nl> ppp b / Telegram / SourceFiles / ui / effects / animation_value . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> - # include < QtCore / QTimer > <nl> - # include < QtGui / QColor > <nl> - # include " base / binary_guard . h " <nl> - # include " base / flat_set . h " <nl> - <nl> - namespace Media { <nl> - namespace Clip { <nl> - <nl> - class Reader ; <nl> - class ReaderPointer { <nl> - public : <nl> - ReaderPointer ( std : : nullptr_t = nullptr ) { <nl> - } <nl> - explicit ReaderPointer ( Reader * pointer ) : _pointer ( pointer ) { <nl> - } <nl> - ReaderPointer ( const ReaderPointer & other ) = delete ; <nl> - ReaderPointer & operator = ( const ReaderPointer & other ) = delete ; <nl> - ReaderPointer ( ReaderPointer & & other ) : _pointer ( base : : take ( other . _pointer ) ) { <nl> - } <nl> - ReaderPointer & operator = ( ReaderPointer & & other ) { <nl> - swap ( other ) ; <nl> - return * this ; <nl> - } <nl> - void swap ( ReaderPointer & other ) { <nl> - qSwap ( _pointer , other . _pointer ) ; <nl> - } <nl> - Reader * get ( ) const { <nl> - return valid ( ) ? _pointer : nullptr ; <nl> - } <nl> - Reader * operator - > ( ) const { <nl> - return get ( ) ; <nl> - } <nl> - void setBad ( ) { <nl> - reset ( ) ; <nl> - _pointer = BadPointer ; <nl> - } <nl> - void reset ( ) { <nl> - ReaderPointer temp ; <nl> - swap ( temp ) ; <nl> - } <nl> - bool isBad ( ) const { <nl> - return ( _pointer = = BadPointer ) ; <nl> - } <nl> - bool valid ( ) const { <nl> - return _pointer & & ! isBad ( ) ; <nl> - } <nl> - explicit operator bool ( ) const { <nl> - return valid ( ) ; <nl> - } <nl> - static inline ReaderPointer Bad ( ) { <nl> - ReaderPointer result ; <nl> - result . setBad ( ) ; <nl> - return result ; <nl> - } <nl> - ~ ReaderPointer ( ) ; <nl> - <nl> - private : <nl> - Reader * _pointer = nullptr ; <nl> - static Reader * const BadPointer ; <nl> - <nl> - } ; <nl> - <nl> - class Manager ; <nl> - <nl> - enum Notification { <nl> - NotificationReinit , <nl> - NotificationRepaint , <nl> - } ; <nl> - <nl> - } / / namespace Clip <nl> - } / / namespace Media <nl> - <nl> namespace anim { <nl> <nl> enum class type { <nl> void DrawStaticLoading ( <nl> QBrush brush = Qt : : NoBrush ) ; <nl> <nl> } ; <nl> - <nl> - class AnimationManager : public QObject { <nl> - public : <nl> - AnimationManager ( ) ; <nl> - <nl> - void registerClip ( not_null < Media : : Clip : : Manager * > clip ) ; <nl> - <nl> - private : <nl> - void clipCallback ( <nl> - Media : : Clip : : Reader * reader , <nl> - qint32 threadIndex , <nl> - qint32 notification ) ; <nl> - <nl> - } ; <nl> mmm a / Telegram / SourceFiles / ui / effects / animations . h <nl> ppp b / Telegram / SourceFiles / ui / effects / animations . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + # include " ui / effects / animation_value . h " <nl> + <nl> namespace Ui { <nl> namespace Animations { <nl> <nl> mmm a / Telegram / SourceFiles / ui / effects / cross_animation . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / cross_animation . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / effects / cross_animation . h " <nl> <nl> + # include " ui / effects / animation_value . h " <nl> + <nl> namespace Ui { <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / ui / effects / fade_animation . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / fade_animation . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / effects / fade_animation . h " <nl> <nl> + # include " app . h " <nl> + <nl> namespace Ui { <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / ui / effects / panel_animation . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / panel_animation . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / effects / panel_animation . h " <nl> <nl> + # include " ui / effects / animation_value . h " <nl> + # include " app . h " <nl> + <nl> namespace Ui { <nl> <nl> void RoundShadowAnimation : : start ( int frameWidth , int frameHeight , float64 devicePixelRatio ) { <nl> mmm a / Telegram / SourceFiles / ui / effects / ripple_animation . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / ripple_animation . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / ripple_animation . h " <nl> <nl> # include " ui / effects / animations . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> <nl> mmm a / Telegram / SourceFiles / ui / effects / round_checkbox . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / round_checkbox . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " window / themes / window_theme . h " <nl> # include " ui / rp_widget . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QCoreApplication > <nl> <nl> mmm a / Telegram / SourceFiles / ui / effects / send_action_animations . cpp <nl> ppp b / Telegram / SourceFiles / ui / effects / send_action_animations . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / effects / send_action_animations . h " <nl> <nl> + # include " ui / effects / animation_value . h " <nl> # include " styles / style_widgets . h " <nl> <nl> namespace Ui { <nl> mmm a / Telegram / SourceFiles / ui / emoji_config . cpp <nl> ppp b / Telegram / SourceFiles / ui / emoji_config . cpp <nl> For license and copyright information please follow this link : <nl> # include " base / openssl_help . h " <nl> # include " base / parse_helper . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QJsonDocument > <nl> # include < QtCore / QJsonObject > <nl> mmm a / Telegram / SourceFiles / ui / empty_userpic . cpp <nl> ppp b / Telegram / SourceFiles / ui / empty_userpic . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " data / data_peer . h " <nl> # include " ui / emoji_config . h " <nl> + # include " ui / effects / animation_value . h " <nl> + # include " app . h " <nl> # include " styles / style_history . h " <nl> <nl> namespace Ui { <nl> mmm a / Telegram / SourceFiles / ui / image / image . cpp <nl> ppp b / Telegram / SourceFiles / ui / image / image . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_file_origin . h " <nl> # include " chat_helpers / stickers . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> <nl> using namespace Images ; <nl> <nl> mmm a / Telegram / SourceFiles / ui / image / image_prepare . cpp <nl> ppp b / Telegram / SourceFiles / ui / image / image_prepare . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / image / image_prepare . h " <nl> <nl> + # include " ui / effects / animation_value . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> + <nl> namespace Images { <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / ui / image / image_source . cpp <nl> ppp b / Telegram / SourceFiles / ui / image / image_source . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / history_item . h " <nl> # include " history / history . h " <nl> # include " main / main_session . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QBuffer > <nl> <nl> mmm a / Telegram / SourceFiles / ui / special_buttons . cpp <nl> ppp b / Telegram / SourceFiles / ui / special_buttons . cpp <nl> For license and copyright information please follow this link : <nl> # include " apiwrap . h " <nl> # include " mainwidget . h " <nl> # include " observer_peer . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / ui / style / style_core . cpp <nl> ppp b / Telegram / SourceFiles / ui / style / style_core . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / style / style_core . h " <nl> <nl> + # include " ui / effects / animation_value . h " <nl> + <nl> namespace style { <nl> namespace internal { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / ui / style / style_core_icon . cpp <nl> ppp b / Telegram / SourceFiles / ui / style / style_core_icon . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " ui / style / style_core_icon . h " <nl> <nl> + # include " app . h " <nl> + <nl> namespace style { <nl> namespace internal { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / ui / text / text . cpp <nl> ppp b / Telegram / SourceFiles / ui / text / text . cpp <nl> For license and copyright information please follow this link : <nl> # include " platform / platform_info . h " <nl> # include " boxes / confirm_box . h " <nl> # include " mainwindow . h " <nl> + # include " app . h " <nl> <nl> # include < private / qfontengine_p . h > <nl> # include < private / qharfbuzz_p . h > <nl> mmm a / Telegram / SourceFiles / ui / text / text_block . cpp <nl> ppp b / Telegram / SourceFiles / ui / text / text_block . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / text / text_block . h " <nl> <nl> # include " core / crash_reports . h " <nl> + # include " app . h " <nl> <nl> # include < private / qfontengine_p . h > <nl> <nl> mmm a / Telegram / SourceFiles / ui / text_options . h <nl> ppp b / Telegram / SourceFiles / ui / text_options . h <nl> For license and copyright information please follow this link : <nl> * / <nl> # pragma once <nl> <nl> + class History ; <nl> + class PeerData ; <nl> + <nl> namespace Ui { <nl> <nl> void InitTextOptions ( ) ; <nl> mmm a / Telegram / SourceFiles / ui / toast / toast_widget . cpp <nl> ppp b / Telegram / SourceFiles / ui / toast / toast_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / toast / toast_widget . h " <nl> <nl> # include " ui / image / image_prepare . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> namespace Toast { <nl> mmm a / Telegram / SourceFiles / ui / widgets / buttons . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / buttons . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / image / image_prepare . h " <nl> # include " window / themes / window_theme . h " <nl> # include " lang / lang_instance . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> <nl> mmm a / Telegram / SourceFiles / ui / widgets / checkbox . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / checkbox . cpp <nl> For license and copyright information please follow this link : <nl> <nl> # include " lang / lang_keys . h " <nl> # include " ui / effects / ripple_animation . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / ui / widgets / inner_dropdown . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / inner_dropdown . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / shadow . h " <nl> # include " ui / effects / panel_animation . h " <nl> # include " ui / image / image_prepare . h " <nl> + # include " app . h " <nl> <nl> namespace { <nl> <nl> mmm a / Telegram / SourceFiles / ui / widgets / inner_dropdown . h <nl> ppp b / Telegram / SourceFiles / ui / widgets / inner_dropdown . h <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / animations . h " <nl> # include " ui / effects / panel_animation . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> <nl> class ScrollArea ; <nl> mmm a / Telegram / SourceFiles / ui / widgets / input_fields . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / input_fields . cpp <nl> For license and copyright information please follow this link : <nl> # include " numbers . h " <nl> # include " main / main_session . h " <nl> # include " core / application . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QCommonStyle > <nl> # include < QtWidgets / QScrollBar > <nl> mmm a / Telegram / SourceFiles / ui / widgets / input_fields . h <nl> ppp b / Telegram / SourceFiles / ui / widgets / input_fields . h <nl> For license and copyright information please follow this link : <nl> <nl> # include < QtWidgets / QLineEdit > <nl> # include < QtWidgets / QTextEdit > <nl> + # include < QtCore / QTimer > <nl> <nl> class UserData ; <nl> <nl> mmm a / Telegram / SourceFiles / ui / widgets / labels . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / labels . cpp <nl> For license and copyright information please follow this link : <nl> # include " chat_helpers / message_field . h " / / SetClipboardText / MimeDataFromText <nl> # include " mainwindow . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> # include < QtGui / QClipboard > <nl> mmm a / Telegram / SourceFiles / ui / widgets / labels . h <nl> ppp b / Telegram / SourceFiles / ui / widgets / labels . h <nl> For license and copyright information please follow this link : <nl> # include " boxes / abstract_box . h " <nl> # include " styles / style_widgets . h " <nl> <nl> + # include < QtCore / QTimer > <nl> + <nl> namespace Ui { <nl> <nl> class PopupMenu ; <nl> mmm a / Telegram / SourceFiles / ui / widgets / multi_select . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / multi_select . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / effects / cross_animation . h " <nl> # include " ui / text_options . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> <nl> namespace Ui { <nl> namespace { <nl> mmm a / Telegram / SourceFiles / ui / widgets / popup_menu . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / popup_menu . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " core / application . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> <nl> # include < QtWidgets / QApplication > <nl> # include < QtWidgets / QDesktopWidget > <nl> mmm a / Telegram / SourceFiles / ui / widgets / scroll_area . h <nl> ppp b / Telegram / SourceFiles / ui / widgets / scroll_area . h <nl> For license and copyright information please follow this link : <nl> # include " styles / style_widgets . h " <nl> <nl> # include < QtWidgets / QScrollArea > <nl> + # include < QtCore / QTimer > <nl> <nl> namespace Ui { <nl> <nl> mmm a / Telegram / SourceFiles / ui / widgets / separate_panel . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / separate_panel . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / layer_widget . h " <nl> # include " window / themes / window_theme . h " <nl> # include " core / application . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_info . h " <nl> # include " styles / style_calls . h " <nl> mmm a / Telegram / SourceFiles / ui / widgets / tooltip . cpp <nl> ppp b / Telegram / SourceFiles / ui / widgets / tooltip . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " platform / platform_specific . h " <nl> # include " core / qt_signal_producer . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> <nl> # include < QtCore / QCoreApplication > <nl> mmm a / Telegram / SourceFiles / window / layer_widget . cpp <nl> ppp b / Telegram / SourceFiles / window / layer_widget . cpp <nl> For license and copyright information please follow this link : <nl> * / <nl> # include " window / layer_widget . h " <nl> <nl> - # include " lang / lang_keys . h " <nl> - # include " data / data_photo . h " <nl> - # include " data / data_document . h " <nl> - # include " media / clip / media_clip_reader . h " <nl> # include " boxes / abstract_box . h " <nl> - # include " mainwindow . h " <nl> - # include " mainwidget . h " <nl> - # include " core / file_utilities . h " <nl> # include " ui / widgets / shadow . h " <nl> - # include " ui / image / image . h " <nl> - # include " ui / emoji_config . h " <nl> # include " window / window_main_menu . h " <nl> - # include " lottie / lottie_single_player . h " <nl> - # include " main / main_session . h " <nl> - # include " chat_helpers / stickers . h " <nl> - # include " window / window_session_controller . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_widgets . h " <nl> - # include " styles / style_chat_helpers . h " <nl> - # include " styles / style_history . h " <nl> - <nl> - namespace { <nl> - <nl> - constexpr int kStickerPreviewEmojiLimit = 10 ; <nl> - <nl> - } / / namespace <nl> <nl> namespace Window { <nl> <nl> LayerStackWidget : : ~ LayerStackWidget ( ) { <nl> } <nl> <nl> } / / namespace Window <nl> - <nl> - MediaPreviewWidget : : MediaPreviewWidget ( <nl> - QWidget * parent , <nl> - not_null < Window : : SessionController * > controller ) <nl> - : RpWidget ( parent ) <nl> - , _controller ( controller ) <nl> - , _emojiSize ( Ui : : Emoji : : GetSizeLarge ( ) / cIntRetinaFactor ( ) ) { <nl> - setAttribute ( Qt : : WA_TransparentForMouseEvents ) ; <nl> - subscribe ( _controller - > session ( ) . downloaderTaskFinished ( ) , [ = ] { <nl> - update ( ) ; <nl> - } ) ; <nl> - } <nl> - <nl> - QRect MediaPreviewWidget : : updateArea ( ) const { <nl> - const auto size = currentDimensions ( ) ; <nl> - return QRect ( <nl> - QPoint ( ( width ( ) - size . width ( ) ) / 2 , ( height ( ) - size . height ( ) ) / 2 ) , <nl> - size ) ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : paintEvent ( QPaintEvent * e ) { <nl> - Painter p ( this ) ; <nl> - QRect r ( e - > rect ( ) ) ; <nl> - <nl> - const auto image = [ & ] { <nl> - if ( ! _lottie | | ! _lottie - > ready ( ) ) { <nl> - return QImage ( ) ; <nl> - } <nl> - _lottie - > markFrameShown ( ) ; <nl> - return _lottie - > frame ( ) ; <nl> - } ( ) ; <nl> - const auto pixmap = image . isNull ( ) ? currentImage ( ) : QPixmap ( ) ; <nl> - const auto size = image . isNull ( ) ? pixmap . size ( ) : image . size ( ) ; <nl> - int w = size . width ( ) / cIntRetinaFactor ( ) , h = size . height ( ) / cIntRetinaFactor ( ) ; <nl> - auto shown = _a_shown . value ( _hiding ? 0 . : 1 . ) ; <nl> - if ( ! _a_shown . animating ( ) ) { <nl> - if ( _hiding ) { <nl> - hide ( ) ; <nl> - _controller - > disableGifPauseReason ( Window : : GifPauseReason : : MediaPreview ) ; <nl> - return ; <nl> - } <nl> - } else { <nl> - p . setOpacity ( shown ) ; <nl> - / / w = qMax ( qRound ( w * ( st : : stickerPreviewMin + ( ( 1 . - st : : stickerPreviewMin ) * shown ) ) / 2 . ) * 2 + int ( w % 2 ) , 1 ) ; <nl> - / / h = qMax ( qRound ( h * ( st : : stickerPreviewMin + ( ( 1 . - st : : stickerPreviewMin ) * shown ) ) / 2 . ) * 2 + int ( h % 2 ) , 1 ) ; <nl> - } <nl> - p . fillRect ( r , st : : stickerPreviewBg ) ; <nl> - if ( image . isNull ( ) ) { <nl> - p . drawPixmap ( ( width ( ) - w ) / 2 , ( height ( ) - h ) / 2 , pixmap ) ; <nl> - } else { <nl> - p . drawImage ( <nl> - QRect ( ( width ( ) - w ) / 2 , ( height ( ) - h ) / 2 , w , h ) , <nl> - image ) ; <nl> - } <nl> - if ( ! _emojiList . empty ( ) ) { <nl> - const auto emojiCount = _emojiList . size ( ) ; <nl> - const auto emojiWidth = ( emojiCount * _emojiSize ) + ( emojiCount - 1 ) * st : : stickerEmojiSkip ; <nl> - auto emojiLeft = ( width ( ) - emojiWidth ) / 2 ; <nl> - const auto esize = Ui : : Emoji : : GetSizeLarge ( ) ; <nl> - for ( const auto emoji : _emojiList ) { <nl> - Ui : : Emoji : : Draw ( <nl> - p , <nl> - emoji , <nl> - esize , <nl> - emojiLeft , <nl> - ( height ( ) - h ) / 2 - ( _emojiSize * 2 ) ) ; <nl> - emojiLeft + = _emojiSize + st : : stickerEmojiSkip ; <nl> - } <nl> - } <nl> - } <nl> - <nl> - void MediaPreviewWidget : : resizeEvent ( QResizeEvent * e ) { <nl> - update ( ) ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : showPreview ( <nl> - Data : : FileOrigin origin , <nl> - not_null < DocumentData * > document ) { <nl> - if ( ! document <nl> - | | ( ! document - > isAnimation ( ) & & ! document - > sticker ( ) ) <nl> - | | document - > isVideoMessage ( ) ) { <nl> - hidePreview ( ) ; <nl> - return ; <nl> - } <nl> - <nl> - startShow ( ) ; <nl> - _origin = origin ; <nl> - _photo = nullptr ; <nl> - _document = document ; <nl> - fillEmojiString ( ) ; <nl> - resetGifAndCache ( ) ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : showPreview ( <nl> - Data : : FileOrigin origin , <nl> - not_null < PhotoData * > photo ) { <nl> - startShow ( ) ; <nl> - _origin = origin ; <nl> - _photo = photo ; <nl> - _document = nullptr ; <nl> - fillEmojiString ( ) ; <nl> - resetGifAndCache ( ) ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : startShow ( ) { <nl> - _cache = QPixmap ( ) ; <nl> - if ( isHidden ( ) | | _a_shown . animating ( ) ) { <nl> - if ( isHidden ( ) ) { <nl> - show ( ) ; <nl> - _controller - > enableGifPauseReason ( Window : : GifPauseReason : : MediaPreview ) ; <nl> - } <nl> - _hiding = false ; <nl> - _a_shown . start ( [ this ] { update ( ) ; } , 0 . , 1 . , st : : stickerPreviewDuration ) ; <nl> - } else { <nl> - update ( ) ; <nl> - } <nl> - } <nl> - <nl> - void MediaPreviewWidget : : hidePreview ( ) { <nl> - if ( isHidden ( ) ) { <nl> - return ; <nl> - } <nl> - if ( _gif ) _cache = currentImage ( ) ; <nl> - _hiding = true ; <nl> - _a_shown . start ( [ this ] { update ( ) ; } , 1 . , 0 . , st : : stickerPreviewDuration ) ; <nl> - _photo = nullptr ; <nl> - _document = nullptr ; <nl> - resetGifAndCache ( ) ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : fillEmojiString ( ) { <nl> - _emojiList . clear ( ) ; <nl> - if ( _photo ) { <nl> - return ; <nl> - } <nl> - if ( auto sticker = _document - > sticker ( ) ) { <nl> - if ( auto list = Stickers : : GetEmojiListFromSet ( _document ) ) { <nl> - _emojiList = std : : move ( * list ) ; <nl> - while ( _emojiList . size ( ) > kStickerPreviewEmojiLimit ) { <nl> - _emojiList . pop_back ( ) ; <nl> - } <nl> - } else if ( const auto emoji = Ui : : Emoji : : Find ( sticker - > alt ) ) { <nl> - _emojiList . emplace_back ( emoji ) ; <nl> - } <nl> - } <nl> - } <nl> - <nl> - void MediaPreviewWidget : : resetGifAndCache ( ) { <nl> - _lottie = nullptr ; <nl> - _gif . reset ( ) ; <nl> - _cacheStatus = CacheNotLoaded ; <nl> - _cachedSize = QSize ( ) ; <nl> - } <nl> - <nl> - QSize MediaPreviewWidget : : currentDimensions ( ) const { <nl> - if ( ! _cachedSize . isEmpty ( ) ) { <nl> - return _cachedSize ; <nl> - } <nl> - if ( ! _document & & ! _photo ) { <nl> - _cachedSize = QSize ( _cache . width ( ) / cIntRetinaFactor ( ) , _cache . height ( ) / cIntRetinaFactor ( ) ) ; <nl> - return _cachedSize ; <nl> - } <nl> - <nl> - QSize result , box ; <nl> - if ( _photo ) { <nl> - result = QSize ( _photo - > width ( ) , _photo - > height ( ) ) ; <nl> - box = QSize ( width ( ) - 2 * st : : boxVerticalMargin , height ( ) - 2 * st : : boxVerticalMargin ) ; <nl> - } else { <nl> - result = _document - > dimensions ; <nl> - if ( _gif & & _gif - > ready ( ) ) { <nl> - result = QSize ( _gif - > width ( ) , _gif - > height ( ) ) ; <nl> - } <nl> - if ( _document - > sticker ( ) ) { <nl> - box = QSize ( st : : maxStickerSize , st : : maxStickerSize ) ; <nl> - } else { <nl> - box = QSize ( 2 * st : : maxStickerSize , 2 * st : : maxStickerSize ) ; <nl> - } <nl> - } <nl> - result = QSize ( qMax ( ConvertScale ( result . width ( ) ) , 1 ) , qMax ( ConvertScale ( result . height ( ) ) , 1 ) ) ; <nl> - if ( result . width ( ) > box . width ( ) ) { <nl> - result . setHeight ( qMax ( ( box . width ( ) * result . height ( ) ) / result . width ( ) , 1 ) ) ; <nl> - result . setWidth ( box . width ( ) ) ; <nl> - } <nl> - if ( result . height ( ) > box . height ( ) ) { <nl> - result . setWidth ( qMax ( ( box . height ( ) * result . width ( ) ) / result . height ( ) , 1 ) ) ; <nl> - result . setHeight ( box . height ( ) ) ; <nl> - } <nl> - if ( _photo ) { <nl> - _cachedSize = result ; <nl> - } <nl> - return result ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : setupLottie ( ) { <nl> - Expects ( _document ! = nullptr ) ; <nl> - <nl> - _lottie = std : : make_unique < Lottie : : SinglePlayer > ( <nl> - Lottie : : ReadContent ( _document - > data ( ) , _document - > filepath ( ) ) , <nl> - Lottie : : FrameRequest { currentDimensions ( ) * cIntRetinaFactor ( ) } , <nl> - Lottie : : Quality : : High ) ; <nl> - <nl> - _lottie - > updates ( <nl> - ) | rpl : : start_with_next ( [ = ] ( Lottie : : Update update ) { <nl> - update . data . match ( [ & ] ( const Lottie : : Information & ) { <nl> - this - > update ( ) ; <nl> - } , [ & ] ( const Lottie : : DisplayFrameRequest & ) { <nl> - this - > update ( updateArea ( ) ) ; <nl> - } ) ; <nl> - } , lifetime ( ) ) ; <nl> - } <nl> - <nl> - QPixmap MediaPreviewWidget : : currentImage ( ) const { <nl> - if ( _document ) { <nl> - if ( const auto sticker = _document - > sticker ( ) ) { <nl> - if ( _cacheStatus ! = CacheLoaded ) { <nl> - if ( sticker - > animated & & ! _lottie & & _document - > loaded ( ) ) { <nl> - const_cast < MediaPreviewWidget * > ( this ) - > setupLottie ( ) ; <nl> - } <nl> - if ( _lottie & & _lottie - > ready ( ) ) { <nl> - return QPixmap ( ) ; <nl> - } else if ( const auto image = _document - > getStickerLarge ( ) ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - _cache = image - > pix ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheLoaded ; <nl> - } else if ( _cacheStatus ! = CacheThumbLoaded <nl> - & & _document - > hasThumbnail ( ) <nl> - & & _document - > thumbnail ( ) - > loaded ( ) ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } <nl> - } <nl> - } else { <nl> - _document - > automaticLoad ( _origin , nullptr ) ; <nl> - if ( _document - > loaded ( ) ) { <nl> - if ( ! _gif & & ! _gif . isBad ( ) ) { <nl> - auto that = const_cast < MediaPreviewWidget * > ( this ) ; <nl> - that - > _gif = Media : : Clip : : MakeReader ( _document , FullMsgId ( ) , [ = ] ( Media : : Clip : : Notification notification ) { <nl> - that - > clipCallback ( notification ) ; <nl> - } ) ; <nl> - if ( _gif ) _gif - > setAutoplay ( ) ; <nl> - } <nl> - } <nl> - if ( _gif & & _gif - > started ( ) ) { <nl> - auto s = currentDimensions ( ) ; <nl> - auto paused = _controller - > isGifPausedAtLeastFor ( Window : : GifPauseReason : : MediaPreview ) ; <nl> - return _gif - > current ( s . width ( ) , s . height ( ) , s . width ( ) , s . height ( ) , ImageRoundRadius : : None , RectPart : : None , paused ? 0 : crl : : now ( ) ) ; <nl> - } <nl> - if ( _cacheStatus ! = CacheThumbLoaded <nl> - & & _document - > hasThumbnail ( ) ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - if ( _document - > thumbnail ( ) - > loaded ( ) ) { <nl> - _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } else if ( const auto blurred = _document - > thumbnailInline ( ) ) { <nl> - _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } else { <nl> - _document - > thumbnail ( ) - > load ( _origin ) ; <nl> - } <nl> - } <nl> - } <nl> - } else if ( _photo ) { <nl> - if ( _cacheStatus ! = CacheLoaded ) { <nl> - if ( _photo - > loaded ( ) ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - _cache = _photo - > large ( ) - > pix ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheLoaded ; <nl> - } else { <nl> - _photo - > load ( _origin ) ; <nl> - if ( _cacheStatus ! = CacheThumbLoaded ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - if ( _photo - > thumbnail ( ) - > loaded ( ) ) { <nl> - _cache = _photo - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } else if ( _photo - > thumbnailSmall ( ) - > loaded ( ) ) { <nl> - _cache = _photo - > thumbnailSmall ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } else if ( const auto blurred = _photo - > thumbnailInline ( ) ) { <nl> - _cache = blurred - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> - _cacheStatus = CacheThumbLoaded ; <nl> - } else { <nl> - _photo - > thumbnailSmall ( ) - > load ( _origin ) ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - <nl> - } <nl> - return _cache ; <nl> - } <nl> - <nl> - void MediaPreviewWidget : : clipCallback ( Media : : Clip : : Notification notification ) { <nl> - using namespace Media : : Clip ; <nl> - switch ( notification ) { <nl> - case NotificationReinit : { <nl> - if ( _gif & & _gif - > state ( ) = = State : : Error ) { <nl> - _gif . setBad ( ) ; <nl> - } <nl> - <nl> - if ( _gif & & _gif - > ready ( ) & & ! _gif - > started ( ) ) { <nl> - QSize s = currentDimensions ( ) ; <nl> - _gif - > start ( s . width ( ) , s . height ( ) , s . width ( ) , s . height ( ) , ImageRoundRadius : : None , RectPart : : None ) ; <nl> - } <nl> - <nl> - update ( ) ; <nl> - } break ; <nl> - <nl> - case NotificationRepaint : { <nl> - if ( _gif & & ! _gif - > currentDisplayed ( ) ) { <nl> - update ( updateArea ( ) ) ; <nl> - } <nl> - } break ; <nl> - } <nl> - } <nl> - <nl> - MediaPreviewWidget : : ~ MediaPreviewWidget ( ) { <nl> - } <nl> mmm a / Telegram / SourceFiles / window / layer_widget . h <nl> ppp b / Telegram / SourceFiles / window / layer_widget . h <nl> namespace Lottie { <nl> class SinglePlayer ; <nl> } / / namespace Lottie <nl> <nl> + class BoxContent ; <nl> + <nl> + enum class LayerOption { <nl> + CloseOther = ( 1 < < 0 ) , <nl> + KeepOther = ( 1 < < 1 ) , <nl> + ShowAfterOther = ( 1 < < 2 ) , <nl> + } ; <nl> + using LayerOptions = base : : flags < LayerOption > ; <nl> + inline constexpr auto is_flag_type ( LayerOption ) { return true ; } ; <nl> + <nl> namespace Window { <nl> <nl> class MainMenu ; <nl> class LayerStackWidget : public Ui : : RpWidget { <nl> <nl> } / / namespace Window <nl> <nl> - class MediaPreviewWidget : public Ui : : RpWidget , private base : : Subscriber { <nl> - public : <nl> - MediaPreviewWidget ( <nl> - QWidget * parent , <nl> - not_null < Window : : SessionController * > controller ) ; <nl> - <nl> - void showPreview ( <nl> - Data : : FileOrigin origin , <nl> - not_null < DocumentData * > document ) ; <nl> - void showPreview ( <nl> - Data : : FileOrigin origin , <nl> - not_null < PhotoData * > photo ) ; <nl> - void hidePreview ( ) ; <nl> - <nl> - ~ MediaPreviewWidget ( ) ; <nl> - <nl> - protected : <nl> - void paintEvent ( QPaintEvent * e ) override ; <nl> - void resizeEvent ( QResizeEvent * e ) override ; <nl> - <nl> - private : <nl> - QSize currentDimensions ( ) const ; <nl> - QPixmap currentImage ( ) const ; <nl> - void setupLottie ( ) ; <nl> - void startShow ( ) ; <nl> - void fillEmojiString ( ) ; <nl> - void resetGifAndCache ( ) ; <nl> - [ [ nodiscard ] ] QRect updateArea ( ) const ; <nl> - <nl> - not_null < Window : : SessionController * > _controller ; <nl> - <nl> - Ui : : Animations : : Simple _a_shown ; <nl> - bool _hiding = false ; <nl> - Data : : FileOrigin _origin ; <nl> - DocumentData * _document = nullptr ; <nl> - PhotoData * _photo = nullptr ; <nl> - Media : : Clip : : ReaderPointer _gif ; <nl> - std : : unique_ptr < Lottie : : SinglePlayer > _lottie ; <nl> - <nl> - int _emojiSize ; <nl> - std : : vector < not_null < EmojiPtr > > _emojiList ; <nl> - <nl> - void clipCallback ( Media : : Clip : : Notification notification ) ; <nl> - <nl> - enum CacheStatus { <nl> - CacheNotLoaded , <nl> - CacheThumbLoaded , <nl> - CacheLoaded , <nl> - } ; <nl> - mutable CacheStatus _cacheStatus = CacheNotLoaded ; <nl> - mutable QPixmap _cache ; <nl> - mutable QSize _cachedSize ; <nl> - <nl> - } ; <nl> - <nl> class GenericBox ; <nl> <nl> template < typename BoxType = GenericBox , typename . . . Args > <nl> mmm a / Telegram / SourceFiles / window / main_window . cpp <nl> ppp b / Telegram / SourceFiles / window / main_window . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> # include " mainwindow . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_boxes . h " <nl> <nl> mmm a / Telegram / SourceFiles / window / notifications_manager . cpp <nl> ppp b / Telegram / SourceFiles / window / notifications_manager . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwidget . h " <nl> # include " apiwrap . h " <nl> # include " main / main_session . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> namespace Window { <nl> namespace Notifications { <nl> void NativeManager : : doShowNotification ( <nl> ? qsl ( " Telegram Desktop " ) <nl> : ( scheduled & & peer - > isSelf ( ) ) <nl> ? tr : : lng_notification_reminder ( tr : : now ) <nl> - : App : : peerName ( peer ) ; <nl> + : peer - > name ; <nl> const auto subtitle = options . hideNameAndPhoto <nl> ? QString ( ) <nl> : item - > notificationHeader ( ) ; <nl> mmm a / Telegram / SourceFiles / window / notifications_manager . h <nl> ppp b / Telegram / SourceFiles / window / notifications_manager . h <nl> For license and copyright information please follow this link : <nl> <nl> # include " base / timer . h " <nl> <nl> + class History ; <nl> + <nl> namespace Main { <nl> class Session ; <nl> } / / namespace Main <nl> mmm a / Telegram / SourceFiles / window / notifications_manager_default . cpp <nl> ppp b / Telegram / SourceFiles / window / notifications_manager_default . cpp <nl> For license and copyright information please follow this link : <nl> # include " history / history . h " <nl> # include " history / history_item . h " <nl> # include " platform / platform_specific . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtCore / QCoreApplication > <nl> <nl> mmm a / Telegram / SourceFiles / window / notifications_manager_default . h <nl> ppp b / Telegram / SourceFiles / window / notifications_manager_default . h <nl> For license and copyright information please follow this link : <nl> # include " window / notifications_manager . h " <nl> # include " ui / effects / animations . h " <nl> # include " base / timer . h " <nl> + # include " base / binary_guard . h " <nl> + <nl> + # include < QtCore / QTimer > <nl> <nl> namespace Ui { <nl> class IconButton ; <nl> mmm a / Telegram / SourceFiles / window / themes / window_theme . cpp <nl> ppp b / Telegram / SourceFiles / window / themes / window_theme . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / image / image . h " <nl> # include " boxes / background_box . h " <nl> # include " core / application . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_history . h " <nl> <nl> mmm a / Telegram / SourceFiles / window / themes / window_theme_editor . cpp <nl> ppp b / Telegram / SourceFiles / window / themes / window_theme_editor . cpp <nl> For license and copyright information please follow this link : <nl> # include " core / application . h " <nl> # include " boxes / edit_color_box . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_boxes . h " <nl> mmm a / Telegram / SourceFiles / window / themes / window_theme_editor_block . cpp <nl> ppp b / Telegram / SourceFiles / window / themes / window_theme_editor_block . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / shadow . h " <nl> # include " boxes / edit_color_box . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> <nl> namespace Window { <nl> namespace Theme { <nl> mmm a / Telegram / SourceFiles / window / themes / window_theme_editor_box . cpp <nl> ppp b / Telegram / SourceFiles / window / themes / window_theme_editor_box . cpp <nl> For license and copyright information please follow this link : <nl> # include " mainwindow . h " <nl> # include " layout . h " <nl> # include " apiwrap . h " <nl> + # include " app . h " <nl> # include " styles / style_widgets . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_settings . h " <nl> mmm a / Telegram / SourceFiles / window / themes / window_theme_warning . cpp <nl> ppp b / Telegram / SourceFiles / window / themes / window_theme_warning . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / shadow . h " <nl> # include " window / themes / window_theme . h " <nl> # include " lang / lang_keys . h " <nl> + # include " app . h " <nl> <nl> namespace Window { <nl> namespace Theme { <nl> mmm a / Telegram / SourceFiles / window / themes / window_themes_cloud_list . h <nl> ppp b / Telegram / SourceFiles / window / themes / window_themes_cloud_list . h <nl> For license and copyright information please follow this link : <nl> # include " data / data_cloud_themes . h " <nl> # include " ui / widgets / checkbox . h " <nl> # include " base / unique_qptr . h " <nl> + # include " base / binary_guard . h " <nl> <nl> namespace Ui { <nl> class PopupMenu ; <nl> mmm a / Telegram / SourceFiles / window / window_connecting_widget . cpp <nl> ppp b / Telegram / SourceFiles / window / window_connecting_widget . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / themes / window_theme . h " <nl> # include " boxes / connection_box . h " <nl> # include " lang / lang_keys . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_window . h " <nl> <nl> namespace Window { <nl> mmm a / Telegram / SourceFiles / window / window_controller . cpp <nl> ppp b / Telegram / SourceFiles / window / window_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / themes / window_theme . h " <nl> # include " window / themes / window_theme_editor . h " <nl> # include " mainwindow . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> <nl> # include < QtGui / QWindow > <nl> # include < QtGui / QScreen > <nl> mmm a / Telegram / SourceFiles / window / window_history_hider . cpp <nl> ppp b / Telegram / SourceFiles / window / window_history_hider . cpp <nl> For license and copyright information please follow this link : <nl> # include " ui / widgets / buttons . h " <nl> # include " ui / widgets / shadow . h " <nl> # include " mainwidget . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_history . h " <nl> <nl> mmm a / Telegram / SourceFiles / window / window_lock_widgets . cpp <nl> ppp b / Telegram / SourceFiles / window / window_lock_widgets . cpp <nl> For license and copyright information please follow this link : <nl> # include " window / window_controller . h " <nl> # include " window / window_slide_animation . h " <nl> # include " window / window_session_controller . h " <nl> - # include " main / main_session . h " <nl> + # include " main / main_account . h " <nl> + # include " facades . h " <nl> <nl> namespace Window { <nl> <nl> LockWidget : : LockWidget ( QWidget * parent , not_null < Controller * > window ) <nl> show ( ) ; <nl> } <nl> <nl> + not_null < Controller * > LockWidget : : window ( ) const { <nl> + return _window ; <nl> + } <nl> + <nl> void LockWidget : : setInnerFocus ( ) { <nl> if ( const auto controller = _window - > sessionController ( ) ) { <nl> controller - > dialogsListFocused ( ) . set ( false , true ) ; <nl> void PasscodeLockWidget : : submit ( ) { <nl> } <nl> <nl> const auto passcode = _passcode - > text ( ) . toUtf8 ( ) ; <nl> - const auto correct = App : : main ( ) <nl> + const auto correct = window ( ) - > account ( ) . sessionExists ( ) <nl> ? Local : : checkPasscode ( passcode ) <nl> : ( Local : : readMap ( passcode ) ! = Local : : ReadMapPassNeeded ) ; <nl> if ( ! correct ) { <nl> mmm a / Telegram / SourceFiles / window / window_lock_widgets . h <nl> ppp b / Telegram / SourceFiles / window / window_lock_widgets . h <nl> class LockWidget : public Ui : : RpWidget { <nl> public : <nl> LockWidget ( QWidget * parent , not_null < Controller * > window ) ; <nl> <nl> + not_null < Controller * > window ( ) const ; <nl> + <nl> virtual void setInnerFocus ( ) ; <nl> <nl> void showAnimated ( const QPixmap & bgAnimCache , bool back = false ) ; <nl> mmm a / Telegram / SourceFiles / window / window_main_menu . cpp <nl> ppp b / Telegram / SourceFiles / window / window_main_menu . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_session . h " <nl> # include " data / data_user . h " <nl> # include " mainwidget . h " <nl> + # include " facades . h " <nl> + # include " app . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_settings . h " <nl> new file mode 100644 <nl> index 00000000000 . . fc7f6089862 <nl> mmm / dev / null <nl> ppp b / Telegram / SourceFiles / window / window_media_preview . cpp <nl> <nl> + / * <nl> + This file is part of Telegram Desktop , <nl> + the official desktop application for the Telegram messaging service . <nl> + <nl> + For license and copyright information please follow this link : <nl> + https : / / github . com / telegramdesktop / tdesktop / blob / master / LEGAL <nl> + * / <nl> + # include " window / window_media_preview . h " <nl> + <nl> + # include " data / data_photo . h " <nl> + # include " data / data_document . h " <nl> + # include " ui / image / image . h " <nl> + # include " ui / emoji_config . h " <nl> + # include " lottie / lottie_single_player . h " <nl> + # include " main / main_session . h " <nl> + # include " chat_helpers / stickers . h " <nl> + # include " window / window_session_controller . h " <nl> + # include " styles / style_boxes . h " <nl> + # include " styles / style_chat_helpers . h " <nl> + # include " styles / style_history . h " <nl> + <nl> + namespace Window { <nl> + namespace { <nl> + <nl> + constexpr int kStickerPreviewEmojiLimit = 10 ; <nl> + <nl> + } / / namespace <nl> + <nl> + MediaPreviewWidget : : MediaPreviewWidget ( <nl> + QWidget * parent , <nl> + not_null < Window : : SessionController * > controller ) <nl> + : RpWidget ( parent ) <nl> + , _controller ( controller ) <nl> + , _emojiSize ( Ui : : Emoji : : GetSizeLarge ( ) / cIntRetinaFactor ( ) ) { <nl> + setAttribute ( Qt : : WA_TransparentForMouseEvents ) ; <nl> + subscribe ( _controller - > session ( ) . downloaderTaskFinished ( ) , [ = ] { <nl> + update ( ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + QRect MediaPreviewWidget : : updateArea ( ) const { <nl> + const auto size = currentDimensions ( ) ; <nl> + return QRect ( <nl> + QPoint ( ( width ( ) - size . width ( ) ) / 2 , ( height ( ) - size . height ( ) ) / 2 ) , <nl> + size ) ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : paintEvent ( QPaintEvent * e ) { <nl> + Painter p ( this ) ; <nl> + QRect r ( e - > rect ( ) ) ; <nl> + <nl> + const auto image = [ & ] { <nl> + if ( ! _lottie | | ! _lottie - > ready ( ) ) { <nl> + return QImage ( ) ; <nl> + } <nl> + _lottie - > markFrameShown ( ) ; <nl> + return _lottie - > frame ( ) ; <nl> + } ( ) ; <nl> + const auto pixmap = image . isNull ( ) ? currentImage ( ) : QPixmap ( ) ; <nl> + const auto size = image . isNull ( ) ? pixmap . size ( ) : image . size ( ) ; <nl> + int w = size . width ( ) / cIntRetinaFactor ( ) , h = size . height ( ) / cIntRetinaFactor ( ) ; <nl> + auto shown = _a_shown . value ( _hiding ? 0 . : 1 . ) ; <nl> + if ( ! _a_shown . animating ( ) ) { <nl> + if ( _hiding ) { <nl> + hide ( ) ; <nl> + _controller - > disableGifPauseReason ( Window : : GifPauseReason : : MediaPreview ) ; <nl> + return ; <nl> + } <nl> + } else { <nl> + p . setOpacity ( shown ) ; <nl> + / / w = qMax ( qRound ( w * ( st : : stickerPreviewMin + ( ( 1 . - st : : stickerPreviewMin ) * shown ) ) / 2 . ) * 2 + int ( w % 2 ) , 1 ) ; <nl> + / / h = qMax ( qRound ( h * ( st : : stickerPreviewMin + ( ( 1 . - st : : stickerPreviewMin ) * shown ) ) / 2 . ) * 2 + int ( h % 2 ) , 1 ) ; <nl> + } <nl> + p . fillRect ( r , st : : stickerPreviewBg ) ; <nl> + if ( image . isNull ( ) ) { <nl> + p . drawPixmap ( ( width ( ) - w ) / 2 , ( height ( ) - h ) / 2 , pixmap ) ; <nl> + } else { <nl> + p . drawImage ( <nl> + QRect ( ( width ( ) - w ) / 2 , ( height ( ) - h ) / 2 , w , h ) , <nl> + image ) ; <nl> + } <nl> + if ( ! _emojiList . empty ( ) ) { <nl> + const auto emojiCount = _emojiList . size ( ) ; <nl> + const auto emojiWidth = ( emojiCount * _emojiSize ) + ( emojiCount - 1 ) * st : : stickerEmojiSkip ; <nl> + auto emojiLeft = ( width ( ) - emojiWidth ) / 2 ; <nl> + const auto esize = Ui : : Emoji : : GetSizeLarge ( ) ; <nl> + for ( const auto emoji : _emojiList ) { <nl> + Ui : : Emoji : : Draw ( <nl> + p , <nl> + emoji , <nl> + esize , <nl> + emojiLeft , <nl> + ( height ( ) - h ) / 2 - ( _emojiSize * 2 ) ) ; <nl> + emojiLeft + = _emojiSize + st : : stickerEmojiSkip ; <nl> + } <nl> + } <nl> + } <nl> + <nl> + void MediaPreviewWidget : : resizeEvent ( QResizeEvent * e ) { <nl> + update ( ) ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : showPreview ( <nl> + Data : : FileOrigin origin , <nl> + not_null < DocumentData * > document ) { <nl> + if ( ! document <nl> + | | ( ! document - > isAnimation ( ) & & ! document - > sticker ( ) ) <nl> + | | document - > isVideoMessage ( ) ) { <nl> + hidePreview ( ) ; <nl> + return ; <nl> + } <nl> + <nl> + startShow ( ) ; <nl> + _origin = origin ; <nl> + _photo = nullptr ; <nl> + _document = document ; <nl> + fillEmojiString ( ) ; <nl> + resetGifAndCache ( ) ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : showPreview ( <nl> + Data : : FileOrigin origin , <nl> + not_null < PhotoData * > photo ) { <nl> + startShow ( ) ; <nl> + _origin = origin ; <nl> + _photo = photo ; <nl> + _document = nullptr ; <nl> + fillEmojiString ( ) ; <nl> + resetGifAndCache ( ) ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : startShow ( ) { <nl> + _cache = QPixmap ( ) ; <nl> + if ( isHidden ( ) | | _a_shown . animating ( ) ) { <nl> + if ( isHidden ( ) ) { <nl> + show ( ) ; <nl> + _controller - > enableGifPauseReason ( Window : : GifPauseReason : : MediaPreview ) ; <nl> + } <nl> + _hiding = false ; <nl> + _a_shown . start ( [ this ] { update ( ) ; } , 0 . , 1 . , st : : stickerPreviewDuration ) ; <nl> + } else { <nl> + update ( ) ; <nl> + } <nl> + } <nl> + <nl> + void MediaPreviewWidget : : hidePreview ( ) { <nl> + if ( isHidden ( ) ) { <nl> + return ; <nl> + } <nl> + if ( _gif ) _cache = currentImage ( ) ; <nl> + _hiding = true ; <nl> + _a_shown . start ( [ this ] { update ( ) ; } , 1 . , 0 . , st : : stickerPreviewDuration ) ; <nl> + _photo = nullptr ; <nl> + _document = nullptr ; <nl> + resetGifAndCache ( ) ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : fillEmojiString ( ) { <nl> + _emojiList . clear ( ) ; <nl> + if ( _photo ) { <nl> + return ; <nl> + } <nl> + if ( auto sticker = _document - > sticker ( ) ) { <nl> + if ( auto list = Stickers : : GetEmojiListFromSet ( _document ) ) { <nl> + _emojiList = std : : move ( * list ) ; <nl> + while ( _emojiList . size ( ) > kStickerPreviewEmojiLimit ) { <nl> + _emojiList . pop_back ( ) ; <nl> + } <nl> + } else if ( const auto emoji = Ui : : Emoji : : Find ( sticker - > alt ) ) { <nl> + _emojiList . emplace_back ( emoji ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> + void MediaPreviewWidget : : resetGifAndCache ( ) { <nl> + _lottie = nullptr ; <nl> + _gif . reset ( ) ; <nl> + _cacheStatus = CacheNotLoaded ; <nl> + _cachedSize = QSize ( ) ; <nl> + } <nl> + <nl> + QSize MediaPreviewWidget : : currentDimensions ( ) const { <nl> + if ( ! _cachedSize . isEmpty ( ) ) { <nl> + return _cachedSize ; <nl> + } <nl> + if ( ! _document & & ! _photo ) { <nl> + _cachedSize = QSize ( _cache . width ( ) / cIntRetinaFactor ( ) , _cache . height ( ) / cIntRetinaFactor ( ) ) ; <nl> + return _cachedSize ; <nl> + } <nl> + <nl> + QSize result , box ; <nl> + if ( _photo ) { <nl> + result = QSize ( _photo - > width ( ) , _photo - > height ( ) ) ; <nl> + box = QSize ( width ( ) - 2 * st : : boxVerticalMargin , height ( ) - 2 * st : : boxVerticalMargin ) ; <nl> + } else { <nl> + result = _document - > dimensions ; <nl> + if ( _gif & & _gif - > ready ( ) ) { <nl> + result = QSize ( _gif - > width ( ) , _gif - > height ( ) ) ; <nl> + } <nl> + if ( _document - > sticker ( ) ) { <nl> + box = QSize ( st : : maxStickerSize , st : : maxStickerSize ) ; <nl> + } else { <nl> + box = QSize ( 2 * st : : maxStickerSize , 2 * st : : maxStickerSize ) ; <nl> + } <nl> + } <nl> + result = QSize ( qMax ( ConvertScale ( result . width ( ) ) , 1 ) , qMax ( ConvertScale ( result . height ( ) ) , 1 ) ) ; <nl> + if ( result . width ( ) > box . width ( ) ) { <nl> + result . setHeight ( qMax ( ( box . width ( ) * result . height ( ) ) / result . width ( ) , 1 ) ) ; <nl> + result . setWidth ( box . width ( ) ) ; <nl> + } <nl> + if ( result . height ( ) > box . height ( ) ) { <nl> + result . setWidth ( qMax ( ( box . height ( ) * result . width ( ) ) / result . height ( ) , 1 ) ) ; <nl> + result . setHeight ( box . height ( ) ) ; <nl> + } <nl> + if ( _photo ) { <nl> + _cachedSize = result ; <nl> + } <nl> + return result ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : setupLottie ( ) { <nl> + Expects ( _document ! = nullptr ) ; <nl> + <nl> + _lottie = std : : make_unique < Lottie : : SinglePlayer > ( <nl> + Lottie : : ReadContent ( _document - > data ( ) , _document - > filepath ( ) ) , <nl> + Lottie : : FrameRequest { currentDimensions ( ) * cIntRetinaFactor ( ) } , <nl> + Lottie : : Quality : : High ) ; <nl> + <nl> + _lottie - > updates ( <nl> + ) | rpl : : start_with_next ( [ = ] ( Lottie : : Update update ) { <nl> + update . data . match ( [ & ] ( const Lottie : : Information & ) { <nl> + this - > update ( ) ; <nl> + } , [ & ] ( const Lottie : : DisplayFrameRequest & ) { <nl> + this - > update ( updateArea ( ) ) ; <nl> + } ) ; <nl> + } , lifetime ( ) ) ; <nl> + } <nl> + <nl> + QPixmap MediaPreviewWidget : : currentImage ( ) const { <nl> + if ( _document ) { <nl> + if ( const auto sticker = _document - > sticker ( ) ) { <nl> + if ( _cacheStatus ! = CacheLoaded ) { <nl> + if ( sticker - > animated & & ! _lottie & & _document - > loaded ( ) ) { <nl> + const_cast < MediaPreviewWidget * > ( this ) - > setupLottie ( ) ; <nl> + } <nl> + if ( _lottie & & _lottie - > ready ( ) ) { <nl> + return QPixmap ( ) ; <nl> + } else if ( const auto image = _document - > getStickerLarge ( ) ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + _cache = image - > pix ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheLoaded ; <nl> + } else if ( _cacheStatus ! = CacheThumbLoaded <nl> + & & _document - > hasThumbnail ( ) <nl> + & & _document - > thumbnail ( ) - > loaded ( ) ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } <nl> + } <nl> + } else { <nl> + _document - > automaticLoad ( _origin , nullptr ) ; <nl> + if ( _document - > loaded ( ) ) { <nl> + if ( ! _gif & & ! _gif . isBad ( ) ) { <nl> + auto that = const_cast < MediaPreviewWidget * > ( this ) ; <nl> + that - > _gif = Media : : Clip : : MakeReader ( _document , FullMsgId ( ) , [ = ] ( Media : : Clip : : Notification notification ) { <nl> + that - > clipCallback ( notification ) ; <nl> + } ) ; <nl> + if ( _gif ) _gif - > setAutoplay ( ) ; <nl> + } <nl> + } <nl> + if ( _gif & & _gif - > started ( ) ) { <nl> + auto s = currentDimensions ( ) ; <nl> + auto paused = _controller - > isGifPausedAtLeastFor ( Window : : GifPauseReason : : MediaPreview ) ; <nl> + return _gif - > current ( s . width ( ) , s . height ( ) , s . width ( ) , s . height ( ) , ImageRoundRadius : : None , RectPart : : None , paused ? 0 : crl : : now ( ) ) ; <nl> + } <nl> + if ( _cacheStatus ! = CacheThumbLoaded <nl> + & & _document - > hasThumbnail ( ) ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + if ( _document - > thumbnail ( ) - > loaded ( ) ) { <nl> + _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } else if ( const auto blurred = _document - > thumbnailInline ( ) ) { <nl> + _cache = _document - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } else { <nl> + _document - > thumbnail ( ) - > load ( _origin ) ; <nl> + } <nl> + } <nl> + } <nl> + } else if ( _photo ) { <nl> + if ( _cacheStatus ! = CacheLoaded ) { <nl> + if ( _photo - > loaded ( ) ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + _cache = _photo - > large ( ) - > pix ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheLoaded ; <nl> + } else { <nl> + _photo - > load ( _origin ) ; <nl> + if ( _cacheStatus ! = CacheThumbLoaded ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + if ( _photo - > thumbnail ( ) - > loaded ( ) ) { <nl> + _cache = _photo - > thumbnail ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } else if ( _photo - > thumbnailSmall ( ) - > loaded ( ) ) { <nl> + _cache = _photo - > thumbnailSmall ( ) - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } else if ( const auto blurred = _photo - > thumbnailInline ( ) ) { <nl> + _cache = blurred - > pixBlurred ( _origin , s . width ( ) , s . height ( ) ) ; <nl> + _cacheStatus = CacheThumbLoaded ; <nl> + } else { <nl> + _photo - > thumbnailSmall ( ) - > load ( _origin ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> + } <nl> + return _cache ; <nl> + } <nl> + <nl> + void MediaPreviewWidget : : clipCallback ( Media : : Clip : : Notification notification ) { <nl> + using namespace Media : : Clip ; <nl> + switch ( notification ) { <nl> + case NotificationReinit : { <nl> + if ( _gif & & _gif - > state ( ) = = State : : Error ) { <nl> + _gif . setBad ( ) ; <nl> + } <nl> + <nl> + if ( _gif & & _gif - > ready ( ) & & ! _gif - > started ( ) ) { <nl> + QSize s = currentDimensions ( ) ; <nl> + _gif - > start ( s . width ( ) , s . height ( ) , s . width ( ) , s . height ( ) , ImageRoundRadius : : None , RectPart : : None ) ; <nl> + } <nl> + <nl> + update ( ) ; <nl> + } break ; <nl> + <nl> + case NotificationRepaint : { <nl> + if ( _gif & & ! _gif - > currentDisplayed ( ) ) { <nl> + update ( updateArea ( ) ) ; <nl> + } <nl> + } break ; <nl> + } <nl> + } <nl> + <nl> + MediaPreviewWidget : : ~ MediaPreviewWidget ( ) { <nl> + } <nl> + <nl> + } / / namespace Window <nl> new file mode 100644 <nl> index 00000000000 . . 7dc4cc350b1 <nl> mmm / dev / null <nl> ppp b / Telegram / SourceFiles / window / window_media_preview . h <nl> <nl> + / * <nl> + This file is part of Telegram Desktop , <nl> + the official desktop application for the Telegram messaging service . <nl> + <nl> + For license and copyright information please follow this link : <nl> + https : / / github . com / telegramdesktop / tdesktop / blob / master / LEGAL <nl> + * / <nl> + # pragma once <nl> + <nl> + # include " media / clip / media_clip_reader . h " <nl> + # include " ui / effects / animations . h " <nl> + # include " data / data_file_origin . h " <nl> + # include " ui / rp_widget . h " <nl> + <nl> + namespace Lottie { <nl> + class SinglePlayer ; <nl> + } / / namespace Lottie <nl> + <nl> + namespace Window { <nl> + <nl> + class SessionController ; <nl> + <nl> + class MediaPreviewWidget : public Ui : : RpWidget , private base : : Subscriber { <nl> + public : <nl> + MediaPreviewWidget ( <nl> + QWidget * parent , <nl> + not_null < Window : : SessionController * > controller ) ; <nl> + <nl> + void showPreview ( <nl> + Data : : FileOrigin origin , <nl> + not_null < DocumentData * > document ) ; <nl> + void showPreview ( <nl> + Data : : FileOrigin origin , <nl> + not_null < PhotoData * > photo ) ; <nl> + void hidePreview ( ) ; <nl> + <nl> + ~ MediaPreviewWidget ( ) ; <nl> + <nl> + protected : <nl> + void paintEvent ( QPaintEvent * e ) override ; <nl> + void resizeEvent ( QResizeEvent * e ) override ; <nl> + <nl> + private : <nl> + QSize currentDimensions ( ) const ; <nl> + QPixmap currentImage ( ) const ; <nl> + void setupLottie ( ) ; <nl> + void startShow ( ) ; <nl> + void fillEmojiString ( ) ; <nl> + void resetGifAndCache ( ) ; <nl> + [ [ nodiscard ] ] QRect updateArea ( ) const ; <nl> + <nl> + not_null < Window : : SessionController * > _controller ; <nl> + <nl> + Ui : : Animations : : Simple _a_shown ; <nl> + bool _hiding = false ; <nl> + Data : : FileOrigin _origin ; <nl> + DocumentData * _document = nullptr ; <nl> + PhotoData * _photo = nullptr ; <nl> + Media : : Clip : : ReaderPointer _gif ; <nl> + std : : unique_ptr < Lottie : : SinglePlayer > _lottie ; <nl> + <nl> + int _emojiSize ; <nl> + std : : vector < not_null < EmojiPtr > > _emojiList ; <nl> + <nl> + void clipCallback ( Media : : Clip : : Notification notification ) ; <nl> + <nl> + enum CacheStatus { <nl> + CacheNotLoaded , <nl> + CacheThumbLoaded , <nl> + CacheLoaded , <nl> + } ; <nl> + mutable CacheStatus _cacheStatus = CacheNotLoaded ; <nl> + mutable QPixmap _cache ; <nl> + mutable QSize _cachedSize ; <nl> + <nl> + } ; <nl> + <nl> + } / / namespace Window <nl> mmm a / Telegram / SourceFiles / window / window_peer_menu . cpp <nl> ppp b / Telegram / SourceFiles / window / window_peer_menu . cpp <nl> For license and copyright information please follow this link : <nl> # include " data / data_scheduled_messages . h " <nl> # include " dialogs / dialogs_key . h " <nl> # include " boxes / peers / edit_peer_info_box . h " <nl> + # include " facades . h " <nl> # include " styles / style_boxes . h " <nl> # include " styles / style_window . h " / / st : : windowMinWidth <nl> <nl> void PeerMenuDeleteContact ( not_null < UserData * > user ) { <nl> const auto text = tr : : lng_sure_delete_contact ( <nl> tr : : now , <nl> lt_contact , <nl> - App : : peerName ( user ) ) ; <nl> + user - > name ) ; <nl> const auto deleteSure = [ = ] { <nl> Ui : : hideLayer ( ) ; <nl> user - > session ( ) . api ( ) . request ( MTPcontacts_DeleteContacts ( <nl> mmm a / Telegram / SourceFiles / window / window_peer_menu . h <nl> ppp b / Telegram / SourceFiles / window / window_peer_menu . h <nl> For license and copyright information please follow this link : <nl> # pragma once <nl> <nl> class GenericBox ; <nl> + class History ; <nl> <nl> namespace Ui { <nl> class RpWidget ; <nl> mmm a / Telegram / SourceFiles / window / window_session_controller . cpp <nl> ppp b / Telegram / SourceFiles / window / window_session_controller . cpp <nl> For license and copyright information please follow this link : <nl> # include " main / main_session . h " <nl> # include " apiwrap . h " <nl> # include " support / support_helper . h " <nl> + # include " facades . h " <nl> # include " styles / style_window . h " <nl> # include " styles / style_dialogs . h " <nl> <nl> mmm a / Telegram / SourceFiles / window / window_session_controller . h <nl> ppp b / Telegram / SourceFiles / window / window_session_controller . h <nl> For license and copyright information please follow this link : <nl> # include " base / flags . h " <nl> # include " base / observer . h " <nl> # include " dialogs / dialogs_key . h " <nl> + # include " ui / effects / animation_value . h " <nl> <nl> class MainWidget ; <nl> class MainWindow ; <nl> class HistoryMessage ; <nl> class HistoryService ; <nl> <nl> + namespace Adaptive { <nl> + enum class WindowLayout ; <nl> + } / / namespace Adaptive <nl> + <nl> namespace ChatHelpers { <nl> class TabbedSelector ; <nl> } / / namespace ChatHelpers <nl> mmm a / Telegram / SourceFiles / window / window_top_bar_wrap . h <nl> ppp b / Telegram / SourceFiles / window / window_top_bar_wrap . h <nl> <nl> # pragma once <nl> <nl> # include " ui / wrap / slide_wrap . h " <nl> + # include " facades . h " <nl> <nl> namespace Window { <nl> <nl> mmm a / Telegram / gyp / telegram_sources . txt <nl> ppp b / Telegram / gyp / telegram_sources . txt <nl> <nl> < ( src_loc ) / support / support_helper . h <nl> < ( src_loc ) / support / support_templates . cpp <nl> < ( src_loc ) / support / support_templates . h <nl> + < ( src_loc ) / ui / effects / animation_value . cpp <nl> + < ( src_loc ) / ui / effects / animation_value . h <nl> < ( src_loc ) / ui / effects / animations . cpp <nl> < ( src_loc ) / ui / effects / animations . h <nl> < ( src_loc ) / ui / effects / cross_animation . cpp <nl> <nl> < ( src_loc ) / ui / wrap / wrap . h <nl> < ( src_loc ) / ui / abstract_button . cpp <nl> < ( src_loc ) / ui / abstract_button . h <nl> - < ( src_loc ) / ui / animation . cpp <nl> - < ( src_loc ) / ui / animation . h <nl> < ( src_loc ) / ui / countryinput . cpp <nl> < ( src_loc ) / ui / countryinput . h <nl> < ( src_loc ) / ui / emoji_config . cpp <nl> <nl> < ( src_loc ) / window / window_lock_widgets . h <nl> < ( src_loc ) / window / window_main_menu . cpp <nl> < ( src_loc ) / window / window_main_menu . h <nl> + < ( src_loc ) / window / window_media_preview . cpp <nl> + < ( src_loc ) / window / window_media_preview . h <nl> < ( src_loc ) / window / window_outdated_bar . cpp <nl> < ( src_loc ) / window / window_outdated_bar . h <nl> < ( src_loc ) / window / window_peer_menu . cpp <nl>
Remove app . h / facades . h from precompiled header .
telegramdesktop/tdesktop
0c713a930a40900c979205d60521532a2e67377d
2019-10-01T20:59:46Z
mmm a / libraries / chain / controller . cpp <nl> ppp b / libraries / chain / controller . cpp <nl> struct controller_impl { <nl> trx_context . enforce_whiteblacklist = false ; <nl> } else { <nl> bool skip_recording = replay_head_time & & ( time_point ( trx - > trx . expiration ) < = * replay_head_time ) ; <nl> - trx_context . init_for_input_trx ( trx - > packed_trx . get_unprunable_size ( ) , <nl> - trx - > packed_trx . get_prunable_size ( ) , <nl> + trx_context . init_for_input_trx ( trx - > packed_trx - > get_unprunable_size ( ) , <nl> + trx - > packed_trx - > get_prunable_size ( ) , <nl> trx - > trx . signatures . size ( ) , <nl> skip_recording ) ; <nl> } <nl> struct controller_impl { <nl> transaction_receipt : : status_enum s = ( trx_context . delay = = fc : : seconds ( 0 ) ) <nl> ? transaction_receipt : : executed <nl> : transaction_receipt : : delayed ; <nl> - trace - > receipt = push_receipt ( trx - > packed_trx , s , trx_context . billed_cpu_time_us , trace - > net_usage ) ; <nl> + trace - > receipt = push_receipt ( * trx - > packed_trx , s , trx_context . billed_cpu_time_us , trace - > net_usage ) ; <nl> pending - > _pending_block_state - > trxs . emplace_back ( trx ) ; <nl> } else { <nl> transaction_receipt_header r ; <nl> struct controller_impl { <nl> for ( const auto & receipt : b - > transactions ) { <nl> if ( receipt . trx . contains < packed_transaction > ( ) ) { <nl> auto & pt = receipt . trx . get < packed_transaction > ( ) ; <nl> - auto mtrx = std : : make_shared < transaction_metadata > ( pt ) ; <nl> + auto mtrx = std : : make_shared < transaction_metadata > ( std : : make_shared < packed_transaction > ( pt ) ) ; <nl> if ( ! self . skip_auth_check ( ) ) { <nl> std : : weak_ptr < transaction_metadata > mtrx_wp = mtrx ; <nl> mtrx - > signing_keys_future = async_thread_pool ( [ chain_id = this - > chain_id , mtrx_wp ] ( ) { <nl> mmm a / libraries / chain / include / eosio / chain / transaction_metadata . hpp <nl> ppp b / libraries / chain / include / eosio / chain / transaction_metadata . hpp <nl> class transaction_metadata { <nl> transaction_id_type id ; <nl> transaction_id_type signed_id ; <nl> signed_transaction trx ; <nl> - packed_transaction packed_trx ; <nl> + packed_transaction_ptr packed_trx ; <nl> optional < pair < chain_id_type , flat_set < public_key_type > > > signing_keys ; <nl> std : : future < pair < chain_id_type , flat_set < public_key_type > > > signing_keys_future ; <nl> bool accepted = false ; <nl> class transaction_metadata { <nl> bool scheduled = false ; <nl> <nl> explicit transaction_metadata ( const signed_transaction & t , packed_transaction : : compression_type c = packed_transaction : : none ) <nl> - : trx ( t ) , packed_trx ( t , c ) { <nl> + : trx ( t ) , packed_trx ( std : : make_shared < packed_transaction > ( t , c ) ) { <nl> id = trx . id ( ) ; <nl> / / raw_packed = fc : : raw : : pack ( static_cast < const transaction & > ( trx ) ) ; <nl> - signed_id = digest_type : : hash ( packed_trx ) ; <nl> + signed_id = digest_type : : hash ( * packed_trx ) ; <nl> } <nl> <nl> - explicit transaction_metadata ( const packed_transaction & ptrx ) <nl> - : trx ( ptrx . get_signed_transaction ( ) ) , packed_trx ( ptrx ) { <nl> + explicit transaction_metadata ( const packed_transaction_ptr & ptrx ) <nl> + : trx ( ptrx - > get_signed_transaction ( ) ) , packed_trx ( ptrx ) { <nl> id = trx . id ( ) ; <nl> / / raw_packed = fc : : raw : : pack ( static_cast < const transaction & > ( trx ) ) ; <nl> - signed_id = digest_type : : hash ( packed_trx ) ; <nl> + signed_id = digest_type : : hash ( * packed_trx ) ; <nl> } <nl> <nl> const flat_set < public_key_type > & recover_keys ( const chain_id_type & chain_id ) { <nl> mmm a / plugins / bnet_plugin / bnet_plugin . cpp <nl> ppp b / plugins / bnet_plugin / bnet_plugin . cpp <nl> namespace eosio { <nl> return false ; <nl> <nl> <nl> - auto ptrx_ptr = std : : make_shared < packed_transaction > ( start - > trx - > packed_trx ) ; <nl> + auto ptrx_ptr = start - > trx - > packed_trx ; <nl> <nl> idx . modify ( start , [ & ] ( auto & stat ) { <nl> stat . mark_known_by_peer ( ) ; <nl> mmm a / plugins / history_plugin / history_plugin . cpp <nl> ppp b / plugins / history_plugin / history_plugin . cpp <nl> namespace eosio { <nl> for ( const auto & receipt : blk - > transactions ) { <nl> if ( receipt . trx . contains < packed_transaction > ( ) ) { <nl> auto & pt = receipt . trx . get < packed_transaction > ( ) ; <nl> - auto mtrx = transaction_metadata ( pt ) ; <nl> + auto mtrx = transaction_metadata ( std : : make_shared < packed_transaction > ( pt ) ) ; <nl> if ( mtrx . id = = result . id ) { <nl> fc : : mutable_variant_object r ( " receipt " , receipt ) ; <nl> r ( " trx " , chain . to_variant_with_abi ( mtrx . trx , abi_serializer_max_time ) ) ; <nl> namespace eosio { <nl> for ( const auto & receipt : blk - > transactions ) { <nl> if ( receipt . trx . contains < packed_transaction > ( ) ) { <nl> auto & pt = receipt . trx . get < packed_transaction > ( ) ; <nl> - auto mtrx = transaction_metadata ( pt ) ; <nl> + auto mtrx = transaction_metadata ( std : : make_shared < packed_transaction > ( pt ) ) ; <nl> if ( txn_id_matched ( mtrx . id ) ) { <nl> result . id = mtrx . id ; <nl> result . last_irreversible_block = chain . last_irreversible_block_num ( ) ; <nl> mmm a / plugins / net_plugin / include / eosio / net_plugin / protocol . hpp <nl> ppp b / plugins / net_plugin / include / eosio / net_plugin / protocol . hpp <nl> namespace eosio { <nl> notice_message , <nl> request_message , <nl> sync_request_message , <nl> - signed_block , / / which = 7 <nl> - packed_transaction > ; <nl> + signed_block , / / which = 7 <nl> + packed_transaction > ; / / which = 8 <nl> <nl> } / / namespace eosio <nl> <nl> mmm a / plugins / net_plugin / net_plugin . cpp <nl> ppp b / plugins / net_plugin / net_plugin . cpp <nl> namespace eosio { <nl> void handle_message ( const connection_ptr & c , const sync_request_message & msg ) ; <nl> void handle_message ( const connection_ptr & c , const signed_block & msg ) = delete ; / / signed_block_ptr overload used instead <nl> void handle_message ( const connection_ptr & c , const signed_block_ptr & msg ) ; <nl> - void handle_message ( const connection_ptr & c , const packed_transaction & msg ) ; <nl> + void handle_message ( const connection_ptr & c , const packed_transaction & msg ) = delete ; / / packed_transaction_ptr overload used instead <nl> + void handle_message ( const connection_ptr & c , const packed_transaction_ptr & msg ) ; <nl> <nl> void start_conn_timer ( boost : : asio : : steady_timer : : duration du , std : : weak_ptr < connection > from_connection ) ; <nl> void start_txn_timer ( ) ; <nl> namespace eosio { <nl> msg_handler ( net_plugin_impl & imp , const connection_ptr & conn ) : impl ( imp ) , c ( conn ) { } <nl> <nl> void operator ( ) ( const signed_block & msg ) const { <nl> - EOS_ASSERT ( false , plugin_config_exception , " visit ( signed_block & & ) should be called " ) ; <nl> + EOS_ASSERT ( false , plugin_config_exception , " operator ( ) ( signed_block & & ) should be called " ) ; <nl> } <nl> void operator ( ) ( signed_block & msg ) const { <nl> - EOS_ASSERT ( false , plugin_config_exception , " visit ( signed_block & & ) should be called " ) ; <nl> + EOS_ASSERT ( false , plugin_config_exception , " operator ( ) ( signed_block & & ) should be called " ) ; <nl> } <nl> + void operator ( ) ( const packed_transaction & msg ) const { <nl> + EOS_ASSERT ( false , plugin_config_exception , " operator ( ) ( packed_transaction & & ) should be called " ) ; <nl> + } <nl> + void operator ( ) ( packed_transaction & msg ) const { <nl> + EOS_ASSERT ( false , plugin_config_exception , " operator ( ) ( packed_transaction & & ) should be called " ) ; <nl> + } <nl> + <nl> void operator ( ) ( signed_block & & msg ) const { <nl> impl . handle_message ( c , std : : make_shared < signed_block > ( std : : forward < signed_block > ( msg ) ) ) ; <nl> } <nl> + void operator ( ) ( packed_transaction & & msg ) const { <nl> + impl . handle_message ( c , std : : make_shared < packed_transaction > ( std : : forward < packed_transaction > ( msg ) ) ) ; <nl> + } <nl> <nl> template < typename T > <nl> void operator ( ) ( T & & msg ) const <nl> namespace eosio { <nl> std : : multimap < block_id_type , connection_ptr , sha256_less > received_blocks ; <nl> std : : multimap < transaction_id_type , connection_ptr , sha256_less > received_transactions ; <nl> <nl> - void bcast_transaction ( const packed_transaction & msg ) ; <nl> + void bcast_transaction ( const packed_transaction_ptr & trx ) ; <nl> void rejected_transaction ( const transaction_id_type & msg ) ; <nl> void bcast_block ( const block_state_ptr & bs ) ; <nl> void rejected_block ( const block_id_type & id ) ; <nl> namespace eosio { <nl> msg_handler m ( impl , shared_from_this ( ) ) ; <nl> if ( msg . contains < signed_block > ( ) ) { <nl> m ( std : : move ( msg . get < signed_block > ( ) ) ) ; <nl> + } else if ( msg . contains < packed_transaction > ( ) ) { <nl> + m ( std : : move ( msg . get < packed_transaction > ( ) ) ) ; <nl> } else { <nl> msg . visit ( m ) ; <nl> } <nl> namespace eosio { <nl> received_blocks . erase ( range . first , range . second ) ; <nl> } <nl> <nl> - void dispatch_manager : : bcast_transaction ( const packed_transaction & trx ) { <nl> + void dispatch_manager : : bcast_transaction ( const packed_transaction_ptr & trx ) { <nl> std : : set < connection_ptr > skips ; <nl> - transaction_id_type id = trx . id ( ) ; <nl> + transaction_id_type id = trx - > id ( ) ; <nl> <nl> auto range = received_transactions . equal_range ( id ) ; <nl> for ( auto org = range . first ; org ! = range . second ; + + org ) { <nl> namespace eosio { <nl> return ; <nl> } <nl> <nl> - time_point_sec trx_expiration = trx . expiration ( ) ; <nl> + time_point_sec trx_expiration = trx - > expiration ( ) ; <nl> <nl> - net_message msg ( trx ) ; <nl> + net_message msg ( * trx ) ; / / todo remove copy <nl> uint32_t packsiz = fc : : raw : : pack_size ( msg ) ; <nl> uint32_t bufsiz = packsiz + sizeof ( packsiz ) ; <nl> auto buff = std : : make_shared < vector < char > > ( bufsiz ) ; <nl> namespace eosio { <nl> } <nl> } <nl> <nl> - void net_plugin_impl : : handle_message ( const connection_ptr & c , const packed_transaction & msg ) { <nl> + void net_plugin_impl : : handle_message ( const connection_ptr & c , const packed_transaction_ptr & trx ) { <nl> fc_dlog ( logger , " got a packed transaction , cancel wait " ) ; <nl> peer_ilog ( c , " received packed_transaction " ) ; <nl> controller & cc = my_impl - > chain_plug - > chain ( ) ; <nl> namespace eosio { <nl> fc_dlog ( logger , " got a txn during sync - dropping " ) ; <nl> return ; <nl> } <nl> - transaction_id_type tid = msg . id ( ) ; <nl> + transaction_id_type tid = trx - > id ( ) ; <nl> c - > cancel_wait ( ) ; <nl> if ( local_txns . get < by_id > ( ) . find ( tid ) ! = local_txns . end ( ) ) { <nl> fc_dlog ( logger , " got a duplicate transaction - dropping " ) ; <nl> return ; <nl> } <nl> dispatcher - > recv_transaction ( c , tid ) ; <nl> - chain_plug - > accept_transaction ( msg , [ = ] ( const static_variant < fc : : exception_ptr , transaction_trace_ptr > & result ) { <nl> + chain_plug - > accept_transaction ( trx , [ c , this , trx ] ( const static_variant < fc : : exception_ptr , transaction_trace_ptr > & result ) { <nl> if ( result . contains < fc : : exception_ptr > ( ) ) { <nl> peer_dlog ( c , " bad packed_transaction : $ { m } " , ( " m " , result . get < fc : : exception_ptr > ( ) - > what ( ) ) ) ; <nl> } else { <nl> auto trace = result . get < transaction_trace_ptr > ( ) ; <nl> if ( ! trace - > except ) { <nl> fc_dlog ( logger , " chain accepted transaction " ) ; <nl> - dispatcher - > bcast_transaction ( msg ) ; <nl> + this - > dispatcher - > bcast_transaction ( trx ) ; <nl> return ; <nl> } <nl> <nl> peer_elog ( c , " bad packed_transaction : $ { m } " , ( " m " , trace - > except - > what ( ) ) ) ; <nl> } <nl> <nl> - dispatcher - > rejected_transaction ( tid ) ; <nl> + dispatcher - > rejected_transaction ( trx - > id ( ) ) ; <nl> } ) ; <nl> } <nl> <nl> namespace eosio { <nl> dispatcher - > rejected_transaction ( id ) ; <nl> } else { <nl> fc_ilog ( logger , " signaled ACK , trx - id = $ { id } " , ( " id " , id ) ) ; <nl> - dispatcher - > bcast_transaction ( * results . second ) ; <nl> + dispatcher - > bcast_transaction ( results . second ) ; <nl> } <nl> } <nl> <nl> namespace eosio { <nl> <nl> my - > chain_plug = app ( ) . find_plugin < chain_plugin > ( ) ; <nl> EOS_ASSERT ( my - > chain_plug , chain : : missing_chain_plugin_exception , " " ) ; <nl> - my - > chain_id = app ( ) . get_plugin < chain_plugin > ( ) . get_chain_id ( ) ; <nl> + my - > chain_id = my - > chain_plug - > get_chain_id ( ) ; <nl> fc : : rand_pseudo_bytes ( my - > node_id . data ( ) , my - > node_id . data_size ( ) ) ; <nl> ilog ( " my node_id is $ { id } " , ( " id " , my - > node_id ) ) ; <nl> <nl> mmm a / plugins / producer_plugin / producer_plugin . cpp <nl> ppp b / plugins / producer_plugin / producer_plugin . cpp <nl> class producer_plugin_impl : public std : : enable_shared_from_this < producer_plugin <nl> std : : deque < std : : tuple < packed_transaction_ptr , bool , next_function < transaction_trace_ptr > > > _pending_incoming_transactions ; <nl> <nl> void on_incoming_transaction_async ( const packed_transaction_ptr & trx , bool persist_until_expired , next_function < transaction_trace_ptr > next ) { <nl> + / / todo remove chain_plugin lookup <nl> chain : : controller & chain = app ( ) . get_plugin < chain_plugin > ( ) . chain ( ) ; <nl> if ( ! chain . pending_block_state ( ) ) { <nl> _pending_incoming_transactions . emplace_back ( trx , persist_until_expired , next ) ; <nl> class producer_plugin_impl : public std : : enable_shared_from_this < producer_plugin <nl> } <nl> <nl> try { <nl> - auto trace = chain . push_transaction ( std : : make_shared < transaction_metadata > ( * trx ) , deadline ) ; <nl> + auto trace = chain . push_transaction ( std : : make_shared < transaction_metadata > ( trx ) , deadline ) ; <nl> if ( trace - > except ) { <nl> if ( failure_is_subjective ( * trace - > except , deadline_is_subjective ) ) { <nl> _pending_incoming_transactions . emplace_back ( trx , persist_until_expired , next ) ; <nl> producer_plugin_impl : : start_block_result producer_plugin_impl : : start_block ( bool <nl> apply_trxs . reserve ( unapplied_trxs . size ( ) ) ; <nl> <nl> auto calculate_transaction_category = [ & ] ( const transaction_metadata_ptr & trx ) { <nl> - if ( trx - > packed_trx . expiration ( ) < pbs - > header . timestamp . to_time_point ( ) ) { <nl> + if ( trx - > packed_trx - > expiration ( ) < pbs - > header . timestamp . to_time_point ( ) ) { <nl> return tx_category : : EXPIRED ; <nl> } else if ( persisted_by_id . find ( trx - > id ) ! = persisted_by_id . end ( ) ) { <nl> return tx_category : : PERSISTED ; <nl>
Minimize packed_transaction copies . Store packed_transaction_ptr in transaction_metadata .
EOSIO/eos
cfc3a857ef618cc4006a2f853cbfa87e2971acc3
2018-12-06T17:04:35Z
mmm a / include / swift / AST / SemanticAttrs . def <nl> ppp b / include / swift / AST / SemanticAttrs . def <nl> SEMANTICS_ATTR ( ARRAY_COUNT , " array . count " ) <nl> SEMANTICS_ATTR ( ARRAY_DEALLOC_UNINITIALIZED , " array . dealloc_uninitialized " ) <nl> SEMANTICS_ATTR ( ARRAY_UNINITIALIZED_INTRINSIC , " array . uninitialized_intrinsic " ) <nl> <nl> + SEMANTICS_ATTR ( SEQUENCE_FOR_EACH , " sequence . forEach " ) <nl> + <nl> SEMANTICS_ATTR ( OPTIMIZE_SIL_SPECIALIZE_GENERIC_NEVER , " optimize . sil . specialize . generic . never " ) <nl> SEMANTICS_ATTR ( OPTIMIZE_SIL_SPECIALIZE_GENERIC_PARTIAL_NEVER , <nl> " optimize . sil . specialize . generic . partial . never " ) <nl> mmm a / include / swift / SILOptimizer / PassManager / Passes . def <nl> ppp b / include / swift / SILOptimizer / PassManager / Passes . def <nl> PASS ( NonInlinableFunctionSkippingChecker , " check - non - inlinable - function - skipping <nl> PASS ( YieldOnceCheck , " yield - once - check " , <nl> " Check correct usage of yields in yield - once coroutines " ) <nl> PASS ( OSLogOptimization , " os - log - optimization " , " Optimize os log calls " ) <nl> + PASS ( ForEachLoopUnroll , " for - each - loop - unroll " , <nl> + " Unroll forEach loops over array literals " ) <nl> PASS ( MandatoryCombine , " mandatory - combine " , <nl> " Perform mandatory peephole combines " ) <nl> PASS ( BugReducerTester , " bug - reducer - tester " , <nl> mmm a / include / swift / SILOptimizer / Utils / InstOptUtils . h <nl> ppp b / include / swift / SILOptimizer / Utils / InstOptUtils . h <nl> class InstructionDeleter { <nl> SILInstruction * inst , <nl> llvm : : function_ref < void ( SILInstruction * ) > callback = <nl> [ ] ( SILInstruction * ) { } ) ; <nl> + <nl> + / / / Recursively visit users of \ c inst ( including \ c inst ) and force delete <nl> + / / / them . Also , destroy the consumed operands of the deleted instructions <nl> + / / / whenever necessary . Invoke the \ c callback on instructions that are <nl> + / / / deleted . <nl> + void recursivelyForceDeleteUsersAndFixLifetimes ( <nl> + SILInstruction * inst , <nl> + llvm : : function_ref < void ( SILInstruction * ) > callback = <nl> + [ ] ( SILInstruction * ) { } ) ; <nl> } ; <nl> <nl> / / / If \ c inst is dead , delete it and recursively eliminate all code that <nl> mmm a / lib / SILOptimizer / LoopTransforms / CMakeLists . txt <nl> ppp b / lib / SILOptimizer / LoopTransforms / CMakeLists . txt <nl> silopt_register_sources ( <nl> LoopRotate . cpp <nl> LoopUnroll . cpp <nl> LICM . cpp <nl> + ForEachLoopUnroll . cpp <nl> ) <nl> new file mode 100644 <nl> index 000000000000 . . 56715e2bbc74 <nl> mmm / dev / null <nl> ppp b / lib / SILOptimizer / LoopTransforms / ForEachLoopUnroll . cpp <nl> <nl> + / / = = = mmm ForEachLoopUnrolling . cpp - Unroll loops over array literals mmm - - = = = / / <nl> + / / <nl> + / / This source file is part of the Swift . org open source project <nl> + / / <nl> + / / Copyright ( c ) 2014 - 2020 Apple Inc . and the Swift project authors <nl> + / / Licensed under Apache License v2 . 0 with Runtime Library Exception <nl> + / / <nl> + / / See https : / / swift . org / LICENSE . txt for license information <nl> + / / See https : / / swift . org / CONTRIBUTORS . txt for the list of Swift project authors <nl> + / / <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + <nl> + / / This pass unrolls Sequence . forEach calls invoked on an array created <nl> + / / from an array literal . See below for an overview of the algorithm . This is <nl> + / / a function - level transformation pass that operates on ownership SIL and <nl> + / / so must be applied before ownership is stripped . <nl> + / / <nl> + / / Algorithm overview : <nl> + / / <nl> + / / 1 . Iterate over the body of the function and analyze calls to the array <nl> + / / initializer annotated " array . uninitialized_intrinsic " . This is done in <nl> + / / ` run ` method . <nl> + / / <nl> + / / 2 . For every " array . uninintialized_intrinsic " initializer call , try <nl> + / / extracting the elements with which the array is initialized , and classify <nl> + / / the uses of the array into incidental uses , forEach calls and uses that <nl> + / / can write into the array . If any of the following conditions hold , give <nl> + / / up and look for the next initializer call : <nl> + / / - The elements stored into the array cannot be extracted . <nl> + / / - The array can be modified after initialization . <nl> + / / - There are no forEach calls on the array . <nl> + / / - The array is too large to unroll forEach calls . This check uses <nl> + / / SILModule : : UnrollThreshold parameter . <nl> + / / If none of the above conditions hold , procede to unrolling every forEach <nl> + / / call on the array ( Step 3 ) . Step 2 is implemented in the function : <nl> + / / ` tryUnrollForEachCallsOverArrayLiteral ` . <nl> + / / <nl> + / / 3 . Given a forEach call , unroll it by applying the " body closure " passed to <nl> + / / the call to every element of the array . There are three important <nl> + / / details to this unrolling . Firstly , the SILValue of the element stored <nl> + / / into the array through the store instruction ( identified in step 2 ) may <nl> + / / not be valid at the point where the unrolling must happen ( i . e . , where the <nl> + / / forEach is called ) . Therefore , we need to copy_value the elements at the <nl> + / / point where they are stored and ensure that the copies are alive until <nl> + / / they are used by the unrolled code . The implementation actually <nl> + / / makes the copies valid for the entire lifetime of the array . <nl> + / / <nl> + / / Secondly , the body closure uses @ in_guaranteed convention for the <nl> + / / parameter . Therefore , an alloc_stack is created before the unrolled code <nl> + / / begins to hold the elements , and is destoryed once the unrolled code ends . <nl> + / / <nl> + / / Thirdly , the body closure throws . Hence , it has to be try_applied . This <nl> + / / means that we need to chain the try_applies in such a way that when the <nl> + / / try_apply on the element e_i completes normally it jumps to the try_apply <nl> + / / of e_i + 1 . When the try_apply ( of any element ) throws , it must go to the <nl> + / / error block of the original forEach call . <nl> + / / <nl> + / / All of this is implemented by the function ` unrollForEach ` . <nl> + / / <nl> + / / 4 . Delete the forEach calls that were unrolled and clean up dead code <nl> + / / resulting due to that . <nl> + / / <nl> + / / This transformation is illustrated below on a small example : <nl> + / / <nl> + / / Input : <nl> + / / % initResult = apply % arrayUninitialized ( . . . ) <nl> + / / ( % array , % storage_ptr ) = destructure_tuple % initResult <nl> + / / store % elem1 at array index 1 <nl> + / / store % elem2 at array index 2 <nl> + / / . . <nl> + / / try_apply % forEach ( % body , % array ) normal bb1 , error bb2 <nl> + / / bb1 ( % res : $ ( ) ) : <nl> + / / . . <nl> + / / bb2 ( % error : @ owned $ Error ) : <nl> + / / . . . <nl> + / / bb3 : <nl> + / / destroy_value % array <nl> + / / <nl> + / / Output : <nl> + / / <nl> + / / % initResult = apply % arrayUninitialized ( . . . ) <nl> + / / ( % array , % storage_ptr ) = destructure_tuple % initResult <nl> + / / % elem1copy = copy_value % elem1 < - - <nl> + / / store % elem1 at array index 1 <nl> + / / % elem2copy = copy_value % elem2 < - - <nl> + / / store % elem2 at array index 2 <nl> + / / . . <nl> + / / alloc_stack % stack <nl> + / / % elem1borrow = begin_borrow % elem1copy <nl> + / / store_borrow % elem1borrow to % stack <nl> + / / end_borrow % elem1borrow <nl> + / / try_apply % body ( % stack ) normal normalbb1 , error errbb1 <nl> + / / <nl> + / / errbb1 ( % error : @ owned $ Error ) : <nl> + / / br bb2 ( % error ) <nl> + / / <nl> + / / normalbb1 ( % res : $ ( ) ) : <nl> + / / % elem2borrow = begin_borrow % elem2copy <nl> + / / store_borrow % elem2borrow to % stack <nl> + / / end_borrow % elem2borrow <nl> + / / try_apply % body ( % stack ) normal bb1 , error errbb2 <nl> + / / <nl> + / / errbb2 ( % error : @ owned $ Error ) : <nl> + / / br bb2 ( % error ) <nl> + / / <nl> + / / bb1 ( % res : $ ( ) ) : <nl> + / / dealloc_stack % stack <nl> + / / . . . <nl> + / / bb2 ( % error : @ owned $ Error ) : <nl> + / / . . . <nl> + / / dealloc_stack % stack <nl> + / / bb3 : <nl> + / / destroy_value % elem1copy <nl> + / / destroy_value % elem2copy <nl> + / / destroy_value % array <nl> + <nl> + # include " swift / AST / ASTContext . h " <nl> + # include " swift / AST / Expr . h " <nl> + # include " swift / AST / Module . h " <nl> + # include " swift / AST / SemanticAttrs . h " <nl> + # include " swift / AST / SubstitutionMap . h " <nl> + # include " swift / Basic / OptimizationMode . h " <nl> + # include " swift / SIL / BasicBlockUtils . h " <nl> + # include " swift / SIL / CFG . h " <nl> + # include " swift / SIL / DebugUtils . h " <nl> + # include " swift / SIL / InstructionUtils . h " <nl> + # include " swift / SIL / OwnershipUtils . h " <nl> + # include " swift / SIL / SILBasicBlock . h " <nl> + # include " swift / SIL / SILBuilder . h " <nl> + # include " swift / SIL / SILConstants . h " <nl> + # include " swift / SIL / SILFunction . h " <nl> + # include " swift / SIL / SILInstruction . h " <nl> + # include " swift / SIL / SILModule . h " <nl> + # include " swift / SIL / TypeLowering . h " <nl> + # include " swift / SILOptimizer / Analysis / ArraySemantic . h " <nl> + # include " swift / SILOptimizer / PassManager / Passes . h " <nl> + # include " swift / SILOptimizer / PassManager / Transforms . h " <nl> + # include " swift / SILOptimizer / Utils / CFGOptUtils . h " <nl> + # include " swift / SILOptimizer / Utils / InstOptUtils . h " <nl> + # include " swift / SILOptimizer / Utils / ValueLifetime . h " <nl> + # include " llvm / ADT / DenseMap . h " <nl> + # include " llvm / ADT / SmallVector . h " <nl> + <nl> + using namespace swift ; <nl> + <nl> + namespace { <nl> + <nl> + / / / A class for processing and storing information about an array <nl> + / / / such as the values with which it is initialized and the kind of <nl> + / / / users it has . <nl> + class ArrayInfo { <nl> + / / / The array value returned by the _allocateUninitialized call . <nl> + SILValue arrayValue ; <nl> + <nl> + / / / A map from an array index to the store instruction that initializes that <nl> + / / / index . <nl> + llvm : : DenseMap < uint64_t , StoreInst * > elementStoreMap ; <nl> + <nl> + / / / List of Sequence . forEach calls invoked on the array . <nl> + SmallSetVector < TryApplyInst * , 4 > forEachCalls ; <nl> + <nl> + / / / Indicates whether the array could be modified after initialization . Note <nl> + / / / that this not include modifications to the elements of the array . When <nl> + / / / set , this will prevent the forEach loops from getting unrolled . <nl> + bool mayBeWritten = false ; <nl> + <nl> + / / / Instructions that destroy the array . These must be destroy_value <nl> + / / / instructions either of the \ c arrayValue or the copy_values of that . <nl> + SmallVector < SILInstruction * , 4 > destroys ; <nl> + <nl> + / / / Classify uses of the array into forEach uses , read - only uses etc . and set <nl> + / / / the fields of this instance appropriately . This function will recursively <nl> + / / / classify the uses of borrows and copy - values of the array as well . <nl> + void classifyUsesOfArray ( SILValue arrayValue ) ; <nl> + <nl> + public : <nl> + ArrayInfo ( ) { } <nl> + <nl> + / / / Given an apply instruction \ c apply , try to initialize this ArrayInfo <nl> + / / / with it . This would succeed iff the apply instruction starts an <nl> + / / / initialization pattern that is auto - generated by the compiler for array <nl> + / / / literals . Return true on success and false on failure . <nl> + bool tryInitialize ( ApplyInst * apply ) ; <nl> + <nl> + / / / Return the SILValue of the array that is initialized . <nl> + SILValue getArrayValue ( ) { <nl> + assert ( arrayValue ) ; <nl> + return arrayValue ; <nl> + } <nl> + <nl> + / / / Return true iff the array could be modified after initialization . <nl> + bool mayBeModified ( ) { <nl> + assert ( arrayValue ) ; <nl> + return mayBeWritten ; <nl> + } <nl> + <nl> + / / / Return the forEach uses identified for the array . <nl> + ArrayRef < TryApplyInst * > getForEachUses ( ) { <nl> + assert ( arrayValue ) ; <nl> + return ArrayRef < TryApplyInst * > ( forEachCalls . begin ( ) , forEachCalls . end ( ) ) ; <nl> + } <nl> + <nl> + / / / Return the number of elements in the array . <nl> + uint64_t getNumElements ( ) { <nl> + assert ( arrayValue ) ; <nl> + return elementStoreMap . size ( ) ; <nl> + } <nl> + <nl> + / / / Return the store instruction that initializes the given \ c index <nl> + / / / of the array . <nl> + StoreInst * getElementStore ( uint64_t index ) { <nl> + assert ( arrayValue ) ; <nl> + return elementStoreMap [ index ] ; <nl> + } <nl> + <nl> + / / / Return the SIL type of the elements stored in the array . <nl> + / / / \ pre the array must be non - empty . <nl> + SILType getElementSILType ( ) { <nl> + assert ( getNumElements ( ) > 0 & & " cannot call this on empty arrays " ) ; <nl> + return elementStoreMap [ 0 ] - > getSrc ( ) - > getType ( ) ; <nl> + } <nl> + <nl> + / / / Add the destroy_value instructions that represents the last use of the <nl> + / / / array to the parameter \ c lastDestroys . The \ c lastDestroys <nl> + / / / added by this function are guaranteed to come after all uses of the <nl> + / / / \ c arrayValue and copy_values of the \ c arrayValue ( along all <nl> + / / / " non - dead - end " blocks ) . <nl> + void getLastDestroys ( SmallVectorImpl < DestroyValueInst * > & lastDestroys ) ; <nl> + } ; <nl> + <nl> + / / / Given a Array - typed SIL value \ c array and an instruction \ c user that uses <nl> + / / / the array , check whether this use actually represents a call to _fixLifetime <nl> + / / / function . This would be the case if \ c user is a store_borrow instruction <nl> + / / / that stores into an alloc_stack which is passed to a fixLifetime <nl> + / / / instruction . That is , if the following pattern holds : <nl> + / / / <nl> + / / / % stack = alloc_stack <nl> + / / / user : store_borrow % array to % stack <nl> + / / / fixLifetime % stack <nl> + / / / \ returns the fixLifetime instruction if this is a fixLifetime use of the <nl> + / / / array , nullptr otherwise . <nl> + static FixLifetimeInst * isFixLifetimeUseOfArray ( SILInstruction * user , <nl> + SILValue array ) { <nl> + StoreBorrowInst * storeUser = dyn_cast < StoreBorrowInst > ( user ) ; <nl> + if ( ! storeUser | | storeUser - > getSrc ( ) ! = array ) <nl> + return nullptr ; <nl> + AllocStackInst * alloc = dyn_cast < AllocStackInst > ( storeUser - > getDest ( ) ) ; <nl> + if ( ! alloc ) <nl> + return nullptr ; <nl> + auto fixLifetimeUsers = alloc - > getUsersOfType < FixLifetimeInst > ( ) ; <nl> + if ( fixLifetimeUsers . empty ( ) ) <nl> + return nullptr ; <nl> + auto firstUser = fixLifetimeUsers . begin ( ) ; <nl> + FixLifetimeInst * result = * firstUser ; <nl> + / / We need to have a unique result . <nl> + if ( + + firstUser ! = fixLifetimeUsers . end ( ) ) <nl> + return nullptr ; <nl> + return result ; <nl> + } <nl> + <nl> + / / / Given an array - typed SIL value \ c array and an instruction \ c user that uses <nl> + / / / the array , check whether this use actually represents a call to the <nl> + / / / Sequence . forEach function . This would be case if \ c user is a store_borrow <nl> + / / / instruction that stores into an alloc_stack which is passed to a try - apply <nl> + / / / of the Sequence . forEach function . That is , if the following pattern holds : <nl> + / / / <nl> + / / / % stack = alloc_stack <nl> + / / / user : store_borrow % array to % stack <nl> + / / / try_apply % forEachCall ( % closure , % array ) <nl> + / / / \ returns the try - apply instruction invoking the forEach function if this is <nl> + / / / a forEach use of the array , nullptr otherwise . <nl> + static TryApplyInst * isForEachUseOfArray ( SILInstruction * user , SILValue array ) { <nl> + StoreBorrowInst * storeUser = dyn_cast < StoreBorrowInst > ( user ) ; <nl> + if ( ! storeUser | | storeUser - > getSrc ( ) ! = array ) <nl> + return nullptr ; <nl> + AllocStackInst * alloc = dyn_cast < AllocStackInst > ( storeUser - > getDest ( ) ) ; <nl> + if ( ! alloc ) <nl> + return nullptr ; <nl> + auto applyUsers = alloc - > getUsersOfType < TryApplyInst > ( ) ; <nl> + if ( applyUsers . empty ( ) ) <nl> + return nullptr ; <nl> + auto firstUser = applyUsers . begin ( ) ; <nl> + TryApplyInst * apply = * firstUser ; <nl> + / / We need to have a unique result . <nl> + if ( + + firstUser ! = applyUsers . end ( ) ) <nl> + return nullptr ; <nl> + SILFunction * callee = apply - > getCalleeFunction ( ) ; <nl> + if ( ! callee | | ! callee - > hasSemanticsAttr ( semantics : : SEQUENCE_FOR_EACH ) ) <nl> + return nullptr ; <nl> + return apply ; <nl> + } <nl> + <nl> + void ArrayInfo : : classifyUsesOfArray ( SILValue arrayValue ) { <nl> + for ( Operand * operand : arrayValue - > getUses ( ) ) { <nl> + auto * user = operand - > getUser ( ) ; <nl> + if ( isIncidentalUse ( user ) ) <nl> + continue ; <nl> + / / Ignore this user if it is a call to _fixLifetime . Note that this use <nl> + / / will not be subsumed by InstructionUtils : : isIncidentalUse check made <nl> + / / above as the array would be passed indirectly . <nl> + if ( isFixLifetimeUseOfArray ( user , arrayValue ) ) <nl> + continue ; <nl> + / / Check if this is a forEach call on the array . <nl> + if ( TryApplyInst * forEachCall = isForEachUseOfArray ( user , arrayValue ) ) { <nl> + forEachCalls . insert ( forEachCall ) ; <nl> + continue ; <nl> + } <nl> + / / Recursively classify begin_borrow and copy_value uses . <nl> + if ( BeginBorrowInst * beginBorrow = dyn_cast < BeginBorrowInst > ( user ) ) { <nl> + classifyUsesOfArray ( beginBorrow ) ; <nl> + continue ; <nl> + } <nl> + if ( CopyValueInst * copyValue = dyn_cast < CopyValueInst > ( user ) ) { <nl> + classifyUsesOfArray ( copyValue ) ; <nl> + continue ; <nl> + } <nl> + if ( DestroyValueInst * destroyValue = dyn_cast < DestroyValueInst > ( user ) ) { <nl> + destroys . push_back ( destroyValue ) ; <nl> + continue ; <nl> + } <nl> + / / Set mayBeWritten to true if the user could potentially modify the array . <nl> + / / Note that the array elements are allowed to be modified as long <nl> + / / as the array itself is not modified ( which is possible with reference <nl> + / / types ) . <nl> + ArraySemanticsCall arrayOp ( user ) ; <nl> + if ( ! arrayOp . doesNotChangeArray ( ) ) <nl> + mayBeWritten = true ; <nl> + } <nl> + } <nl> + <nl> + bool ArrayInfo : : tryInitialize ( ApplyInst * apply ) { <nl> + ArraySemanticsCall arrayAllocateUninitCall ( <nl> + apply , semantics : : ARRAY_UNINITIALIZED_INTRINSIC ) ; <nl> + if ( ! arrayAllocateUninitCall ) <nl> + return false ; <nl> + arrayValue = arrayAllocateUninitCall . getArrayValue ( ) ; <nl> + if ( ! arrayValue ) <nl> + return false ; <nl> + if ( ! arrayAllocateUninitCall . mapInitializationStores ( elementStoreMap ) ) <nl> + return false ; <nl> + / / Collect information about uses of the array value . <nl> + classifyUsesOfArray ( arrayValue ) ; <nl> + return true ; <nl> + } <nl> + <nl> + void ArrayInfo : : getLastDestroys ( <nl> + SmallVectorImpl < DestroyValueInst * > & lastDestroys ) { <nl> + assert ( arrayValue ) ; <nl> + / / Collect the frontier instructions of the field \ c destroys , which stores <nl> + / / destroy_value instructions of the \ c arrayValue as well as of its <nl> + / / copy_values , using ValueLifetimeAnalysis . The frontier is a list of <nl> + / / instructions that mark the exits of the flow of control from the <nl> + / / \ c destroys . <nl> + ValueLifetimeAnalysis lifetimeAnalysis = <nl> + ValueLifetimeAnalysis ( arrayValue - > getDefiningInstruction ( ) , destroys ) ; <nl> + ValueLifetimeAnalysis : : Frontier frontier ; <nl> + lifetimeAnalysis . computeFrontier ( frontier , <nl> + ValueLifetimeAnalysis : : DontModifyCFG ) ; <nl> + for ( SILInstruction * frontierInst : frontier ) { <nl> + / / Skip frontier instructions at the start of a basic block as they do not <nl> + / / follow a destroy_value of the array . Note that the goal is to collect <nl> + / / the last destroys , which must always immediately preceed a frontier <nl> + / / instruction as it marks the end of the use of the array . <nl> + if ( frontierInst = = & frontierInst - > getParent ( ) - > front ( ) ) <nl> + continue ; <nl> + SILInstruction * inst = & * ( - - frontierInst - > getIterator ( ) ) ; <nl> + / / This must be a destroy instruction . Moreover it must also belong to \ c <nl> + / / destroys . <nl> + DestroyValueInst * lastDestroy = dyn_cast < DestroyValueInst > ( inst ) ; <nl> + assert ( lastDestroy ) ; <nl> + lastDestroys . push_back ( cast < DestroyValueInst > ( lastDestroy ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / / Delete the forEach calls from the SIL that contains it . This function will <nl> + / / / not clean up any resulting dead instructions . <nl> + static void removeForEachCall ( TryApplyInst * forEachCall , <nl> + InstructionDeleter & deleter ) { <nl> + AllocStackInst * allocStack = <nl> + dyn_cast < AllocStackInst > ( forEachCall - > getArgument ( 1 ) ) ; <nl> + assert ( allocStack ) ; <nl> + / / The allocStack will be used in the forEach call and also in a store <nl> + / / instruction and a dealloc_stack instruction . Force delete all of them . <nl> + deleter . recursivelyForceDeleteUsersAndFixLifetimes ( allocStack ) ; <nl> + } <nl> + <nl> + / / / Unroll the \ c forEachCall on an array , using the information in <nl> + / / / \ c ArrayInfo . Once unrolled , \ c forEachCall will be deleted <nl> + / / / from the containing function . This function implements the following <nl> + / / / transformation . <nl> + / / / - If the array stores non - trivial elements , for every element stored <nl> + / / / into the array , insert a copy_value of the element just before it <nl> + / / / is stored . This is necessary so that an @ owned SILValue for the <nl> + / / / element is available at the point where the forEach is used . <nl> + / / / <nl> + / / / - Create an alloc_stack A at the point of the forEach call . This is <nl> + / / / necessary to indirectly pass the elements of the array . <nl> + / / / <nl> + / / / For every element e_i at the index i of the array , do the following : <nl> + / / / - create a new basic block b_i if i > 0 . Let b_0 denote the basic block <nl> + / / / that contains the forEach call . <nl> + / / / - store_borrow the element e_i into the alloc_stack A . Note that we <nl> + / / / can use the owned copy of e_i created in the previous step . <nl> + / / / - try_apply the forEach ' s body closure on the the alloc_stack A . <nl> + / / / If i is not the last index , jump to b_i + 1 in the normal case of the <nl> + / / / try_apply . If i is the last index of the array jump to the normal <nl> + / / / target of the forEach call . Jump to a new error block : err_i in the <nl> + / / / error case . Make err_i jump to the error target of the original <nl> + / / / forEach call . <nl> + / / / <nl> + / / / - Dealloc the alloc_stack along the normal and error targets of the <nl> + / / / forEach calls . <nl> + / / / <nl> + / / / - Destroy all the copies of the elements ( if it is non - trivial ) just <nl> + / / / before the array ' s lifetime ends . <nl> + static void unrollForEach ( ArrayInfo & arrayInfo , TryApplyInst * forEachCall , <nl> + InstructionDeleter & deleter ) { <nl> + if ( arrayInfo . getNumElements ( ) = = 0 ) { <nl> + / / If this is an empty array , delete the forEach entirely . <nl> + removeForEachCall ( forEachCall , deleter ) ; <nl> + return ; <nl> + } <nl> + <nl> + SILFunction * fun = forEachCall - > getFunction ( ) ; <nl> + SILLocation forEachLoc = forEachCall - > getLoc ( ) ; <nl> + SILValue forEachBodyClosure = forEachCall - > getArgument ( 0 ) ; <nl> + SILType arrayElementType = arrayInfo . getElementSILType ( ) ; <nl> + <nl> + SILFunctionType * bodyClosureType = <nl> + forEachBodyClosure - > getType ( ) . getAs < SILFunctionType > ( ) ; <nl> + SILParameterInfo bodyParameterInfo = bodyClosureType - > getParameters ( ) [ 0 ] ; <nl> + / / The forEachBodyClosure must use @ in_guaranteed convention for passing <nl> + / / arguments . <nl> + assert ( bodyParameterInfo . getConvention ( ) = = <nl> + ParameterConvention : : Indirect_In_Guaranteed & & <nl> + " forEach body closure is expected to take @ in_guaranteed argument " ) ; <nl> + <nl> + / / Copy the elements stored into the array . This is necessary as we need to <nl> + / / extend the lifetime of the stored elements at least until the forEach call , <nl> + / / which will now be unrolled . The following code inserts a copy_value of the <nl> + / / elements just before the point where they are stored into the array , and <nl> + / / a corresponding destroy_value at the end of the lifetime of the array . In <nl> + / / other words , the lifetime of the element copies are made to match the <nl> + / / lifetime of the array . Even though copies can be destroyed sooner after <nl> + / / they are used by the unrolled code , doing so may introduce more destroys <nl> + / / than needed as the unrolled code have many branches ( due to try applies ) <nl> + / / all of which joins later into a single path eventually . <nl> + SmallVector < SILValue , 4 > elementCopies ; <nl> + for ( uint64_t i = 0 ; i < arrayInfo . getNumElements ( ) ; i + + ) { <nl> + StoreInst * elementStore = arrayInfo . getElementStore ( i ) ; <nl> + / / Insert the copy just before the store of the element into the array . <nl> + SILValue copy = SILBuilderWithScope ( elementStore ) <nl> + . emitCopyValueOperation ( elementStore - > getLoc ( ) , <nl> + elementStore - > getSrc ( ) ) ; <nl> + elementCopies . push_back ( copy ) ; <nl> + } <nl> + <nl> + / / Destroy the copy_value of the elements before the last destroys of the <nl> + / / array . It is important that the copied elements are destroyed before the <nl> + / / array is destroyed . This enables other optimizations . <nl> + SmallVector < DestroyValueInst * , 4 > lastDestroys ; <nl> + arrayInfo . getLastDestroys ( lastDestroys ) ; <nl> + for ( DestroyValueInst * destroy : lastDestroys ) { <nl> + SILBuilderWithScope destroyBuilder ( destroy ) ; <nl> + for ( SILValue element : elementCopies ) { <nl> + destroyBuilder . emitDestroyValueOperation ( destroy - > getLoc ( ) , element ) ; <nl> + } <nl> + } <nl> + <nl> + / / Create alloc_stack for passing the array elements indirectly . <nl> + SILValue allocStack = SILBuilderWithScope ( forEachCall ) <nl> + . createAllocStack ( forEachLoc , arrayElementType ) ; <nl> + <nl> + / / Extract the Error and normal targets of the forEach call . Both these <nl> + / / targets must be taking a phi argument . <nl> + SILBasicBlock * normalBB = forEachCall - > getNormalBB ( ) ; <nl> + SILBasicBlock * errorBB = forEachCall - > getErrorBB ( ) ; <nl> + assert ( errorBB - > getSILPhiArguments ( ) . size ( ) = = 1 & & <nl> + normalBB - > getSILPhiArguments ( ) . size ( ) = = 1 ) ; <nl> + SILPhiArgument * normalArgument = normalBB - > getSILPhiArguments ( ) [ 0 ] ; <nl> + SILPhiArgument * errorArgument = errorBB - > getSILPhiArguments ( ) [ 0 ] ; <nl> + <nl> + / / A generator for creating a basic block for use as the target of the <nl> + / / " normal " branch of a try_apply . <nl> + auto normalTargetGenerator = [ & ] ( SILBasicBlock * insertionBlock ) { <nl> + SILBasicBlock * newBB = fun - > createBasicBlockBefore ( insertionBlock ) ; <nl> + newBB - > createPhiArgument ( normalArgument - > getType ( ) , <nl> + normalArgument - > getOwnershipKind ( ) ) ; <nl> + return newBB ; <nl> + } ; <nl> + <nl> + / / A generator for creating a basic block for use as the target of the <nl> + / / " error " branch of a try_apply . The error block created here will always <nl> + / / jump to the error target of the original forEach . <nl> + auto errorTargetGenerator = [ & ] ( SILBasicBlock * insertionBlock ) { <nl> + SILBasicBlock * newErrorBB = fun - > createBasicBlockBefore ( insertionBlock ) ; <nl> + SILValue argument = newErrorBB - > createPhiArgument ( <nl> + errorArgument - > getType ( ) , errorArgument - > getOwnershipKind ( ) ) ; <nl> + / / Make the errorBB jump to the error target of the original forEach . <nl> + SILBuilderWithScope builder ( newErrorBB , forEachCall ) ; <nl> + builder . createBranch ( forEachLoc , errorBB , argument ) ; <nl> + return newErrorBB ; <nl> + } ; <nl> + <nl> + / / The basic block to jump to in the normal case of the try_apply in each <nl> + / / unrolling . <nl> + SILBasicBlock * nextNormalBB = normalBB ; <nl> + <nl> + / / Iterate through the array indices in the reverse order and do the <nl> + / / following : <nl> + / / - create a new basic block b_i if i > 0 . Let b_0 denote the basic block <nl> + / / that contains the forEach call . <nl> + / / - store_borrow the owned copy of the element e_i into the ` allocStack ` . <nl> + / / - try_apply the forEach ' s body closure on the ` allocStack ` . The normal <nl> + / / target of the try_apply is b_i + 1 if i is not the last index , otherwise <nl> + / / it is ` normalBB ` . ( The normal target is captured by ` nextNormalBB ` . ) <nl> + / / Jump to a new error block : err_i in the error case . Note that all <nl> + / / error blocks jump to the error target of the original forEach call . <nl> + for ( uint64_t num = arrayInfo . getNumElements ( ) ; num > 0 ; num - - ) { <nl> + SILValue elementCopy = elementCopies [ num - 1 ] ; <nl> + SILBasicBlock * currentBB = num > 1 ? normalTargetGenerator ( nextNormalBB ) <nl> + : forEachCall - > getParentBlock ( ) ; <nl> + SILBuilderWithScope unrollBuilder ( currentBB , forEachCall ) ; <nl> + if ( arrayElementType . isTrivial ( * fun ) ) { <nl> + unrollBuilder . createStore ( forEachLoc , elementCopy , allocStack , <nl> + StoreOwnershipQualifier : : Trivial ) ; <nl> + } else { <nl> + / / Borrow the elementCopy and store it in the allocStack . Note that the <nl> + / / element ' s copy is guaranteed to be alive until the array is alive . <nl> + / / Therefore it is okay to use a borrow here . <nl> + SILValue borrowedElem = <nl> + unrollBuilder . createBeginBorrow ( forEachLoc , elementCopy ) ; <nl> + unrollBuilder . createStoreBorrow ( forEachLoc , borrowedElem , allocStack ) ; <nl> + unrollBuilder . createEndBorrow ( forEachLoc , borrowedElem ) ; <nl> + } <nl> + SILBasicBlock * errorTarget = errorTargetGenerator ( nextNormalBB ) ; <nl> + / / Note that the substitution map must be empty as we are not supporting <nl> + / / elements of address - only type . All elements in the array are guaranteed <nl> + / / to be loadable . TODO : generalize this to address - only types . <nl> + unrollBuilder . createTryApply ( forEachLoc , forEachBodyClosure , <nl> + SubstitutionMap ( ) , allocStack , nextNormalBB , <nl> + errorTarget ) ; <nl> + nextNormalBB = currentBB ; <nl> + } <nl> + <nl> + / / Dealloc the stack in the normalBB and also in errorBB . Note that every <nl> + / / try_apply created during the unrolling must pass through these blocks . <nl> + SILBuilderWithScope ( & normalBB - > front ( ) ) <nl> + . createDeallocStack ( forEachLoc , allocStack ) ; <nl> + SILBuilderWithScope ( & errorBB - > front ( ) ) <nl> + . createDeallocStack ( forEachLoc , allocStack ) ; <nl> + <nl> + / / Remove the forEach call as it has now been unrolled . <nl> + removeForEachCall ( forEachCall , deleter ) ; <nl> + } <nl> + <nl> + / / / Determine whether the cost of unrolling the forEach is within the <nl> + / / / \ c unrollThreshold . <nl> + static bool canUnrollForEachOfArray ( ArrayInfo arrayInfo , SILModule & module ) { <nl> + const uint64_t unrollThreshold = module . getOptions ( ) . UnrollThreshold ; <nl> + / / The cost of unrolling a forEach loop is mostly just two instructions per <nl> + / / array element : one to store the element into an alloc_stack and another to <nl> + / / invoke the forEach body closure with the element . Note that the copy_value <nl> + / / of the element and the basic blocks created for the try - applies of the <nl> + / / body closure are not counted , as these should likely get optimized away . <nl> + const uint64_t cost = 2 ; <nl> + return arrayInfo . getNumElements ( ) * cost < = unrollThreshold ; <nl> + } <nl> + <nl> + static bool tryUnrollForEachCallsOverArrayLiteral ( ApplyInst * apply , <nl> + InstructionDeleter & deleter ) { <nl> + ArrayInfo arrayInfo ; <nl> + if ( ! arrayInfo . tryInitialize ( apply ) ) <nl> + return false ; <nl> + / / Bail out , if the array could be modified after initialization . <nl> + if ( arrayInfo . mayBeModified ( ) ) <nl> + return false ; <nl> + / / If there are no forEach loops to unroll , return . <nl> + ArrayRef < TryApplyInst * > forEachCalls = arrayInfo . getForEachUses ( ) ; <nl> + if ( forEachCalls . empty ( ) ) <nl> + return false ; <nl> + / / If the array is too large to unroll , bail out . <nl> + if ( ! canUnrollForEachOfArray ( arrayInfo , apply - > getParent ( ) - > getModule ( ) ) ) <nl> + return false ; <nl> + for ( TryApplyInst * forEachCall : forEachCalls ) <nl> + unrollForEach ( arrayInfo , forEachCall , deleter ) ; <nl> + return true ; <nl> + } <nl> + <nl> + class ForEachLoopUnroller : public SILFunctionTransform { <nl> + <nl> + ~ ForEachLoopUnroller ( ) override { } <nl> + <nl> + void run ( ) override { <nl> + SILFunction & fun = * getFunction ( ) ; <nl> + bool changed = false ; <nl> + <nl> + if ( ! fun . hasOwnership ( ) ) <nl> + return ; <nl> + <nl> + InstructionDeleter deleter ; <nl> + for ( SILBasicBlock & bb : fun ) { <nl> + for ( auto instIter = bb . begin ( ) ; instIter ! = bb . end ( ) ; ) { <nl> + SILInstruction * inst = & * instIter ; <nl> + ApplyInst * apply = dyn_cast < ApplyInst > ( inst ) ; <nl> + if ( ! apply ) { <nl> + instIter + + ; <nl> + continue ; <nl> + } <nl> + / / Note that the following operation may delete a forEach call but <nl> + / / would not delete this apply instruction , which is an array <nl> + / / initializer . Therefore , the iterator should be valid here . <nl> + changed | = tryUnrollForEachCallsOverArrayLiteral ( apply , deleter ) ; <nl> + instIter + + ; <nl> + } <nl> + } <nl> + <nl> + if ( changed ) { <nl> + deleter . cleanUpDeadInstructions ( ) ; <nl> + PM - > invalidateAnalysis ( & fun , <nl> + SILAnalysis : : InvalidationKind : : FunctionBody ) ; <nl> + } <nl> + } <nl> + } ; <nl> + <nl> + } / / end anonymous namespace <nl> + <nl> + SILTransform * swift : : createForEachLoopUnroll ( ) { <nl> + return new ForEachLoopUnroller ( ) ; <nl> + } <nl> mmm a / lib / SILOptimizer / PassManager / PassPipeline . cpp <nl> ppp b / lib / SILOptimizer / PassManager / PassPipeline . cpp <nl> SILPassPipelinePlan : : getSILOptPreparePassPipeline ( const SILOptions & Options ) { <nl> } <nl> <nl> P . startPipeline ( " SILOpt Prepare Passes " ) ; <nl> + P . addForEachLoopUnroll ( ) ; <nl> P . addMandatoryCombine ( ) ; <nl> P . addAccessMarkerElimination ( ) ; <nl> <nl> SILPassPipelinePlan : : getOnonePassPipeline ( const SILOptions & Options ) { <nl> SILPassPipelinePlan P ( Options ) ; <nl> <nl> P . startPipeline ( " Mandatory Combines " ) ; <nl> + P . addForEachLoopUnroll ( ) ; <nl> P . addMandatoryCombine ( ) ; <nl> <nl> / / First serialize the SIL if we are asked to . <nl> mmm a / lib / SILOptimizer / Utils / InstOptUtils . cpp <nl> ppp b / lib / SILOptimizer / Utils / InstOptUtils . cpp <nl> void InstructionDeleter : : recursivelyDeleteUsersIfDead ( SILInstruction * inst , <nl> deleteIfDead ( inst , callback ) ; <nl> } <nl> <nl> + void InstructionDeleter : : recursivelyForceDeleteUsersAndFixLifetimes ( <nl> + SILInstruction * inst , CallbackTy callback ) { <nl> + for ( SILValue result : inst - > getResults ( ) ) { <nl> + while ( ! result - > use_empty ( ) ) { <nl> + SILInstruction * user = result - > use_begin ( ) - > getUser ( ) ; <nl> + recursivelyForceDeleteUsersAndFixLifetimes ( user ) ; <nl> + } <nl> + } <nl> + if ( isIncidentalUse ( inst ) | | isa < DestroyValueInst > ( inst ) ) { <nl> + forceDelete ( inst ) ; <nl> + return ; <nl> + } <nl> + forceDeleteAndFixLifetimes ( inst ) ; <nl> + } <nl> + <nl> void swift : : eliminateDeadInstruction ( SILInstruction * inst , <nl> CallbackTy callback ) { <nl> InstructionDeleter deleter ; <nl> mmm a / stdlib / public / core / Sequence . swift <nl> ppp b / stdlib / public / core / Sequence . swift <nl> extension Sequence { <nl> / / / <nl> / / / - Parameter body : A closure that takes an element of the sequence as a <nl> / / / parameter . <nl> + @ _semantics ( " sequence . forEach " ) <nl> @ inlinable <nl> public func forEach ( <nl> _ body : ( Element ) throws - > Void <nl> new file mode 100644 <nl> index 000000000000 . . 8af1817fcf29 <nl> mmm / dev / null <nl> ppp b / test / SILOptimizer / OSLogPrototypeFullOptTest . swift <nl> <nl> + / / RUN : % target - swift - frontend - emit - ir - swift - version 5 - O - primary - file % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> + / / REQUIRES : OS = macosx | | OS = ios | | OS = tvos | | OS = watchos <nl> + <nl> + / / This tests the optimality of the IR generated for the new os log APIs . This <nl> + / / is not testing the output of a specific optimization pass ( which has separate <nl> + / / tests ) but that all optimizations together result in optimal IR . If this test <nl> + / / fails , it implies that some expected optimizations fail to get triggered on <nl> + / / os log APIs . TODO : eventually these optimization should also happen in Onone <nl> + / / mode . <nl> + <nl> + import OSLogPrototype <nl> + import Foundation <nl> + <nl> + / / CHECK - LABEL : define hidden swiftcc void @ " $ { { . * } } testSimpleInterpolation <nl> + @ available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * ) <nl> + func testSimpleInterpolation ( h : Logger ) { <nl> + h . log ( level : . debug , " Minimum integer value : \ ( Int . min ) " ) <nl> + / / CHECK : entry : <nl> + / / CHECK - NEXT : [ [ LOGLEVEL : % . + ] ] = tail call swiftcc i8 @ " $ sSo13os_log_type_ta0A0E5debugABvgZ " ( ) <nl> + / / CHECK - NEXT : tail call swiftcc % TSo9OS_os_logC * @ " $ s14OSLogPrototype6LoggerV9logObjectSo06OS_os_D0Cvg " <nl> + / / CHECK - NEXT : [ [ LOGOBJ : % . + ] ] = bitcast % TSo9OS_os_logC * <nl> + / / CHECK - NEXT : tail call zeroext i1 @ os_log_type_enabled <nl> + / / CHECK - NEXT : br i1 { { % . * } } , label % [ [ ENABLED : [ 0 - 9 ] + ] ] , label % [ [ NOT_ENABLED : [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ENABLED ] ] : <nl> + / / <nl> + / / Header bytes . <nl> + / / <nl> + / / CHECK - 64 - NEXT : [ [ BUFFER : % . + ] ] = tail call noalias i8 * @ swift_slowAlloc ( i64 12 <nl> + / / CHECK - 32 - NEXT : [ [ BUFFER : % . + ] ] = tail call noalias i8 * @ swift_slowAlloc ( i32 8 <nl> + / / CHECK - NEXT : store i8 0 , i8 * [ [ BUFFER ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET1 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 1 <nl> + / / CHECK - NEXT : store i8 1 , i8 * [ [ OFFSET1 ] ] , align 1 <nl> + / / <nl> + / / Argument bytes . <nl> + / / <nl> + / / CHECK - NEXT : [ [ OFFSET2 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 2 <nl> + / / CHECK - NEXT : store i8 2 , i8 * [ [ OFFSET2 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET3 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 3 <nl> + / / CHECK - 64 - NEXT : store i8 8 , i8 * [ [ OFFSET3 ] ] , align 1 <nl> + / / CHECK - 32 - NEXT : store i8 4 , i8 * [ [ OFFSET3 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET4 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 4 <nl> + / / CHECK - NEXT : [ [ BITCASTED : % . + ] ] = bitcast i8 * [ [ OFFSET4 ] ] to i { { . * } } * <nl> + / / CHECK - 64 - NEXT : store i64 - 9223372036854775808 , i64 * [ [ BITCASTED ] ] , align 1 <nl> + / / CHECK - 32 - NEXT : store i32 - 2147483648 , i32 * [ [ BITCASTED ] ] , align 1 <nl> + / / CHECK - 64 - NEXT : tail call void @ _os_log_impl ( { { . * } } , { { . * } } [ [ LOGOBJ ] ] , i8 zeroext [ [ LOGLEVEL ] ] , i8 * getelementptr inbounds ( [ 35 x i8 ] , [ 35 x i8 ] * @ { { . * } } , i64 0 , i64 0 ) , i8 * [ [ BUFFER ] ] , i32 12 ) <nl> + / / CHECK - 32 - NEXT : tail call void @ _os_log_impl ( { { . * } } , { { . * } } [ [ LOGOBJ ] ] , i8 zeroext [ [ LOGLEVEL ] ] , i8 * getelementptr inbounds ( [ 35 x i8 ] , [ 35 x i8 ] * @ { { . * } } , i32 0 , i32 0 ) , i8 * [ [ BUFFER ] ] , i32 8 ) <nl> + / / CHECK - NEXT : tail call void @ swift_slowDealloc ( i8 * [ [ BUFFER ] ] <nl> + / / CHECK - NEXT : br label % [ [ NOT_ENABLED ] ] <nl> + <nl> + / / CHECK : [ [ NOT_ENABLED ] ] : <nl> + / / CHECK - NEXT : bitcast <nl> + / / CHECK - NEXT : tail call void @ llvm . objc . release <nl> + / / CHECK - NEXT : ret void <nl> + } <nl> + <nl> + / / CHECK - LABEL : define hidden swiftcc void @ " $ { { . * } } testInterpolationWithMultipleArguments <nl> + @ available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * ) <nl> + func testInterpolationWithMultipleArguments ( h : Logger ) { <nl> + let privateID : Int32 = 0x79abcdef <nl> + let filePermissions : Int32 = 0o777 <nl> + let pid : Int32 = 122225 <nl> + h . log ( <nl> + level : . error , <nl> + " " " <nl> + Access prevented : process \ ( pid ) initiated by \ <nl> + user : \ ( privateID , privacy : . private ) attempted resetting \ <nl> + permissions to \ ( filePermissions ) <nl> + " " " ) <nl> + / / CHECK : entry : <nl> + / / CHECK - NEXT : [ [ LOGLEVEL : % . + ] ] = tail call swiftcc i8 @ " $ sSo13os_log_type_ta0A0E5errorABvgZ " ( ) <nl> + / / CHECK - NEXT : tail call swiftcc % TSo9OS_os_logC * @ " $ s14OSLogPrototype6LoggerV9logObjectSo06OS_os_D0Cvg " <nl> + / / CHECK - NEXT : [ [ LOGOBJ : % . + ] ] = bitcast % TSo9OS_os_logC * <nl> + / / CHECK - NEXT : tail call zeroext i1 @ os_log_type_enabled <nl> + / / CHECK - NEXT : br i1 { { % . * } } , label % [ [ ENABLED : [ 0 - 9 ] + ] ] , label % [ [ NOT_ENABLED : [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ENABLED ] ] : <nl> + / / <nl> + / / Header bytes . <nl> + / / <nl> + / / CHECK - NEXT : [ [ BUFFER : % . + ] ] = tail call noalias i8 * @ swift_slowAlloc ( i { { . * } } 20 <nl> + / / CHECK - NEXT : store i8 1 , i8 * [ [ BUFFER ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET1 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 1 <nl> + / / CHECK - NEXT : store i8 3 , i8 * [ [ OFFSET1 ] ] , align 1 <nl> + / / <nl> + / / First argument bytes . <nl> + / / <nl> + / / CHECK - NEXT : [ [ OFFSET2 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 2 <nl> + / / CHECK - NEXT : store i8 2 , i8 * [ [ OFFSET2 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET3 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 3 <nl> + / / CHECK - NEXT : store i8 4 , i8 * [ [ OFFSET3 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET4 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 4 <nl> + / / CHECK - NEXT : [ [ BITCASTED : % . + ] ] = bitcast i8 * [ [ OFFSET4 ] ] to i32 * <nl> + / / CHECK - NEXT : store i32 122225 , i32 * [ [ BITCASTED ] ] , align 1 <nl> + / / <nl> + / / Second argument <nl> + / / <nl> + / / CHECK - NEXT : [ [ OFFSET12 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 8 <nl> + / / CHECK - NEXT : store i8 1 , i8 * [ [ OFFSET12 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET13 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 9 <nl> + / / CHECK - NEXT : store i8 4 , i8 * [ [ OFFSET13 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET14 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 10 <nl> + / / CHECK - NEXT : [ [ BITCASTED2 : % . + ] ] = bitcast i8 * [ [ OFFSET14 ] ] to i32 * <nl> + / / CHECK - NEXT : store i32 2041302511 , i32 * [ [ BITCASTED2 ] ] , align 1 <nl> + / / <nl> + / / Third argument <nl> + / / <nl> + / / CHECK - NEXT : [ [ OFFSET22 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 14 <nl> + / / CHECK - NEXT : store i8 2 , i8 * [ [ OFFSET22 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET23 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 15 <nl> + / / CHECK - NEXT : store i8 4 , i8 * [ [ OFFSET23 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET24 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 16 <nl> + / / CHECK - NEXT : [ [ BITCASTED3 : % . + ] ] = bitcast i8 * [ [ OFFSET24 ] ] to i32 * <nl> + / / CHECK - NEXT : store i32 511 , i32 * [ [ BITCASTED3 ] ] , align 1 <nl> + / / <nl> + / / os_log_impl call . <nl> + / / CHECK - NEXT : tail call void @ _os_log_impl ( { { . * } } , { { . * } } [ [ LOGOBJ ] ] , i8 zeroext [ [ LOGLEVEL ] ] , i8 * getelementptr inbounds ( [ 114 x i8 ] , [ 114 x i8 ] * @ { { . * } } , i { { . * } } 0 , i { { . * } } 0 ) , i8 * [ [ BUFFER ] ] , i32 20 ) <nl> + / / CHECK - NEXT : tail call void @ swift_slowDealloc ( i8 * [ [ BUFFER ] ] <nl> + / / CHECK - NEXT : br label % [ [ NOT_ENABLED ] ] <nl> + <nl> + / / CHECK : [ [ NOT_ENABLED ] ] : <nl> + / / CHECK - NEXT : bitcast <nl> + / / CHECK - NEXT : tail call void @ llvm . objc . release <nl> + / / CHECK - NEXT : ret void <nl> + } <nl> + <nl> + / / CHECK - LABEL : define hidden swiftcc void @ " $ { { . * } } testNSObjectInterpolation <nl> + @ available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * ) <nl> + func testNSObjectInterpolation ( h : Logger , nsArray : NSArray ) { <nl> + h . log ( " NSArray : \ ( nsArray , privacy : . public ) " ) <nl> + / / CHECK : entry : <nl> + / / CHECK - NEXT : bitcast % TSo7NSArrayC * % 1 to i8 * <nl> + / / CHECK - NEXT : [ [ NSARRAY_ARG : % . + ] ] = tail call i8 * @ llvm . objc . retain <nl> + / / CHECK - NEXT : [ [ LOGLEVEL : % . + ] ] = tail call swiftcc i8 @ " $ sSo13os_log_type_ta0A0E7defaultABvgZ " ( ) <nl> + / / CHECK - NEXT : tail call swiftcc % TSo9OS_os_logC * @ " $ s14OSLogPrototype6LoggerV9logObjectSo06OS_os_D0Cvg " <nl> + / / CHECK - NEXT : [ [ LOGOBJ : % . + ] ] = bitcast % TSo9OS_os_logC * <nl> + / / CHECK - NEXT : tail call zeroext i1 @ os_log_type_enabled <nl> + / / CHECK - NEXT : br i1 { { % . * } } , label % [ [ ENABLED : [ 0 - 9 ] + ] ] , label % [ [ NOT_ENABLED : [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ENABLED ] ] : <nl> + / / <nl> + / / Header bytes . <nl> + / / <nl> + / / CHECK - 64 - NEXT : [ [ BUFFER : % . + ] ] = tail call noalias i8 * @ swift_slowAlloc ( i64 12 <nl> + / / CHECK - 32 - NEXT : [ [ BUFFER : % . + ] ] = tail call noalias i8 * @ swift_slowAlloc ( i32 8 <nl> + / / CHECK - NEXT : store i8 2 , i8 * [ [ BUFFER ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET1 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 1 <nl> + / / CHECK - NEXT : store i8 1 , i8 * [ [ OFFSET1 ] ] , align 1 <nl> + / / <nl> + / / Argument bytes . <nl> + / / <nl> + / / CHECK - NEXT : [ [ OFFSET2 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 2 <nl> + / / CHECK - NEXT : store i8 66 , i8 * [ [ OFFSET2 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET3 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 3 <nl> + / / CHECK - 64 - NEXT : store i8 8 , i8 * [ [ OFFSET3 ] ] , align 1 <nl> + / / CHECK - 32 - NEXT : store i8 4 , i8 * [ [ OFFSET3 ] ] , align 1 <nl> + / / CHECK - NEXT : [ [ OFFSET4 : % . + ] ] = getelementptr inbounds i8 , i8 * [ [ BUFFER ] ] , i { { . * } } 4 <nl> + / / CHECK - NEXT : [ [ BITCASTED_DEST : % . + ] ] = bitcast i8 * [ [ OFFSET4 ] ] to % TSo7NSArrayC * * <nl> + / / CHECK - NEXT : [ [ BITCASTED_SRC : % . + ] ] = bitcast i8 * [ [ NSARRAY_ARG ] ] to % TSo7NSArrayC * <nl> + / / CHECK - NEXT : store % TSo7NSArrayC * [ [ BITCASTED_SRC ] ] , % TSo7NSArrayC * * [ [ BITCASTED_DEST ] ] , align 1 <nl> + / / CHECK - 64 - NEXT : tail call void @ _os_log_impl ( { { . * } } , { { . * } } [ [ LOGOBJ ] ] , i8 zeroext [ [ LOGLEVEL ] ] , i8 * getelementptr inbounds ( [ 20 x i8 ] , [ 20 x i8 ] * @ { { . * } } , i64 0 , i64 0 ) , i8 * [ [ BUFFER ] ] , i32 12 ) <nl> + / / CHECK - 32 - NEXT : tail call void @ _os_log_impl ( { { . * } } , { { . * } } [ [ LOGOBJ ] ] , i8 zeroext [ [ LOGLEVEL ] ] , i8 * getelementptr inbounds ( [ 20 x i8 ] , [ 20 x i8 ] * @ { { . * } } , i32 0 , i32 0 ) , i8 * [ [ BUFFER ] ] , i32 8 ) <nl> + / / CHECK - NEXT : tail call void @ swift_slowDealloc ( i8 * [ [ BUFFER ] ] <nl> + / / CHECK - NEXT : br label % [ [ NOT_ENABLED ] ] <nl> + <nl> + / / CHECK : [ [ NOT_ENABLED ] ] : <nl> + / / CHECK - NEXT : tail call void @ llvm . objc . release ( i8 * [ [ NSARRAY_ARG ] ] ) <nl> + / / CHECK - NEXT : bitcast <nl> + / / CHECK - NEXT : tail call void @ llvm . objc . release <nl> + / / CHECK - NEXT : ret void <nl> + } <nl> + <nl> + / / TODO : add test for String . It is more complicated due to more complex logic <nl> + / / in string serialization . <nl> new file mode 100644 <nl> index 000000000000 . . 0414fa420bd3 <nl> mmm / dev / null <nl> ppp b / test / SILOptimizer / for_each_loop_unroll_test . sil <nl> <nl> + / / RUN : % target - sil - opt - for - each - loop - unroll - enable - sil - verify - all % s 2 > & 1 | % FileCheck % s <nl> + <nl> + / / SIL tests for the ForEachLoopUnroll mandatory optimization pass that unrolls <nl> + / / Sequence . forEach calls over array literals . <nl> + <nl> + import Swift <nl> + import Builtin <nl> + <nl> + sil [ _semantics " array . uninitialized_intrinsic " ] @ _allocateUninitializedArray : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + <nl> + sil [ _semantics " sequence . forEach " ] @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + <nl> + sil @ forEachBody : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + <nl> + sil hidden [ ossa ] @ forEachLoopUnrollTest : $ @ convention ( thin ) ( ) - > ( ) { <nl> + bb0 : <nl> + % 0 = integer_literal $ Builtin . Word , 2 <nl> + % 1 = function_ref @ _allocateUninitializedArray : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + % 2 = apply % 1 < Builtin . Int64 > ( % 0 ) : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + ( % 3 , % 4 ) = destructure_tuple % 2 : $ ( Array < Builtin . Int64 > , Builtin . RawPointer ) <nl> + % 5 = pointer_to_address % 4 : $ Builtin . RawPointer to [ strict ] $ * Builtin . Int64 <nl> + % 6 = integer_literal $ Builtin . Int64 , 15 <nl> + store % 6 to [ trivial ] % 5 : $ * Builtin . Int64 <nl> + % 12 = integer_literal $ Builtin . Word , 1 <nl> + % 13 = index_addr % 5 : $ * Builtin . Int64 , % 12 : $ Builtin . Word <nl> + % 14 = integer_literal $ Builtin . Int64 , 27 <nl> + store % 14 to [ trivial ] % 13 : $ * Builtin . Int64 <nl> + % 21 = begin_borrow % 3 : $ Array < Builtin . Int64 > <nl> + % 22 = alloc_stack $ Array < Builtin . Int64 > <nl> + % 23 = store_borrow % 21 to % 22 : $ * Array < Builtin . Int64 > <nl> + % 24 = function_ref @ forEachBody : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 25 = convert_function % 24 : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 26 = thin_to_thick_function % 25 : $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ noescape @ callee_guaranteed ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + / / A stub for Sequence . forEach ( _ : ) <nl> + % 30 = function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + try_apply % 30 < [ Builtin . Int64 ] > ( % 26 , % 22 ) : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error , normal bb1 , error bb2 <nl> + <nl> + bb1 ( % 32 : $ ( ) ) : <nl> + dealloc_stack % 22 : $ * Array < Builtin . Int64 > <nl> + end_borrow % 21 : $ Array < Builtin . Int64 > <nl> + destroy_value % 3 : $ Array < Builtin . Int64 > <nl> + % 37 = tuple ( ) <nl> + return % 37 : $ ( ) <nl> + <nl> + bb2 ( % 39 : @ owned $ Error ) : <nl> + unreachable <nl> + } <nl> + / / CHECK - LABEL : forEachLoopUnrollTest <nl> + / / CHECK : [ [ LIT1 : % [ 0 - 9 ] + ] ] = integer_literal $ Builtin . Int64 , 15 <nl> + / / CHECK : [ [ LIT2 : % [ 0 - 9 ] + ] ] = integer_literal $ Builtin . Int64 , 27 <nl> + / / CHECK : [ [ BODYCLOSURE : % [ 0 - 9 ] + ] ] = thin_to_thick_function <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack $ Builtin . Int64 <nl> + / / CHECK : store [ [ LIT1 ] ] to [ trivial ] [ [ STACK ] ] <nl> + / / CHECK : try_apply [ [ BODYCLOSURE ] ] ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed Builtin . Int64 ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ERROR ] ] ( [ [ ERRPARAM : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : br [ [ ERROR3 : bb [ 0 - 9 ] + ] ] ( [ [ ERRPARAM ] ] : $ Error ) <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : store [ [ LIT2 ] ] to [ trivial ] [ [ STACK ] ] : $ * Builtin . Int64 <nl> + / / CHECK : try_apply [ [ BODYCLOSURE ] ] ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed Builtin . Int64 ) - > @ error Error , normal [ [ NORMAL2 : bb [ 0 - 9 ] + ] ] , error [ [ ERROR2 : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ERROR2 ] ] ( [ [ ERRPARAM2 : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : br [ [ ERROR3 : bb [ 0 - 9 ] + ] ] ( [ [ ERRPARAM2 ] ] : $ Error ) <nl> + <nl> + / / CHECK : [ [ NORMAL2 ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : dealloc_stack [ [ STACK ] ] <nl> + / / Note that the temporary alloc_stack of the array created for the forEach call <nl> + / / will be cleaned up when the forEach call is removed . <nl> + / / CHECK : destroy_value <nl> + <nl> + / / CHECK : [ [ ERROR3 ] ] ( [ [ ERRPARAM3 : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : dealloc_stack [ [ STACK ] ] <nl> + / / CHECK : unreachable <nl> + <nl> + sil @ forEachBody2 : $ @ convention ( thin ) ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error <nl> + <nl> + sil hidden [ ossa ] @ nonTrivialForEachLoopUnrollTest : $ @ convention ( thin ) ( @ owned @ callee_guaranteed ( ) - > @ out Int , @ owned @ callee_guaranteed ( ) - > @ out Int ) - > ( ) { <nl> + bb0 ( % 0 : @ owned $ @ callee_guaranteed ( ) - > @ out Int , % 1 : @ owned $ @ callee_guaranteed ( ) - > @ out Int ) : <nl> + % 2 = integer_literal $ Builtin . Word , 2 <nl> + % 3 = function_ref @ _allocateUninitializedArray : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + % 4 = apply % 3 < ( ) - > Int > ( % 2 ) : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + ( % 5 , % 6 ) = destructure_tuple % 4 : $ ( Array < ( ) - > Int > , Builtin . RawPointer ) <nl> + % 7 = pointer_to_address % 6 : $ Builtin . RawPointer to [ strict ] $ * @ callee_guaranteed ( ) - > @ out Int <nl> + store % 0 to [ init ] % 7 : $ * @ callee_guaranteed ( ) - > @ out Int <nl> + % 12 = integer_literal $ Builtin . Word , 1 <nl> + % 13 = index_addr % 7 : $ * @ callee_guaranteed ( ) - > @ out Int , % 12 : $ Builtin . Word <nl> + store % 1 to [ init ] % 13 : $ * @ callee_guaranteed ( ) - > @ out Int <nl> + % 21 = begin_borrow % 5 : $ Array < ( ) - > Int > <nl> + % 22 = alloc_stack $ Array < ( ) - > Int > <nl> + % 23 = store_borrow % 21 to % 22 : $ * Array < ( ) - > Int > <nl> + % 24 = function_ref @ forEachBody2 : $ @ convention ( thin ) ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error <nl> + % 25 = convert_function % 24 : $ @ convention ( thin ) ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error to $ @ convention ( thin ) @ noescape ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error <nl> + % 26 = thin_to_thick_function % 25 : $ @ convention ( thin ) @ noescape ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error to $ @ noescape @ callee_guaranteed ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error <nl> + / / A stub for Sequence . forEach ( _ : ) <nl> + % 30 = function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + try_apply % 30 < [ ( ) - > Int ] > ( % 26 , % 22 ) : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error , normal bb1 , error bb2 <nl> + <nl> + bb1 ( % 32 : $ ( ) ) : <nl> + dealloc_stack % 22 : $ * Array < ( ) - > Int > <nl> + end_borrow % 21 : $ Array < ( ) - > Int > <nl> + destroy_value % 5 : $ Array < ( ) - > Int > <nl> + % 37 = tuple ( ) <nl> + return % 37 : $ ( ) <nl> + <nl> + bb2 ( % 39 : @ owned $ Error ) : <nl> + unreachable <nl> + } <nl> + / / CHECK - LABEL : nonTrivialForEachLoopUnrollTest <nl> + / / CHECK : [ [ ELEM1 : % [ 0 - 9 ] + ] ] = copy_value % 0 <nl> + / / CHECK - NEXT : store % 0 to [ init ] % { { . * } } : $ * @ callee_guaranteed ( ) - > @ out Int <nl> + / / CHECK : [ [ ELEM2 : % [ 0 - 9 ] + ] ] = copy_value % 1 <nl> + / / CHECK - NEXT : store % 1 to [ init ] % { { . * } } : $ * @ callee_guaranteed ( ) - > @ out Int <nl> + / / CHECK : [ [ BODYCLOSURE : % [ 0 - 9 ] + ] ] = thin_to_thick_function <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack $ @ callee_guaranteed ( ) - > @ out Int <nl> + / / CHECK : [ [ ELEM1BORROW : % [ 0 - 9 ] + ] ] = begin_borrow [ [ ELEM1 ] ] <nl> + / / CHECK : store_borrow [ [ ELEM1BORROW ] ] to [ [ STACK ] ] <nl> + / / CHECK : end_borrow [ [ ELEM1BORROW ] ] <nl> + / / CHECK : try_apply [ [ BODYCLOSURE ] ] ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ERROR ] ] ( [ [ ERRPARAM : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : br [ [ ERROR3 : bb [ 0 - 9 ] + ] ] ( [ [ ERRPARAM ] ] : $ Error ) <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : [ [ ELEM2BORROW : % [ 0 - 9 ] + ] ] = begin_borrow [ [ ELEM2 ] ] <nl> + / / CHECK : store_borrow [ [ ELEM2BORROW ] ] to [ [ STACK ] ] <nl> + / / CHECK : end_borrow [ [ ELEM2BORROW ] ] <nl> + / / CHECK : try_apply [ [ BODYCLOSURE ] ] ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed @ callee_guaranteed ( ) - > @ out Int ) - > @ error Error , normal [ [ NORMAL2 : bb [ 0 - 9 ] + ] ] , error [ [ ERROR2 : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ ERROR2 ] ] ( [ [ ERRPARAM2 : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : br [ [ ERROR3 : bb [ 0 - 9 ] + ] ] ( [ [ ERRPARAM2 ] ] : $ Error ) <nl> + <nl> + / / CHECK : [ [ NORMAL2 ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : dealloc_stack [ [ STACK ] ] <nl> + / / Note that the temporary alloc_stack of the array created for the forEach call <nl> + / / will be cleaned up when the forEach call is removed . <nl> + / / CHECK : destroy_value <nl> + <nl> + / / CHECK : [ [ ERROR3 ] ] ( [ [ ERRPARAM3 : % [ 0 - 9 ] + ] ] : @ owned $ Error ) : <nl> + / / CHECK : dealloc_stack [ [ STACK ] ] <nl> + / / CHECK : unreachable <nl> + <nl> + sil hidden [ ossa ] @ checkIndirectFixLifetimeUsesAreIgnored : $ @ convention ( thin ) ( ) - > ( ) { <nl> + bb0 : <nl> + % 0 = integer_literal $ Builtin . Word , 2 <nl> + % 1 = function_ref @ _allocateUninitializedArray : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + % 2 = apply % 1 < Builtin . Int64 > ( % 0 ) : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + ( % 3 , % 4 ) = destructure_tuple % 2 : $ ( Array < Builtin . Int64 > , Builtin . RawPointer ) <nl> + % 5 = pointer_to_address % 4 : $ Builtin . RawPointer to [ strict ] $ * Builtin . Int64 <nl> + % 6 = integer_literal $ Builtin . Int64 , 15 <nl> + store % 6 to [ trivial ] % 5 : $ * Builtin . Int64 <nl> + % 12 = integer_literal $ Builtin . Word , 1 <nl> + % 13 = index_addr % 5 : $ * Builtin . Int64 , % 12 : $ Builtin . Word <nl> + % 14 = integer_literal $ Builtin . Int64 , 27 <nl> + store % 14 to [ trivial ] % 13 : $ * Builtin . Int64 <nl> + % 21 = begin_borrow % 3 : $ Array < Builtin . Int64 > <nl> + % 22 = alloc_stack $ Array < Builtin . Int64 > <nl> + % 23 = store_borrow % 21 to % 22 : $ * Array < Builtin . Int64 > <nl> + % 24 = function_ref @ forEachBody : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 25 = convert_function % 24 : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 26 = thin_to_thick_function % 25 : $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ noescape @ callee_guaranteed ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + / / A stub for Sequence . forEach ( _ : ) <nl> + % 30 = function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + try_apply % 30 < [ Builtin . Int64 ] > ( % 26 , % 22 ) : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error , normal bb1 , error bb2 <nl> + <nl> + bb1 ( % 32 : $ ( ) ) : <nl> + / / An indirect fixLifetime use <nl> + dealloc_stack % 22 : $ * Array < Builtin . Int64 > <nl> + % 33 = alloc_stack $ Array < Builtin . Int64 > <nl> + % 34 = store_borrow % 21 to % 33 : $ * Array < Builtin . Int64 > <nl> + fix_lifetime % 33 : $ * Array < Builtin . Int64 > <nl> + dealloc_stack % 33 : $ * Array < Builtin . Int64 > <nl> + end_borrow % 21 : $ Array < Builtin . Int64 > <nl> + destroy_value % 3 : $ Array < Builtin . Int64 > <nl> + % 37 = tuple ( ) <nl> + return % 37 : $ ( ) <nl> + <nl> + bb2 ( % 39 : @ owned $ Error ) : <nl> + unreachable <nl> + } <nl> + / / CHECK - LABEL : @ checkIndirectFixLifetimeUsesAreIgnored <nl> + / / CHECK - NOT : function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + / / CHECK : end sil function ' checkIndirectFixLifetimeUsesAreIgnored ' <nl> + <nl> + sil hidden [ ossa ] @ testUnrollOfArrayWithPhiArguments : $ @ convention ( thin ) ( ) - > ( ) { <nl> + bb0 : <nl> + % 0 = integer_literal $ Builtin . Int64 , 57 <nl> + br bb1 ( % 0 : $ Builtin . Int64 ) <nl> + <nl> + bb1 ( % arg : $ Builtin . Int64 ) : <nl> + % 10 = integer_literal $ Builtin . Word , 1 <nl> + % 11 = function_ref @ _allocateUninitializedArray : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + % 12 = apply % 11 < Builtin . Int64 > ( % 10 ) : $ @ convention ( thin ) < τ_0_0 > ( Builtin . Word ) - > ( @ owned Array < τ_0_0 > , Builtin . RawPointer ) <nl> + ( % 13 , % 14 ) = destructure_tuple % 12 : $ ( Array < Builtin . Int64 > , Builtin . RawPointer ) <nl> + % 15 = pointer_to_address % 14 : $ Builtin . RawPointer to [ strict ] $ * Builtin . Int64 <nl> + store % arg to [ trivial ] % 15 : $ * Builtin . Int64 <nl> + br bb2 ( % arg : $ Builtin . Int64 ) <nl> + <nl> + bb2 ( % arg2 : $ Builtin . Int64 ) : <nl> + % 21 = begin_borrow % 13 : $ Array < Builtin . Int64 > <nl> + % 22 = alloc_stack $ Array < Builtin . Int64 > <nl> + % 23 = store_borrow % 21 to % 22 : $ * Array < Builtin . Int64 > <nl> + % 24 = function_ref @ forEachBody : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 25 = convert_function % 24 : $ @ convention ( thin ) ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + % 26 = thin_to_thick_function % 25 : $ @ convention ( thin ) @ noescape ( @ in_guaranteed Builtin . Int64 ) - > @ error Error to $ @ noescape @ callee_guaranteed ( @ in_guaranteed Builtin . Int64 ) - > @ error Error <nl> + / / A stub for Sequence . forEach ( _ : ) <nl> + % 30 = function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + try_apply % 30 < [ Builtin . Int64 ] > ( % 26 , % 22 ) : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error , normal bb3 , error bb4 <nl> + <nl> + bb3 ( % 32 : $ ( ) ) : <nl> + dealloc_stack % 22 : $ * Array < Builtin . Int64 > <nl> + end_borrow % 21 : $ Array < Builtin . Int64 > <nl> + destroy_value % 13 : $ Array < Builtin . Int64 > <nl> + % 37 = tuple ( ) <nl> + return % 37 : $ ( ) <nl> + <nl> + bb4 ( % 39 : @ owned $ Error ) : <nl> + unreachable <nl> + } <nl> + / / CHECK - LABEL : @ testUnrollOfArrayWithPhiArguments <nl> + / / CHECK - NOT : function_ref @ forEach : $ @ convention ( method ) < τ_0_0 where τ_0_0 : Sequence > ( @ noescape @ callee_guaranteed ( @ in_guaranteed τ_0_0 . Element ) - > @ error Error , @ in_guaranteed τ_0_0 ) - > @ error Error <nl> + / / CHECK : end sil function ' testUnrollOfArrayWithPhiArguments ' <nl> + <nl> new file mode 100644 <nl> index 000000000000 . . 195694aceb49 <nl> mmm / dev / null <nl> ppp b / test / SILOptimizer / for_each_loop_unroll_test . swift <nl> <nl> + / / RUN : % target - swift - frontend - emit - sil - primary - file % s | % FileCheck % s <nl> + <nl> + / / Tests for the ForEachLoopUnroll mandatory optimization pass that unrolls <nl> + / / Sequence . forEach calls over array literals . <nl> + <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0D19LetArrayLiteralTestyyF : $ @ convention ( thin ) ( ) - > ( ) <nl> + func unrollLetArrayLiteralTest ( ) { <nl> + let a = [ Int64 ( 15 ) , Int64 ( 27 ) ] <nl> + a . forEach { print ( $ 0 ) } <nl> + / / CHECK : [ [ LIT1 : % [ 0 - 9 ] + ] ] = integer_literal $ Builtin . Int64 , 15 <nl> + / / CHECK : [ [ INT1 : % [ 0 - 9 ] + ] ] = struct $ Int64 ( [ [ LIT1 ] ] : $ Builtin . Int64 ) <nl> + / / CHECK : [ [ LIT2 : % [ 0 - 9 ] + ] ] = integer_literal $ Builtin . Int64 , 27 <nl> + / / CHECK : [ [ INT2 : % [ 0 - 9 ] + ] ] = struct $ Int64 ( [ [ LIT2 ] ] : $ Builtin . Int64 ) <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack $ Int64 <nl> + / / CHECK : store [ [ INT1 ] ] to [ [ STACK ] ] <nl> + / / CHECK : try_apply % { { . * } } ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed Int64 ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : store [ [ INT2 ] ] to [ [ STACK ] ] : $ * Int64 <nl> + / / CHECK : try_apply { { . * } } ( [ [ STACK ] ] ) <nl> + } <nl> + <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0D35LetArrayLiteralWithVariableElements1x1yys5Int64V_AFtF <nl> + func unrollLetArrayLiteralWithVariableElements ( x : Int64 , y : Int64 ) { <nl> + let a = [ x , y ] <nl> + a . forEach { print ( $ 0 ) } <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack $ Int64 <nl> + / / CHECK : store % 0 to [ [ STACK ] ] <nl> + / / CHECK : try_apply % { { . * } } ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed Int64 ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : store % 1 to [ [ STACK ] ] : $ * Int64 <nl> + / / CHECK : try_apply { { . * } } ( [ [ STACK ] ] ) <nl> + } <nl> + <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0D37LetArrayLiteralWithNonTrivialElementsyyF <nl> + func unrollLetArrayLiteralWithNonTrivialElements ( ) { <nl> + let a = [ " a " , " aa " ] <nl> + a . forEach { print ( $ 0 ) } <nl> + / / CHECK : [ [ LIT1 : % [ 0 - 9 ] + ] ] = string_literal utf8 " a " <nl> + / / CHECK : [ [ STRING_INIT : % [ 0 - 9 ] + ] ] = function_ref @ $ sSS21_builtinStringLiteral17utf8CodeUnitCount7isASCIISSBp_BwBi1_tcfC <nl> + / / CHECK : [ [ STRING1 : % [ 0 - 9 ] + ] ] = apply [ [ STRING_INIT ] ] ( [ [ LIT1 ] ] , <nl> + <nl> + / / CHECK : [ [ LIT2 : % [ 0 - 9 ] + ] ] = string_literal utf8 " aa " <nl> + / / CHECK : [ [ STRING_INIT2 : % [ 0 - 9 ] + ] ] = function_ref @ $ sSS21_builtinStringLiteral17utf8CodeUnitCount7isASCIISSBp_BwBi1_tcfC <nl> + / / CHECK : [ [ STRING2 : % [ 0 - 9 ] + ] ] = apply [ [ STRING_INIT2 ] ] ( [ [ LIT2 ] ] , <nl> + <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack $ String <nl> + / / CHECK : store [ [ STRING1 ] ] to [ [ STACK ] ] : $ * String <nl> + / / CHECK : try_apply % { { . * } } ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed String ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : store [ [ STRING2 ] ] to [ [ STACK ] ] : $ * String <nl> + / / CHECK : try_apply { { . * } } ( [ [ STACK ] ] ) <nl> + } <nl> + <nl> + / / This test mimics the array liteal and forEach created by the OSLogOptimization pass . <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0D27LetArrayLiteralWithClosures1i1jys5Int32V_AFtF <nl> + func unrollLetArrayLiteralWithClosures ( i : Int32 , j : Int32 ) { <nl> + let a = [ { i } , { j } ] <nl> + a . forEach { print ( $ 0 ( ) ) } <nl> + / / CHECK : [ [ ALLOCATE : % [ 0 - 9 ] + ] ] = function_ref @ $ ss27_allocateUninitializedArrayySayxG_BptBwlF <nl> + / / CHECK : [ [ ARRAYTUP : % [ 0 - 9 ] + ] ] = apply [ [ ALLOCATE ] ] < ( ) - > Int32 > <nl> + / / CHECK : [ [ STORAGEPTR : % [ 0 - 9 ] + ] ] = tuple_extract [ [ ARRAYTUP ] ] : $ ( Array < ( ) - > Int32 > , Builtin . RawPointer ) , 1 <nl> + / / CHECK : [ [ STORAGEADDR : % [ 0 - 9 ] + ] ] = pointer_to_address [ [ STORAGEPTR ] ] <nl> + / / CHECK : store [ [ CLOSURE1 : % [ 0 - 9 ] + ] ] to [ [ STORAGEADDR ] ] <nl> + / / CHECK : [ [ INDEX1 : % [ 0 - 9 ] + ] ] = index_addr [ [ STORAGEADDR ] ] <nl> + / / CHECK : store [ [ CLOSURE2 : % [ 0 - 9 ] + ] ] to [ [ INDEX1 ] ] <nl> + <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK : [ [ STACK : % [ 0 - 9 ] + ] ] = alloc_stack <nl> + / / CHECK : store [ [ CLOSURE1 ] ] to [ [ STACK ] ] <nl> + / / CHECK : try_apply % { { . * } } ( [ [ STACK ] ] ) : $ @ noescape @ callee_guaranteed ( @ in_guaranteed { { . * } } ) - > @ error Error , normal [ [ NORMAL : bb [ 0 - 9 ] + ] ] , error [ [ ERROR : bb [ 0 - 9 ] + ] ] <nl> + <nl> + / / CHECK : [ [ NORMAL ] ] ( % { { . * } } : $ ( ) ) : <nl> + / / CHECK : store [ [ CLOSURE2 ] ] to [ [ STACK ] ] <nl> + / / CHECK : try_apply { { . * } } ( [ [ STACK ] ] ) <nl> + } <nl> + <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0E16NoUnrollScenarioyyF <nl> + func testNoUnrollScenario ( ) { <nl> + var a = [ Int64 ( 15 ) , Int64 ( 27 ) ] <nl> + a . append ( Int64 ( 7 ) ) <nl> + a . forEach { print ( $ 0 ) } <nl> + / / CHECK : forEach <nl> + } <nl> + <nl> + / / FIXME : Currently , array literals with address - only types cannot be unrolled <nl> + / / as they are initialied using copy_addr instead of store . <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0E27UnrollingOfAddressOnlyTypes1x1yyx_xtlF <nl> + func testUnrollingOfAddressOnlyTypes < T > ( x : T , y : T ) { <nl> + let a = [ x , y ] <nl> + a . forEach { print ( $ 0 ) } <nl> + / / CHECK : forEach <nl> + } <nl> + <nl> + / / Check that when there are multiple forEach loops they are unrolled . <nl> + / / CHECK - LABEL : sil hidden @ $ s25for_each_loop_unroll_test0D13MultipleLoops1x1y1zys5Int64V_AGSbtF <nl> + func unrollMultipleLoops ( x : Int64 , y : Int64 , z : Bool ) { <nl> + let a = [ x , y ] <nl> + if z { <nl> + a . forEach { print ( $ 0 ) } <nl> + } else { <nl> + a . forEach { print ( $ 0 + 1 ) } <nl> + } <nl> + / / CHECK - NOT : forEach <nl> + / / CHECK - LABEL : end sil function ' $ s25for_each_loop_unroll_test0D13MultipleLoops1x1y1zys5Int64V_AGSbtF ' <nl> + } <nl> mmm a / test / stdlib / OSLogPrototypeExecTest . swift <nl> ppp b / test / stdlib / OSLogPrototypeExecTest . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> / / RUN : % target - build - swift % s - swift - version 5 - DPTR_SIZE_ % target - ptrsize - o % t / OSLogPrototypeExecTest <nl> / / RUN : % target - run % t / OSLogPrototypeExecTest <nl> + / / <nl> + / / RUN : % target - build - swift % s - O - swift - version 5 - DPTR_SIZE_ % target - ptrsize - o % t / OSLogPrototypeExecTest <nl> + / / RUN : % target - run % t / OSLogPrototypeExecTest <nl> / / REQUIRES : executable_test <nl> / / REQUIRES : OS = macosx | | OS = ios | | OS = tvos | | OS = watchos <nl> <nl>
Merge pull request from ravikandhadai / oslog - forEach - unroll
apple/swift
a840b1be0383974a6426376e8081bad186673c17
2020-02-08T18:09:41Z
mmm a / PowerEditor / src / langs . model . xml <nl> ppp b / PowerEditor / src / langs . model . xml <nl> <nl> < Language name = " autoit " ext = " au3 " commentLine = " ; " commentStart = " # CS " commentEnd = " # CE " > <nl> < Keywords name = " instre1 " > and byref case const continuecase continueloop default dim do else elseif endfunc endif endselect endswitch enum exit exitloop false for func global if in local next not null or redim return select static step switch then to true until wend while < / Keywords > <nl> < Keywords name = " instre2 " > abs acos adlibdisable adlibenable asc asin atan autoitsetoption autoitwingettitle autoitwinsettitle bitand bitnot bitor bitshift bitxor blockinput break call cdtray chr clipget clipput controlclick controlcommand controldisable controlenable controlfocus controlgetfocus controlgetpos controlgettext controlhide controlmove controlsend controlsettext controlshow cos dec dircopy dircreate dirmove dirremove drivegetdrive drivegetfilesystem drivegetlabel drivegetserial drivegettype drivesetlabel drivespacefree drivespacetotal drivestatus envget envset envupdate eval exp filechangedir fileclose filecopy filecreateshortcut filedelete fileexists filefindfirstfile filefindnextfile filegetattrib filegetlongname filegetshortname filegetsize filegettime filegetversion fileinstall filemove fileopen fileopendialog fileread filereadline filerecycle filerecycleempty filesavedialog fileselectfolder filesetattrib filesettime filewrite filewriteline guicreate guicreateex guidefaultfont guidelete guigetcontrolstate guihide guimsg guiread guirecvmsg guisendmsg guisetcontrol guisetcontroldata guisetcontrolex guisetcontrolfont guisetcontrolnotify guisetcoord guisetcursor guishow guiwaitclose guiwrite hex hotkeyset inidelete iniread iniwrite inputbox int isadmin isarray isdeclared isfloat isint isnumber isstring log memgetstats mod mouseclick mouseclickdrag mousedown mousegetcursor mousegetpos mousemove mouseup mousewheel msgbox number pixelchecksum pixelgetcolor pixelsearch processclose processexists processsetpriority processwait processwaitclose progressoff progresson progressset random regdelete regenumkey regenumval regread regwrite round run runasset runwait send seterror shutdown sin sleep soundplay soundsetwavevolume splashimageon splashoff splashtexton sqrt statusbargettext string stringaddcr stringformat stringinstr stringisalnum stringisalpha stringisascii stringisdigit stringisfloat stringisint stringislower stringisspace stringisupper stringisxdigit stringleft stringlen stringlower stringmid stringreplace stringright stringsplit stringstripcr stringstripws stringtrimleft stringtrimright stringupper tan timerstart timerstop tooltip traytip ubound urldownloadtofile winactivate winactive winclose winexists wingetcaretpos wingetclasslist wingetclientsize wingethandle wingetpos wingetstate wingettext wingettitle winkill winmenuselectitem winminimizeall winminimizeallundo winmove winsetontop winsetstate winsettitle winwait winwaitactive winwaitclose winwaitnotactive < / Keywords > <nl> - < Keywords name = " type1 " > @ appdatacommondir @ appdatadir @ autoitversion @ commonfilesdir @ compiled @ computername @ comspec @ cr @ crlf @ desktopcommondir @ desktopdir @ desktopheight @ desktopwidth @ documentscommondir @ error @ favoritescommondir @ favoritesdir @ homedrive @ homepath @ homeshare @ hour @ ipaddress1 @ ipaddress2 @ ipaddress3 @ ipaddress4 @ lf @ logondnsdomain @ logondomain @ logonserver @ mday @ min @ mon @ mydocumentsdir @ osbuild @ oslang @ osservicepack @ ostype @ osversion @ programfilesdir @ programscommondir @ programsdir @ scriptdir @ scriptfullpath @ scriptname @ sec @ startmenucommondir @ startmenudir @ startupcommondir @ startupdir @ sw_hide @ sw_maximize @ sw_minimize @ sw_restore @ sw_show @ systemdir @ tab @ tempdir @ userprofiledir @ username @ wday @ windowsdir @ workingdir @ yday @ year < / Keywords > <nl> + < Keywords name = " type1 " > @ appdatacommondir @ appdatadir @ autoitexe @ autoitpid @ autoitversion @ autoitx64 @ com_eventobj @ commonfilesdir @ compiled @ computername @ comspec @ cpuarch @ cr @ crlf @ desktopcommondir @ desktopdepth @ desktopdir @ desktopheight @ desktoprefresh @ desktopwidth @ documentscommondir @ error @ exitcode @ exitmethod @ extended @ favoritescommondir @ favoritesdir @ gui_ctrlhandle @ gui_ctrlid @ gui_dragfile @ gui_dragid @ gui_dropid @ gui_winhandle @ homedrive @ homepath @ homeshare @ hotkeypressed @ hour @ ipaddress1 @ ipaddress2 @ ipaddress3 @ ipaddress4 @ kblayout @ lf @ localappdatadir @ logondnsdomain @ logondomain @ logonserver @ mday @ min @ mon @ msec @ muilang @ mydocumentsdir @ numparams @ osarch @ osbuild @ oslang @ osservicepack @ ostype @ osversion @ programfilesdir @ programscommondir @ programsdir @ scriptdir @ scriptfullpath @ scriptlinenumber @ scriptname @ sec @ startmenucommondir @ startmenudir @ startupcommondir @ startupdir @ sw_disable @ sw_enable @ sw_hide @ sw_lock @ sw_maximize @ sw_minimize @ sw_restore @ sw_show @ sw_showdefault @ sw_showmaximized @ sw_showminimized @ sw_showminnoactive @ sw_showna @ sw_shownoactivate @ sw_shownormal @ sw_unlock @ systemdir @ tab @ tempdir @ tray_id @ trayiconflashing @ trayiconvisible @ username @ userprofiledir @ wday @ windowsdir @ workingdir @ yday @ year < / Keywords > <nl> < Keywords name = " type2 " > { ! } { # } { ^ } { { } { } } { + } { alt } { altdown } { altup } { appskey } { asc } { backspace } { browser_back } { browser_favorites } { browser_forward } { browser_home } { browser_refresh } { browser_search } { browser_stop } { bs } { capslock } { ctrlbreak } { ctrldown } { ctrlup } { del } { delete } { down } { end } { enter } { esc } { escape } { f1 } { f10 } { f11 } { f12 } { f2 } { f3 } { f4 } { f5 } { f6 } { f7 } { f8 } { f9 } { home } { ins } { insert } { lalt } { launch_app1 } { launch_app2 } { launch_mail } { launch_media } { lctrl } { left } { lshift } { lwin } { lwindown } { media_next } { media_play_pause } { media_prev } { media_stop } { numlock } { numpad0 } { numpad1 } { numpad2 } { numpad3 } { numpad4 } { numpad5 } { numpad6 } { numpad7 } { numpad8 } { numpad9 } { numpadadd } { numpaddiv } { numpaddot } { numpadenter } { numpadmult } { numpadsub } { pause } { pgdn } { pgup } { printscreen } { ralt } { rctrl } { right } { rshift } { rwin } { rwindown } { scrolllock } { shiftdown } { shiftup } { sleep } { space } { tab } { up } { volume_down } { volume_mute } { volume_up } < / Keywords > <nl> - < Keywords name = " type3 " > # include # include - once < / Keywords > <nl> + < Keywords name = " type3 " > # include # include - once # pragma < / Keywords > <nl> < Keywords name = " type4 " > # region # endregion < / Keywords > <nl> < Keywords name = " type5 " > < / Keywords > <nl> < / Language > <nl>
Update AutoIt keywords
notepad-plus-plus/notepad-plus-plus
133211051ee41d771de841e7097f0640fe4906ca
2019-05-24T16:00:21Z
mmm a / dbms / src / Interpreters / MutationsInterpreter . cpp <nl> ppp b / dbms / src / Interpreters / MutationsInterpreter . cpp <nl> void MutationsInterpreter : : prepare ( bool dry_run ) <nl> { <nl> auto query = index - > expr - > clone ( ) ; <nl> auto syntax_result = SyntaxAnalyzer ( context ) . analyze ( query , all_columns ) ; <nl> - ExpressionAnalyzer analyzer ( query , syntax_result , context ) ; <nl> - const auto required_columns = analyzer . getRequiredSourceColumns ( ) ; <nl> + const auto required_columns = syntax_result - > requiredSourceColumns ( ) ; <nl> <nl> for ( const String & dependency : required_columns ) <nl> { <nl> void MutationsInterpreter : : prepare ( bool dry_run ) <nl> <nl> auto query = ( * it ) - > expr - > clone ( ) ; <nl> auto syntax_result = SyntaxAnalyzer ( context ) . analyze ( query , all_columns ) ; <nl> - ExpressionAnalyzer analyzer ( query , syntax_result , context ) ; <nl> - const auto required_columns = analyzer . getRequiredSourceColumns ( ) ; <nl> + const auto required_columns = syntax_result - > requiredSourceColumns ( ) ; <nl> affected_indices_columns . insert ( std : : cbegin ( required_columns ) , std : : cend ( required_columns ) ) ; <nl> } <nl> else <nl>
fix compilation
ClickHouse/ClickHouse
053f0ee78d863654e23d5709d2a582808728744a
2019-08-15T17:46:35Z
mmm a / tensorflow / lite / testing / generate_examples . py <nl> ppp b / tensorflow / lite / testing / generate_examples . py <nl> def build_example ( label , param_dict_real ) : <nl> report [ " tf " ] = report_lib . SUCCESS <nl> # Convert graph to toco <nl> input_tensors = [ ( input_tensor . name . split ( " : " ) [ 0 ] , <nl> - input_tensor . get_shape ( ) , input_tensor . dtype ) <nl> + input_tensor . shape , input_tensor . dtype ) <nl> for input_tensor in inputs ] <nl> output_tensors = [ normalize_output_name ( out . name ) for out in outputs ] <nl> graph_def = freeze_graph ( <nl>
Replaced get_shape ( ) with shape .
tensorflow/tensorflow
e19ae2228c99a8d394a0c7111555ed7650b812fd
2019-03-13T08:50:20Z
mmm a / tensorflow / docs_src / performance / xla / jit . md <nl> ppp b / tensorflow / docs_src / performance / xla / jit . md <nl> to fuse Ops is visible by starting at ` hlo_graph_0 . dot ` and viewing each diagram <nl> in succession . <nl> <nl> To Render the . dot file into a png , install <nl> - [ GraphViz ] ( http : / / www . graphviz . org / Download . . php ) and run : <nl> + [ GraphViz ] ( https : / / www . graphviz . org / download / ) and run : <nl> <nl> ` ` ` shell <nl> dot - Tpng hlo_graph_80 . dot - o hlo_graph_80 . png <nl>
Fix broken graphviz download link and change to https ( )
tensorflow/tensorflow
bdc3ab88cff9cbbefb7076e9f18afe628ca7d68c
2018-03-11T05:42:09Z
mmm a / tensorflow / compiler / xla / service / algebraic_simplifier . cc <nl> ppp b / tensorflow / compiler / xla / service / algebraic_simplifier . cc <nl> Status AlgebraicSimplifierVisitor : : HandleSlice ( HloInstruction * slice ) { <nl> return Status : : OK ( ) ; <nl> } <nl> <nl> - TF_ASSIGN_OR_RETURN ( replaced , TryToReorderSliceAndReshape ( slice ) ) ; <nl> + / / Do not try to reorder slices and reshapes after layout assignment as it may <nl> + / / be invalid . <nl> + if ( ! options_ . is_layout_sensitive ( ) ) { <nl> + TF_ASSIGN_OR_RETURN ( replaced , TryToReorderSliceAndReshape ( slice ) ) ; <nl> + } <nl> if ( replaced ) { <nl> return Status : : OK ( ) ; <nl> } <nl>
[ XLA ] Do not reorder slices and reshapes after layout assignment . The helper function does not handle layouts properly and a backend may not support the layout generated .
tensorflow/tensorflow
d51b5bf9f1300bfa1dbc84f3d1dc35885be06608
2019-08-27T16:44:49Z
mmm a / Source / CNTKv2LibraryDll / API / CNTKLibrary . h <nl> ppp b / Source / CNTKv2LibraryDll / API / CNTKLibrary . h <nl> namespace CNTK <nl> / / / <nl> CNTK_API FunctionPtr LeakyReLU ( const Variable & operand , const std : : wstring & name = L " " ) ; <nl> <nl> + / / / <nl> + / / / Create an instance of the CNTK built - in elementwise parametric rectified linear Unit operation <nl> + / / / with the specified input operand and learning parameter alpha . <nl> + / / / <nl> + CNTK_API FunctionPtr PReLU ( const Variable & alpha , const Variable & operand , const std : : wstring & name = L " " ) ; <nl> + <nl> + / / / <nl> + / / / Create an instance of the CNTK built - in argmax operation on specified tensor input operand along the specified axis <nl> + / / / <nl> + CNTK_API FunctionPtr Argmax ( const Variable & operand , const Axis & axis , const std : : wstring & name = L " " ) ; <nl> + <nl> + / / / <nl> + / / / Create an instance of the CNTK built - in argmin on specified tensor input operand along the specified axis <nl> + / / / <nl> + CNTK_API FunctionPtr Argmin ( const Variable & operand , const Axis & axis , const std : : wstring & name = L " " ) ; <nl> + <nl> namespace Sequence <nl> { <nl> CNTK_API FunctionPtr IsFirst ( const Variable & operand , const std : : wstring & name = L " " ) ; <nl> mmm a / Source / CNTKv2LibraryDll / Function . cpp <nl> ppp b / Source / CNTKv2LibraryDll / Function . cpp <nl> namespace CNTK <nl> return AsBlock ( std : : move ( result ) , { { operandPlaceholder , operand } } , L " LeakyReLU " , name ) ; <nl> } <nl> <nl> + FunctionPtr PReLU ( const Variable & alpha , const Variable & operand , const std : : wstring & name ) <nl> + { <nl> + / * <nl> + auto operandPlaceholder = PlaceholderVariable ( ) ; <nl> + auto positive = ReLU ( operandPlaceholder ) ; <nl> + auto negative = ElementTimes ( alpha , <nl> + ElementTimes ( Minus ( operandPlaceholder , Abs ( operandPlaceholder ) ) , <nl> + Constant : : Scalar ( operand . GetDataType ( ) , 0 . 5 ) ) ) ; <nl> + auto result = Plus ( positive , negative ) ; <nl> + * / <nl> + auto operandPlaceholder = PlaceholderVariable ( ) ; <nl> + auto lessThanZero = Less ( operandPlaceholder , Constant : : Scalar ( operand . GetDataType ( ) , 0 . 0 ) ) ; <nl> + auto result = ElementSelect ( lessThanZero , <nl> + ElementTimes ( alpha , operandPlaceholder ) , <nl> + operandPlaceholder ) ; <nl> + <nl> + return AsBlock ( std : : move ( result ) , { { operandPlaceholder , operand } } , L " PReLU " , name ) ; <nl> + } <nl> + <nl> + FunctionPtr Argmax ( const Variable & operand , const Axis & axis , const std : : wstring & name ) <nl> + { <nl> + return Internal : : ReduceElements ( operand , PrimitiveFunction : : InternalMaxReductionOpName , axis , name ) ; <nl> + } <nl> + <nl> + FunctionPtr Argmin ( const Variable & operand , const Axis & axis , const std : : wstring & name ) <nl> + { <nl> + return Internal : : ReduceElements ( operand , PrimitiveFunction : : InternalMinReductionOpName , axis , name ) ; <nl> + } <nl> + <nl> namespace Sequence <nl> { <nl> void VerifyIsSequence ( const Variable & operand ) <nl> mmm a / Source / CNTKv2LibraryDll / PrimitiveFunction . cpp <nl> ppp b / Source / CNTKv2LibraryDll / PrimitiveFunction . cpp <nl> namespace CNTK <nl> / * static * / const std : : wstring PrimitiveFunction : : InternalMinReductionOpName = L " Min " ; <nl> / * static * / const std : : wstring PrimitiveFunction : : InternalAllReductionOpName = L " All " ; <nl> / * static * / const std : : wstring PrimitiveFunction : : InternalAnyReductionOpName = L " Any " ; <nl> + / * static * / const std : : wstring PrimitiveFunction : : InternalArgmaxReductionOpName = L " Argmax " ; <nl> + / * static * / const std : : wstring PrimitiveFunction : : InternalArgminReductionOpName = L " Argmin " ; <nl> <nl> / / Names of the various attributes of CNTK primitive Functions <nl> / * static * / const std : : wstring PrimitiveFunction : : AttributeNameAxis = L " axis " ; <nl> mmm a / Source / CNTKv2LibraryDll / PrimitiveFunction . h <nl> ppp b / Source / CNTKv2LibraryDll / PrimitiveFunction . h <nl> namespace CNTK <nl> static const std : : wstring InternalMinReductionOpName ; <nl> static const std : : wstring InternalAllReductionOpName ; <nl> static const std : : wstring InternalAnyReductionOpName ; <nl> + static const std : : wstring InternalArgmaxReductionOpName ; <nl> + static const std : : wstring InternalArgminReductionOpName ; <nl> <nl> static const std : : wstring AttributeNameAxis ; <nl> static const std : : wstring AttributeNameAxis1 ; <nl> mmm a / bindings / python / cntk / ops / __init__ . py <nl> ppp b / bindings / python / cntk / ops / __init__ . py <nl> def leaky_relu ( x , name = ' ' ) : <nl> x = sanitize_input ( x ) <nl> return leaky_re_lu ( x , name ) <nl> <nl> + @ typemap <nl> + def param_relu ( alpha , x , name = ' ' ) : <nl> + ' ' ' <nl> + Parametric rectified linear operation . Computes the element - wise parameteric rectified linear <nl> + of ` ` x ` ` : ` ` max ( x , 0 ) ` ` for ` ` x > = 0 ` ` and ` ` x ` ` : ` ` alpha * x ` ` otherwise . <nl> + <nl> + The output tensor has the same shape as ` ` x ` ` . <nl> + <nl> + Example : <nl> + > > > alpha = C . constant ( value = [ [ 0 . 5 , 0 . 5 , 0 . 5 , 0 . 5 , 0 . 5 ] ] ) <nl> + > > > C . param_relu ( alpha , [ [ - 1 , - 0 . 5 , 0 , 1 , 2 ] ] ) . eval ( ) <nl> + array ( [ [ - 0 . 5 , - 0 . 25 , 0 . , 1 . , 2 . ] ] , dtype = float32 ) <nl> + <nl> + Args : <nl> + alpha : tensor same shape as x <nl> + x : numpy array or any : class : ` ~ cntk . ops . functions . Function ` that outputs a tensor <nl> + name ( str , optional ) : the name of the Function instance in the network <nl> + Returns : <nl> + : class : ` ~ cntk . ops . functions . Function ` <nl> + ' ' ' <nl> + from cntk . cntk_py import pre_lu <nl> + x = sanitize_input ( x ) <nl> + return pre_lu ( alpha , x , name ) <nl> + <nl> @ typemap <nl> def sigmoid ( x , name = ' ' ) : <nl> ' ' ' <nl> mmm a / bindings / python / cntk / ops / tests / non_linear_test . py <nl> ppp b / bindings / python / cntk / ops / tests / non_linear_test . py <nl> def test_op_elu ( operand , device_id , precision ) : <nl> t = AA ( operand , dtype = PRECISION_TO_TYPE [ precision ] ) <nl> <nl> expected_forward = [ [ elu_f ( t ) ] ] <nl> - <nl> expected_backward = { <nl> ' arg ' : [ [ elu_b ( t ) ] ] <nl> } <nl> def test_op_leaky_relu ( operand , device_id , precision ) : <nl> leaky_relu_b = np . vectorize ( lambda x : 0 . 01 if x < 0 else 1 . 0 ) <nl> <nl> t = AA ( operand , dtype = PRECISION_TO_TYPE [ precision ] ) <nl> - print ( " This is t : { } " . format ( t ) ) <nl> <nl> expected_forward = [ [ leaky_relu_f ( t ) ] ] <nl> - <nl> expected_backward = { <nl> ' arg ' : [ [ leaky_relu_b ( t ) ] ] <nl> } <nl> def test_op_leaky_relu ( operand , device_id , precision ) : <nl> _test_unary_op ( precision , device_id , leaky_relu , operand , <nl> expected_forward , expected_backward ) <nl> <nl> + @ pytest . mark . parametrize ( " operand " , TENSORS ) <nl> + def test_op_param_relu ( operand , device_id , precision ) : <nl> + dev = cntk_device ( device_id ) <nl> + param_relu_f = np . vectorize ( lambda x : 0 . 5 * x if x < 0 else x ) <nl> + param_relu_b = np . vectorize ( lambda x : 0 . 5 if x < 0 else 1 . 0 ) <nl> + <nl> + t = AA ( operand , dtype = PRECISION_TO_TYPE [ precision ] ) <nl> + a = AA ( np . ones_like ( t ) * 0 . 5 , dtype = PRECISION_TO_TYPE [ precision ] ) <nl> + alpha = constant ( a , device = dev ) <nl> + <nl> + expected_forward = [ [ param_relu_f ( t ) ] ] <nl> + expected_backward = { <nl> + ' arg ' : [ [ param_relu_b ( t ) ] ] <nl> + } <nl> + <nl> + from cntk import param_relu <nl> + <nl> + def prelu ( x ) : <nl> + return param_relu ( alpha , x ) <nl> + <nl> + _test_unary_op ( precision , device_id , prelu , operand , <nl> + expected_forward , expected_backward ) <nl> + <nl> + <nl> SAMPLES = [ # 2 samples having 4 classes <nl> [ 1 , 1 , 2 , 3 ] , <nl> [ 0 , 0 , 0 , 0 ] , <nl>
Add PReLu and skecleton for Argmin and Argmax .
microsoft/CNTK
c41b2da0ca8a261402feb6e50205cc48e94e4672
2017-02-07T19:45:08Z
mmm a / src / profiler / cpu - profiler - inl . h <nl> ppp b / src / profiler / cpu - profiler - inl . h <nl> void CodeDisableOptEventRecord : : UpdateCodeMap ( CodeMap * code_map ) { <nl> <nl> void CodeDeoptEventRecord : : UpdateCodeMap ( CodeMap * code_map ) { <nl> CodeEntry * entry = code_map - > FindEntry ( start ) ; <nl> - if ( entry ! = nullptr ) entry - > set_deopt_info ( deopt_reason , deopt_id ) ; <nl> + if ( entry = = nullptr ) return ; <nl> + std : : vector < CpuProfileDeoptFrame > frames_vector ( <nl> + deopt_frames , deopt_frames + deopt_frame_count ) ; <nl> + entry - > set_deopt_info ( deopt_reason , deopt_id , std : : move ( frames_vector ) ) ; <nl> + delete [ ] deopt_frames ; <nl> } <nl> <nl> <nl> mmm a / src / profiler / cpu - profiler . h <nl> ppp b / src / profiler / cpu - profiler . h <nl> class CodeDeoptEventRecord : public CodeEventRecord { <nl> int deopt_id ; <nl> Address pc ; <nl> int fp_to_sp_delta ; <nl> + CpuProfileDeoptFrame * deopt_frames ; <nl> + int deopt_frame_count ; <nl> <nl> INLINE ( void UpdateCodeMap ( CodeMap * code_map ) ) ; <nl> } ; <nl> mmm a / src / profiler / profile - generator . cc <nl> ppp b / src / profiler / profile - generator . cc <nl> const std : : vector < std : : unique_ptr < CodeEntry > > * CodeEntry : : GetInlineStack ( <nl> return it ! = rare_data_ - > inline_locations_ . end ( ) ? & it - > second : nullptr ; <nl> } <nl> <nl> - void CodeEntry : : AddDeoptInlinedFrames ( <nl> - int deopt_id , std : : vector < CpuProfileDeoptFrame > inlined_frames ) { <nl> - EnsureRareData ( ) - > deopt_inlined_frames_ . insert ( <nl> - std : : make_pair ( deopt_id , std : : move ( inlined_frames ) ) ) ; <nl> - } <nl> - <nl> - bool CodeEntry : : HasDeoptInlinedFramesFor ( int deopt_id ) const { <nl> - return rare_data_ & & rare_data_ - > deopt_inlined_frames_ . find ( deopt_id ) ! = <nl> - rare_data_ - > deopt_inlined_frames_ . end ( ) ; <nl> + void CodeEntry : : set_deopt_info ( <nl> + const char * deopt_reason , int deopt_id , <nl> + std : : vector < CpuProfileDeoptFrame > inlined_frames ) { <nl> + DCHECK ( ! has_deopt_info ( ) ) ; <nl> + RareData * rare_data = EnsureRareData ( ) ; <nl> + rare_data - > deopt_reason_ = deopt_reason ; <nl> + rare_data - > deopt_id_ = deopt_id ; <nl> + rare_data - > deopt_inlined_frames_ = std : : move ( inlined_frames ) ; <nl> } <nl> <nl> void CodeEntry : : FillFunctionInfo ( SharedFunctionInfo * shared ) { <nl> CpuProfileDeoptInfo CodeEntry : : GetDeoptInfo ( ) { <nl> CpuProfileDeoptInfo info ; <nl> info . deopt_reason = rare_data_ - > deopt_reason_ ; <nl> DCHECK_NE ( kNoDeoptimizationId , rare_data_ - > deopt_id_ ) ; <nl> - if ( rare_data_ - > deopt_inlined_frames_ . find ( rare_data_ - > deopt_id_ ) = = <nl> - rare_data_ - > deopt_inlined_frames_ . end ( ) ) { <nl> + if ( rare_data_ - > deopt_inlined_frames_ . empty ( ) ) { <nl> info . stack . push_back ( CpuProfileDeoptFrame ( <nl> { script_id_ , static_cast < size_t > ( std : : max ( 0 , position ( ) ) ) } ) ) ; <nl> } else { <nl> - info . stack = rare_data_ - > deopt_inlined_frames_ [ rare_data_ - > deopt_id_ ] ; <nl> + info . stack = rare_data_ - > deopt_inlined_frames_ ; <nl> } <nl> return info ; <nl> } <nl> mmm a / src / profiler / profile - generator . h <nl> ppp b / src / profiler / profile - generator . h <nl> class CodeEntry { <nl> return rare_data_ ? rare_data_ - > bailout_reason_ : kEmptyBailoutReason ; <nl> } <nl> <nl> - void set_deopt_info ( const char * deopt_reason , int deopt_id ) { <nl> - DCHECK ( ! has_deopt_info ( ) ) ; <nl> - RareData * rare_data = EnsureRareData ( ) ; <nl> - rare_data - > deopt_reason_ = deopt_reason ; <nl> - rare_data - > deopt_id_ = deopt_id ; <nl> - } <nl> + void set_deopt_info ( const char * deopt_reason , int deopt_id , <nl> + std : : vector < CpuProfileDeoptFrame > inlined_frames ) ; <nl> + <nl> CpuProfileDeoptInfo GetDeoptInfo ( ) ; <nl> bool has_deopt_info ( ) const { <nl> return rare_data_ & & rare_data_ - > deopt_id_ ! = kNoDeoptimizationId ; <nl> class CodeEntry { <nl> const std : : vector < std : : unique_ptr < CodeEntry > > * GetInlineStack ( <nl> int pc_offset ) const ; <nl> <nl> - void AddDeoptInlinedFrames ( int deopt_id , std : : vector < CpuProfileDeoptFrame > ) ; <nl> - bool HasDeoptInlinedFramesFor ( int deopt_id ) const ; <nl> - <nl> Address instruction_start ( ) const { return instruction_start_ ; } <nl> CodeEventListener : : LogEventsAndTags tag ( ) const { <nl> return TagField : : decode ( bit_field_ ) ; <nl> class CodeEntry { <nl> int deopt_id_ = kNoDeoptimizationId ; <nl> std : : unordered_map < int , std : : vector < std : : unique_ptr < CodeEntry > > > <nl> inline_locations_ ; <nl> - std : : unordered_map < int , std : : vector < CpuProfileDeoptFrame > > <nl> - deopt_inlined_frames_ ; <nl> + std : : vector < CpuProfileDeoptFrame > deopt_inlined_frames_ ; <nl> } ; <nl> <nl> RareData * EnsureRareData ( ) ; <nl> mmm a / src / profiler / profiler - listener . cc <nl> ppp b / src / profiler / profiler - listener . cc <nl> void ProfilerListener : : CodeCreateEvent ( CodeEventListener : : LogEventsAndTags tag , <nl> GetName ( InferScriptName ( script_name , shared ) ) , line , column , <nl> std : : move ( line_table ) , abstract_code - > InstructionStart ( ) ) ; <nl> RecordInliningInfo ( rec - > entry , abstract_code ) ; <nl> - RecordDeoptInlinedFrames ( rec - > entry , abstract_code ) ; <nl> rec - > entry - > FillFunctionInfo ( shared ) ; <nl> rec - > size = abstract_code - > ExecutableSize ( ) ; <nl> DispatchCodeEvent ( evt_rec ) ; <nl> void ProfilerListener : : CodeDeoptEvent ( Code * code , DeoptKind kind , Address pc , <nl> rec - > deopt_id = info . deopt_id ; <nl> rec - > pc = pc ; <nl> rec - > fp_to_sp_delta = fp_to_sp_delta ; <nl> + <nl> + / / When a function is deoptimized , we store the deoptimized frame information <nl> + / / for the use of GetDeoptInfos ( ) . <nl> + AttachDeoptInlinedFrames ( code , rec ) ; <nl> DispatchCodeEvent ( evt_rec ) ; <nl> } <nl> <nl> void ProfilerListener : : RecordInliningInfo ( CodeEntry * entry , <nl> } <nl> } <nl> <nl> - void ProfilerListener : : RecordDeoptInlinedFrames ( CodeEntry * entry , <nl> - AbstractCode * abstract_code ) { <nl> - if ( abstract_code - > kind ( ) ! = AbstractCode : : OPTIMIZED_FUNCTION ) return ; <nl> - Handle < Code > code ( abstract_code - > GetCode ( ) ) ; <nl> - <nl> + void ProfilerListener : : AttachDeoptInlinedFrames ( Code * code , <nl> + CodeDeoptEventRecord * rec ) { <nl> + int deopt_id = rec - > deopt_id ; <nl> SourcePosition last_position = SourcePosition : : Unknown ( ) ; <nl> int mask = RelocInfo : : ModeMask ( RelocInfo : : DEOPT_ID ) | <nl> RelocInfo : : ModeMask ( RelocInfo : : DEOPT_SCRIPT_OFFSET ) | <nl> RelocInfo : : ModeMask ( RelocInfo : : DEOPT_INLINING_ID ) ; <nl> - for ( RelocIterator it ( * code , mask ) ; ! it . done ( ) ; it . next ( ) ) { <nl> + <nl> + rec - > deopt_frames = nullptr ; <nl> + rec - > deopt_frame_count = 0 ; <nl> + <nl> + for ( RelocIterator it ( code , mask ) ; ! it . done ( ) ; it . next ( ) ) { <nl> RelocInfo * info = it . rinfo ( ) ; <nl> if ( info - > rmode ( ) = = RelocInfo : : DEOPT_SCRIPT_OFFSET ) { <nl> int script_offset = static_cast < int > ( info - > data ( ) ) ; <nl> void ProfilerListener : : RecordDeoptInlinedFrames ( CodeEntry * entry , <nl> continue ; <nl> } <nl> if ( info - > rmode ( ) = = RelocInfo : : DEOPT_ID ) { <nl> - int deopt_id = static_cast < int > ( info - > data ( ) ) ; <nl> + if ( deopt_id ! = static_cast < int > ( info - > data ( ) ) ) continue ; <nl> DCHECK ( last_position . IsKnown ( ) ) ; <nl> - std : : vector < CpuProfileDeoptFrame > inlined_frames ; <nl> <nl> / / SourcePosition : : InliningStack allocates a handle for the SFI of each <nl> / / frame . These don ' t escape this function , but quickly add up . This <nl> / / scope limits their lifetime . <nl> HandleScope scope ( isolate_ ) ; <nl> - for ( SourcePositionInfo & pos_info : last_position . InliningStack ( code ) ) { <nl> + std : : vector < SourcePositionInfo > stack = <nl> + last_position . InliningStack ( handle ( code ) ) ; <nl> + CpuProfileDeoptFrame * deopt_frames = <nl> + new CpuProfileDeoptFrame [ stack . size ( ) ] ; <nl> + <nl> + int deopt_frame_count = 0 ; <nl> + for ( SourcePositionInfo & pos_info : stack ) { <nl> if ( pos_info . position . ScriptOffset ( ) = = kNoSourcePosition ) continue ; <nl> if ( pos_info . script . is_null ( ) ) continue ; <nl> int script_id = pos_info . script - > id ( ) ; <nl> size_t offset = static_cast < size_t > ( pos_info . position . ScriptOffset ( ) ) ; <nl> - inlined_frames . push_back ( CpuProfileDeoptFrame ( { script_id , offset } ) ) ; <nl> - } <nl> - if ( ! inlined_frames . empty ( ) & & <nl> - ! entry - > HasDeoptInlinedFramesFor ( deopt_id ) ) { <nl> - entry - > AddDeoptInlinedFrames ( deopt_id , std : : move ( inlined_frames ) ) ; <nl> + deopt_frames [ deopt_frame_count + + ] = { script_id , offset } ; <nl> } <nl> + rec - > deopt_frames = deopt_frames ; <nl> + rec - > deopt_frame_count = deopt_frame_count ; <nl> + break ; <nl> } <nl> } <nl> } <nl> mmm a / src / profiler / profiler - listener . h <nl> ppp b / src / profiler / profiler - listener . h <nl> namespace v8 { <nl> namespace internal { <nl> <nl> class CodeEventsContainer ; <nl> + class CodeDeoptEventRecord ; <nl> <nl> class CodeEventObserver { <nl> public : <nl> class ProfilerListener : public CodeEventListener { <nl> <nl> private : <nl> void RecordInliningInfo ( CodeEntry * entry , AbstractCode * abstract_code ) ; <nl> - void RecordDeoptInlinedFrames ( CodeEntry * entry , AbstractCode * abstract_code ) ; <nl> + void AttachDeoptInlinedFrames ( Code * code , CodeDeoptEventRecord * rec ) ; <nl> Name * InferScriptName ( Name * name , SharedFunctionInfo * info ) ; <nl> V8_INLINE void DispatchCodeEvent ( const CodeEventsContainer & evt_rec ) { <nl> observer_ - > CodeEventHandler ( evt_rec ) ; <nl>
[ cpu - profiler ] Only store deopt inline frames for functions that need it
v8/v8
0bfcbdd4726920755e51dab28c18ab93e050819b
2018-05-24T11:55:27Z