mirror of
https://github.com/movixcorp/MovixOpenSource.git
synced 2026-07-31 09:09:11 +00:00
fix: compilation with Xcode & npm run ios working + adding missing files du to migration & launchscreen with logo
This commit is contained in:
parent
23cce73a20
commit
5c55a52845
13 changed files with 172 additions and 71 deletions
5
app/ios/Movix/AppDelegate.h
Normal file
5
app/ios/Movix/AppDelegate.h
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#import <RCTAppDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : RCTAppDelegate
|
||||
@end
|
||||
27
app/ios/Movix/AppDelegate.mm
Normal file
27
app/ios/Movix/AppDelegate.mm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#import "AppDelegate.h"
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
self.moduleName = @"MovixApp";
|
||||
self.initialProps = @{};
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
return [self bundleURL];
|
||||
}
|
||||
|
||||
- (NSURL *)bundleURL
|
||||
{
|
||||
#if DEBUG
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
||||
#else
|
||||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"images" : [],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
app/ios/Movix/Images.xcassets/Contents.json
Normal file
6
app/ios/Movix/Images.xcassets/Contents.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
21
app/ios/Movix/Images.xcassets/MovixLogo.imageset/Contents.json
vendored
Normal file
21
app/ios/Movix/Images.xcassets/MovixLogo.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "movix512.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
app/ios/Movix/Images.xcassets/MovixLogo.imageset/movix512.png
vendored
Normal file
BIN
app/ios/Movix/Images.xcassets/MovixLogo.imageset/movix512.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
43
app/ios/Movix/LaunchScreen.storyboard
Normal file
43
app/ios/Movix/LaunchScreen.storyboard
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" misplaced="YES" image="MovixLogo" translatesAutoresizingMaskIntoConstraints="NO" id="IMG-mv-001">
|
||||
<rect key="frame" x="95" y="323" width="202" height="207"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="150" id="h-mv-001"/>
|
||||
<constraint firstAttribute="width" constant="150" id="w-mv-001"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="tZ6-bH-Vph"/>
|
||||
<color key="backgroundColor" red="0.70599999999999996" green="0.188" blue="0.17299999999999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="IMG-mv-001" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="cx-mv-001"/>
|
||||
<constraint firstItem="IMG-mv-001" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="cy-mv-001"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="6.8702290076335872" y="3.5211267605633805"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="MovixLogo" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
9
app/ios/Movix/main.m
Normal file
9
app/ios/Movix/main.m
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
|
|
@ -13,9 +13,7 @@
|
|||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
23DB1FEBE14D043071FF72DB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
|
||||
41E40626A5AC1CA31CD69918 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */; };
|
||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||
AC81323540D785136BF39C6D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -43,9 +41,7 @@
|
|||
5709B34CF0A7D63546082F79 /* Pods-MovixApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MovixApp.release.xcconfig"; path = "Target Support Files/Pods-MovixApp/Pods-MovixApp.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5DCACB8F33CDC322A6C60F78 /* libPods-MovixApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MovixApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Movix/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-MovixApp-MovixAppTests/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-MovixApp/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
|
@ -110,20 +106,10 @@
|
|||
41107E703FD4EF2098255694 /* MovixApp */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */,
|
||||
);
|
||||
name = MovixApp;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5E5C6ED2CDC8047F14DA9058 /* ExpoModulesProviders */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41107E703FD4EF2098255694 /* MovixApp */,
|
||||
A027C3DBE9B2BA83B1F37CBE /* MovixAppTests */,
|
||||
);
|
||||
name = ExpoModulesProviders;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -140,7 +126,6 @@
|
|||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
BBD78D7AC51CEA395F1C20DB /* Pods */,
|
||||
5E5C6ED2CDC8047F14DA9058 /* ExpoModulesProviders */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -159,7 +144,6 @@
|
|||
A027C3DBE9B2BA83B1F37CBE /* MovixAppTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */,
|
||||
);
|
||||
name = MovixAppTests;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -180,7 +164,6 @@
|
|||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "MovixAppTests" */;
|
||||
buildPhases = (
|
||||
2DA8D433D005BA645A6DDEC2 /* [Expo] Configure project */,
|
||||
00E356EA1AD99517003FC87E /* Sources */,
|
||||
00E356EB1AD99517003FC87E /* Frameworks */,
|
||||
00E356EC1AD99517003FC87E /* Resources */,
|
||||
|
|
@ -200,7 +183,6 @@
|
|||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MovixApp" */;
|
||||
buildPhases = (
|
||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
|
||||
2F9589DFEE1027F9C02ACFC4 /* [Expo] Configure project */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
|
|
@ -223,7 +205,8 @@
|
|||
83CBB9F71A601CBA00E9B192 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1210;
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1630;
|
||||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
|
|
@ -307,52 +290,6 @@
|
|||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MovixApp/Pods-MovixApp-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
2DA8D433D005BA645A6DDEC2 /* [Expo] Configure project */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/.xcode.env",
|
||||
"$(SRCROOT)/.xcode.env.local",
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp-MovixAppTests/expo-configure-project.sh",
|
||||
);
|
||||
name = "[Expo] Configure project";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp-MovixAppTests/ExpoModulesProvider.swift",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-MovixApp-MovixAppTests/expo-configure-project.sh\"\n";
|
||||
};
|
||||
2F9589DFEE1027F9C02ACFC4 /* [Expo] Configure project */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/.xcode.env",
|
||||
"$(SRCROOT)/.xcode.env.local",
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp/expo-configure-project.sh",
|
||||
);
|
||||
name = "[Expo] Configure project";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp/ExpoModulesProvider.swift",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-MovixApp/expo-configure-project.sh\"\n";
|
||||
};
|
||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
|
@ -400,7 +337,6 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
00E356F31AD99517003FC87E /* MovixAppTests.m in Sources */,
|
||||
41E40626A5AC1CA31CD69918 /* ExpoModulesProvider.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -410,7 +346,6 @@
|
|||
files = (
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
||||
AC81323540D785136BF39C6D /* ExpoModulesProvider.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -445,9 +380,9 @@
|
|||
"-lc++",
|
||||
"$(inherited)",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MovixApp.app/MovixApp";
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -469,9 +404,9 @@
|
|||
"-lc++",
|
||||
"$(inherited)",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MovixApp.app/MovixApp";
|
||||
};
|
||||
name = Release;
|
||||
|
|
@ -577,6 +512,7 @@
|
|||
CXX = "";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
|
|
@ -662,6 +598,7 @@
|
|||
CXX = "";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
|
|
@ -699,6 +636,7 @@
|
|||
);
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
USE_HERMES = true;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1210"
|
||||
LastUpgradeVersion = "1630"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
|||
|
|
@ -28,5 +28,24 @@ target 'MovixApp' do
|
|||
config[:reactNativePath],
|
||||
:mac_catalyst_enabled => false
|
||||
)
|
||||
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
|
||||
config.build_settings['OTHER_CPLUSPLUSFLAGS'] = '$(inherited) -include "$(PODS_ROOT)/../char_traits_fix.h"'
|
||||
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
|
||||
end
|
||||
end
|
||||
|
||||
# Remove Expo build phases injected by react-native (no expo in this project)
|
||||
installer.aggregate_targets.each do |agg_target|
|
||||
agg_target.user_project.targets.each do |target|
|
||||
target.build_phases.select { |p|
|
||||
p.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) &&
|
||||
p.name.to_s.include?("[Expo]")
|
||||
}.each(&:remove_from_project)
|
||||
end
|
||||
agg_target.user_project.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1805,6 +1805,6 @@ SPEC CHECKSUMS:
|
|||
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
||||
Yoga: aa3df615739504eebb91925fc9c58b4922ea9a08
|
||||
|
||||
PODFILE CHECKSUM: bf9e0a4bb659b81ffb2dc0e16d942b867c714a8b
|
||||
PODFILE CHECKSUM: 70432ede410baea7d92a028a86c934d3f62363a0
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
|
|
|||
26
app/ios/char_traits_fix.h
Normal file
26
app/ios/char_traits_fix.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
namespace std {
|
||||
template <>
|
||||
struct char_traits<unsigned char> {
|
||||
using char_type = unsigned char;
|
||||
using int_type = unsigned int;
|
||||
using off_type = std::streamoff;
|
||||
using pos_type = std::streampos;
|
||||
using state_type = std::mbstate_t;
|
||||
static void assign(char_type& c1, const char_type& c2) noexcept { c1 = c2; }
|
||||
static bool eq(char_type c1, char_type c2) noexcept { return c1 == c2; }
|
||||
static bool lt(char_type c1, char_type c2) noexcept { return c1 < c2; }
|
||||
static int compare(const char_type* s1, const char_type* s2, size_t n) { return memcmp(s1, s2, n); }
|
||||
static size_t length(const char_type* s) { size_t i = 0; while (s[i]) ++i; return i; }
|
||||
static const char_type* find(const char_type* s, size_t n, const char_type& a) { return (const char_type*)memchr(s, a, n); }
|
||||
static char_type* move(char_type* s1, const char_type* s2, size_t n) { return (char_type*)memmove(s1, s2, n); }
|
||||
static char_type* copy(char_type* s1, const char_type* s2, size_t n) { return (char_type*)memcpy(s1, s2, n); }
|
||||
static char_type* assign(char_type* s, size_t n, char_type a) { return (char_type*)memset(s, a, n); }
|
||||
static int_type not_eof(int_type c) noexcept { return c != eof() ? c : 0; }
|
||||
static char_type to_char_type(int_type c) noexcept { return (char_type)c; }
|
||||
static int_type to_int_type(char_type c) noexcept { return (int_type)c; }
|
||||
static bool eq_int_type(int_type c1, int_type c2) noexcept { return c1 == c2; }
|
||||
static int_type eof() noexcept { return (int_type)EOF; }
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue