Files
yoga/csharp/Facebook.CSSLayout/MeasureOutput.cs
Lukas Wöhrl 56ec33a463 Fix CS0675 warning in c#
Summary:
Fix CS0675 warning in c#.
Closes https://github.com/facebook/css-layout/pull/255

Reviewed By: emilsjolander

Differential Revision: D4204765

Pulled By: splhack

fbshipit-source-id: bcf71796e1bf585a94b3549905cb6d6bc78a34b8
2016-11-18 09:37:33 -08:00

35 lines
934 B
C#

/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
namespace Facebook.CSSLayout
{
public class MeasureOutput
{
public static long Make(double width, double height)
{
return Make((int) width, (int) height);
}
public static long Make(int width, int height)
{
return (long)(((ulong) width) << 32 | ((uint) height));
}
public static int GetWidth(long measureOutput)
{
return (int) (0xFFFFFFFF & (measureOutput >> 32));
}
public static int GetHeight(long measureOutput)
{
return (int) (0xFFFFFFFF & measureOutput);
}
}
}