mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
This commit is contained in:
		
							parent
							
								
									c5d76139dc
								
							
						
					
					
						commit
						cb282c6ef0
					
				
					 247 changed files with 794 additions and 794 deletions
				
			
		|  | @ -70,7 +70,7 @@ void WebRTCMultiplayer::poll() { | |||
| 
 | ||||
| 	List<int> remove; | ||||
| 	List<int> add; | ||||
| 	for (Map<int, Ref<ConnectedPeer> >::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 	for (Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 		Ref<ConnectedPeer> peer = E->get(); | ||||
| 		peer->connection->poll(); | ||||
| 		// Check peer state
 | ||||
|  | @ -89,7 +89,7 @@ void WebRTCMultiplayer::poll() { | |||
| 		} | ||||
| 		// Check channels state
 | ||||
| 		int ready = 0; | ||||
| 		for (List<Ref<WebRTCDataChannel> >::Element *C = peer->channels.front(); C && C->get().is_valid(); C = C->next()) { | ||||
| 		for (List<Ref<WebRTCDataChannel>>::Element *C = peer->channels.front(); C && C->get().is_valid(); C = C->next()) { | ||||
| 			Ref<WebRTCDataChannel> ch = C->get(); | ||||
| 			switch (ch->get_ready_state()) { | ||||
| 				case WebRTCDataChannel::STATE_CONNECTING: | ||||
|  | @ -130,7 +130,7 @@ void WebRTCMultiplayer::poll() { | |||
| 			emit_signal("peer_connected", TARGET_PEER_SERVER); | ||||
| 			emit_signal("connection_succeeded"); | ||||
| 			// Notify of all previously connected peers
 | ||||
| 			for (Map<int, Ref<ConnectedPeer> >::Element *F = peer_map.front(); F; F = F->next()) { | ||||
| 			for (Map<int, Ref<ConnectedPeer>>::Element *F = peer_map.front(); F; F = F->next()) { | ||||
| 				if (F->key() != 1 && F->get()->connected) | ||||
| 					emit_signal("peer_connected", F->key()); | ||||
| 			} | ||||
|  | @ -143,11 +143,11 @@ void WebRTCMultiplayer::poll() { | |||
| } | ||||
| 
 | ||||
| void WebRTCMultiplayer::_find_next_peer() { | ||||
| 	Map<int, Ref<ConnectedPeer> >::Element *E = peer_map.find(next_packet_peer); | ||||
| 	Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.find(next_packet_peer); | ||||
| 	if (E) E = E->next(); | ||||
| 	// After last.
 | ||||
| 	while (E) { | ||||
| 		for (List<Ref<WebRTCDataChannel> >::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 		for (List<Ref<WebRTCDataChannel>>::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 			if (F->get()->get_available_packet_count()) { | ||||
| 				next_packet_peer = E->key(); | ||||
| 				return; | ||||
|  | @ -158,7 +158,7 @@ void WebRTCMultiplayer::_find_next_peer() { | |||
| 	E = peer_map.front(); | ||||
| 	// Before last
 | ||||
| 	while (E) { | ||||
| 		for (List<Ref<WebRTCDataChannel> >::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 		for (List<Ref<WebRTCDataChannel>>::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 			if (F->get()->get_available_packet_count()) { | ||||
| 				next_packet_peer = E->key(); | ||||
| 				return; | ||||
|  | @ -204,7 +204,7 @@ int WebRTCMultiplayer::get_unique_id() const { | |||
| 
 | ||||
| void WebRTCMultiplayer::_peer_to_dict(Ref<ConnectedPeer> p_connected_peer, Dictionary &r_dict) { | ||||
| 	Array channels; | ||||
| 	for (List<Ref<WebRTCDataChannel> >::Element *F = p_connected_peer->channels.front(); F; F = F->next()) { | ||||
| 	for (List<Ref<WebRTCDataChannel>>::Element *F = p_connected_peer->channels.front(); F; F = F->next()) { | ||||
| 		channels.push_back(F->get()); | ||||
| 	} | ||||
| 	r_dict["connection"] = p_connected_peer->connection; | ||||
|  | @ -225,7 +225,7 @@ Dictionary WebRTCMultiplayer::get_peer(int p_peer_id) { | |||
| 
 | ||||
| Dictionary WebRTCMultiplayer::get_peers() { | ||||
| 	Dictionary out; | ||||
| 	for (Map<int, Ref<ConnectedPeer> >::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 	for (Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 		Dictionary d; | ||||
| 		_peer_to_dict(E->get(), d); | ||||
| 		out[E->key()] = d; | ||||
|  | @ -288,7 +288,7 @@ Error WebRTCMultiplayer::get_packet(const uint8_t **r_buffer, int &r_buffer_size | |||
| 		_find_next_peer(); | ||||
| 		ERR_FAIL_V(ERR_UNAVAILABLE); | ||||
| 	} | ||||
| 	for (List<Ref<WebRTCDataChannel> >::Element *E = peer_map[next_packet_peer]->channels.front(); E; E = E->next()) { | ||||
| 	for (List<Ref<WebRTCDataChannel>>::Element *E = peer_map[next_packet_peer]->channels.front(); E; E = E->next()) { | ||||
| 		if (E->get()->get_available_packet_count()) { | ||||
| 			Error err = E->get()->get_packet(r_buffer, r_buffer_size); | ||||
| 			_find_next_peer(); | ||||
|  | @ -316,7 +316,7 @@ Error WebRTCMultiplayer::put_packet(const uint8_t *p_buffer, int p_buffer_size) | |||
| 			break; | ||||
| 	} | ||||
| 
 | ||||
| 	Map<int, Ref<ConnectedPeer> >::Element *E = NULL; | ||||
| 	Map<int, Ref<ConnectedPeer>>::Element *E = NULL; | ||||
| 
 | ||||
| 	if (target_peer > 0) { | ||||
| 
 | ||||
|  | @ -330,7 +330,7 @@ Error WebRTCMultiplayer::put_packet(const uint8_t *p_buffer, int p_buffer_size) | |||
| 	} else { | ||||
| 		int exclude = -target_peer; | ||||
| 
 | ||||
| 		for (Map<int, Ref<ConnectedPeer> >::Element *F = peer_map.front(); F; F = F->next()) { | ||||
| 		for (Map<int, Ref<ConnectedPeer>>::Element *F = peer_map.front(); F; F = F->next()) { | ||||
| 
 | ||||
| 			// Exclude packet. If target_peer == 0 then don't exclude any packets
 | ||||
| 			if (target_peer != 0 && F->key() == exclude) | ||||
|  | @ -347,8 +347,8 @@ int WebRTCMultiplayer::get_available_packet_count() const { | |||
| 	if (next_packet_peer == 0) | ||||
| 		return 0; // To be sure next call to get_packet works if size > 0 .
 | ||||
| 	int size = 0; | ||||
| 	for (Map<int, Ref<ConnectedPeer> >::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 		for (List<Ref<WebRTCDataChannel> >::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 	for (Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.front(); E; E = E->next()) { | ||||
| 		for (List<Ref<WebRTCDataChannel>>::Element *F = E->get()->channels.front(); F; F = F->next()) { | ||||
| 			size += F->get()->get_available_packet_count(); | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rémi Verschelde
						Rémi Verschelde