Merge branch 'master' into jgrpp
# Conflicts: # regression/regression/result.txt # src/aircraft_cmd.cpp # src/airport_gui.cpp # src/articulated_vehicles.cpp # src/console_cmds.cpp # src/date_gui.cpp # src/engine.cpp # src/genworld_gui.cpp # src/gfx_layout_fallback.cpp # src/group_gui.cpp # src/hotkeys.cpp # src/network/core/tcp_connect.cpp # src/network/core/tcp_listen.h # src/newgrf.cpp # src/newgrf.h # src/newgrf_engine.cpp # src/newgrf_gui.cpp # src/newgrf_station.cpp # src/openttd.cpp # src/order_gui.cpp # src/os/macosx/osx_main.cpp # src/pathfinder/yapf/yapf_node_rail.hpp # src/rail_gui.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/station_sl.cpp # src/script/api/script_industrytype.cpp # src/settings.cpp # src/settings_gui.cpp # src/settings_table.cpp # src/settingsgen/settingsgen.cpp # src/station.cpp # src/station_cmd.cpp # src/strings.cpp # src/timer/timer_game_calendar.cpp # src/timer/timer_game_calendar.h # src/timer/timer_manager.h # src/timer/timer_window.cpp # src/timetable_cmd.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/town_gui.cpp # src/train_gui.cpp # src/vehicle_cmd.h # src/vehicle_gui.cpp # src/viewport.cpp # src/widgets/dropdown.cpp # src/window_func.h # src/window_gui.h
This commit is contained in:
		| @@ -95,21 +95,7 @@ void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix) | ||||
| #endif | ||||
| } | ||||
|  | ||||
| #ifdef WITH_SDL | ||||
|  | ||||
| /** | ||||
|  * Show the system dialogue message (SDL on MacOSX). | ||||
|  * | ||||
|  * @param title Window title. | ||||
|  * @param message Message text. | ||||
|  * @param buttonLabel Button text. | ||||
|  */ | ||||
| void ShowMacDialog(const char *title, const char *message, const char *buttonLabel) | ||||
| { | ||||
| 	NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil); | ||||
| } | ||||
|  | ||||
| #elif defined WITH_COCOA | ||||
| #ifdef WITH_COCOA | ||||
|  | ||||
| extern void CocoaDialog(const char *title, const char *message, const char *buttonLabel); | ||||
|  | ||||
|   | ||||
| @@ -278,7 +278,7 @@ int CoreTextParagraphLayout::CoreTextLine::GetLeading() const | ||||
|  */ | ||||
| int CoreTextParagraphLayout::CoreTextLine::GetWidth() const | ||||
| { | ||||
| 	if (this->size() == 0) return 0; | ||||
| 	if (this->empty()) return 0; | ||||
|  | ||||
| 	int total_width = 0; | ||||
| 	for (const auto &run : *this) { | ||||
| @@ -371,7 +371,7 @@ int MacOSStringCompare(std::string_view s1, std::string_view s2) | ||||
| 	/* Query CoreText for word and cluster break information. */ | ||||
| 	this->str_info.resize(utf16_to_utf8.size()); | ||||
|  | ||||
| 	if (utf16_str.size() > 0) { | ||||
| 	if (!utf16_str.empty()) { | ||||
| 		CFAutoRelease<CFStringRef> str(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, &utf16_str[0], utf16_str.size(), kCFAllocatorNull)); | ||||
|  | ||||
| 		/* Get cluster breaks. */ | ||||
|   | ||||
| @@ -292,7 +292,7 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF | ||||
|  | ||||
| 	/* Itemize text. */ | ||||
| 	std::vector<SCRIPT_ITEM> items = UniscribeItemizeString(buff, length); | ||||
| 	if (items.size() == 0) return nullptr; | ||||
| 	if (items.empty()) return nullptr; | ||||
|  | ||||
| 	/* Build ranges from the items and the font map. A range is a run of text | ||||
| 	 * that is part of a single item and formatted using a single font style. */ | ||||
| @@ -551,11 +551,11 @@ const int *UniscribeParagraphLayout::UniscribeVisualRun::GetGlyphToCharMap() con | ||||
| 	/* Query Uniscribe for word and cluster break information. */ | ||||
| 	this->str_info.resize(utf16_to_utf8.size()); | ||||
|  | ||||
| 	if (utf16_str.size() > 0) { | ||||
| 	if (!utf16_str.empty()) { | ||||
| 		/* Itemize string into language runs. */ | ||||
| 		std::vector<SCRIPT_ITEM> runs = UniscribeItemizeString(&utf16_str[0], (int32)utf16_str.size()); | ||||
|  | ||||
| 		for (std::vector<SCRIPT_ITEM>::const_iterator run = runs.begin(); runs.size() > 0 && run != runs.end() - 1; run++) { | ||||
| 		for (std::vector<SCRIPT_ITEM>::const_iterator run = runs.begin(); !runs.empty() && run != runs.end() - 1; run++) { | ||||
| 			/* Get information on valid word and character break.s */ | ||||
| 			int len = (run + 1)->iCharPos - run->iCharPos; | ||||
| 			std::vector<SCRIPT_LOGATTR> attr(len); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonathan G Rennison
					Jonathan G Rennison